|
|
|
@ -174,18 +174,7 @@ export default { |
|
|
|
|
|
|
|
// 轮播图数据 |
|
|
|
bannerList: [ |
|
|
|
{ |
|
|
|
image: '/static/首页背景图.png', |
|
|
|
title: '轮播图1' |
|
|
|
}, |
|
|
|
{ |
|
|
|
image: '/static/默认图片.png', |
|
|
|
title: '轮播图2' |
|
|
|
}, |
|
|
|
{ |
|
|
|
image: '/static/logo.png', |
|
|
|
title: '轮播图3' |
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
// 今日更新数据 |
|
|
|
@ -322,14 +311,25 @@ export default { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subPages/home/directory' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
async getBanner() { |
|
|
|
const bannerRes = await this.$api.home.getBanner() |
|
|
|
if (bannerRes.code === 200){ |
|
|
|
this.bannerList = bannerRes.result.map(item => ({ |
|
|
|
image: item.img, |
|
|
|
title: item.title |
|
|
|
})) |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
async onShow() { |
|
|
|
await this.getBanner() |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
|
|
|
.home-container { |
|
|
|
background: #fff; |
|
|
|
min-height: 100vh; |
|
|
|
|