Browse Source

'修BUG'

hfll
hflllll 1 month ago
parent
commit
fd3d93b8a1
1 changed files with 15 additions and 15 deletions
  1. +15
    -15
      pages/index/home.vue

+ 15
- 15
pages/index/home.vue View File

@ -174,18 +174,7 @@ export default {
// //
bannerList: [ 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({ uni.navigateTo({
url: '/subPages/home/directory' 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.home-container { .home-container {
background: #fff; background: #fff;
min-height: 100vh; min-height: 100vh;


Loading…
Cancel
Save