vuepress-cqy
Version:
This is an anime blog theme based on vuepress, the theme is simple, colorful, versatile, and supports customization, providing multiple components to set the theme 这是一个基于vuepress的动漫类型主题,简洁,界面漂亮,多色彩,多自定义,多功能,海报分享,相册等等,满足你搭建博客的一切需要
25 lines • 868 B
JavaScript
const network = require('../network')
const myData = require('@temp/my-data')
let themeProperty = null
module.exports = {
getAnimeImg(context) {
return new Promise((resolve,reject) => {
new Promise((resolve,reject) => {
for (let i = 0; i < myData.default.length; i++) {
if (myData.default[i].path === '/') {
themeProperty = myData.default[i].frontmatter
}
}
resolve()
})
network.req(themeProperty.animeOption).then(res => {
const query = themeProperty.animeOption.query
const url = res[query]
context.commit('setAnimeImg', {
imgUrl: url
})
resolve()
})
})
},
}