xml解析

This commit is contained in:
yi-ge 2020-07-20 18:28:58 +08:00
parent 868fc81fd1
commit 5d744b5e84
2 changed files with 20 additions and 3 deletions

View File

@ -1,7 +1,6 @@
const pkg = require('./package')
const DevBaseUrl = 'http://127.0.0.1:65534'
// const DevBaseUrl = 'https://api.wyr.me'
const ProdBashUrl = 'https://api.wyr.me'
module.exports = {

View File

@ -10,7 +10,7 @@
|   {{ articels.post_date }}
li
Icon(:icon="['far', 'bookmark']")
nuxt-link(v-for='(relationships, index) in articels.term_relationships', :key='index', v-if='relationships.term_taxonomy', :to="'/' + relationships.term_taxonomy.term.slug")
nuxt-link(v-for='(relationships, index) in articels.term_relationships', :key='index', v-if='relationships.term_taxonomy && relationships.term_taxonomy.term && relationships.term_taxonomy.taxonomy.category === "category"', :to="'/' + relationships.term_taxonomy.term.slug")
span
|   {{ relationships.term_taxonomy.term.name }}
li(v-if='articels.postmetum.meta_value !== 0')
@ -585,8 +585,26 @@ export default {
}
},
head () {
const keywords = []
for (let i = 0; i < this.articels.term_relationships.length; i++) {
if (this.articels.term_relationships[i].term_taxonomy && this.articels.term_relationships[i].term_taxonomy.term && this.articels.term_relationships[i].term_taxonomy.taxonomy.category === 'category') {
keywords.push(this.articels.term_relationships[i].term_taxonomy.term.name)
}
}
return {
title: `${this.articels.post_title} - 轶哥`
title: `${this.articels.post_title} - 轶哥`,
meta: [
{
hid: 'description',
name: 'description',
content: this.articels.post_excerpt
},
{
hid: 'keywords',
name: 'keywords',
content: '轶哥,王轶,全栈,程序员,技术博客'
}
]
}
}
}