罗世杰:feat:轮播图,分析统计、轮播消息接口接入

This commit is contained in:
LuoShijie
2023-11-14 23:11:39 +08:00
parent c21816d077
commit db21651d44
6 changed files with 75 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
<template>
<view class="home-base-bg">
<InputAndSwiper type='0'></InputAndSwiper>
<InputAndSwiper type='0' :bannerURL="swiperList"></InputAndSwiper>
<view class="home-content">
<view class="service">
<u-image src="/static/statistics/sy_icon_lxkf.png" width="108rpx" height="108rpx"/>
@@ -35,17 +35,33 @@
},
data() {
return {
notice: '寒雨连江夜入吴 平明送客楚山孤 洛阳亲友如相问 一片冰心在玉壶',
notice: [],
chooseIndex: 0,
statisticsNum: [231753, 1345],
swiperList:[]
}
},
onLoad() {
this.getBanner()
this.getNotice()
this.getStat()
},
methods: {
getBanner(){
this.$api.getBanner().then(res=>{
this.swiperList = res.data.data.map(item=>item.img)
})
},
getNotice(){
this.$api.getHotInfo().then(res=>{
this.notice = res.data.data.map(item=>item.title)
})
},
getStat(){
this.$api.getStat().then(res=>{
this.statisticsNum = res.data.data
})
}
},
computed: {