罗世杰:feat:轮播图,分析统计、轮播消息接口接入
This commit is contained in:
@@ -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: {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user