提交 bdd639d9 编写于 作者: api工厂's avatar api工厂

首页直播Banner改为读取后台广告位设置

上级 f6d07f09
......@@ -112,6 +112,7 @@ Page({
that.kanjiaGoods()
that.pingtuanGoods()
this.wxaMpLiveRooms()
this.adPosition()
},
async miaoshaGoods(){
const res = await WXAPI.goods({
......@@ -333,5 +334,21 @@ Page({
wx.navigateTo({
url: '/pages/notice/show?id=' + id,
})
},
async adPosition() {
const res = await WXAPI.adPosition('index-live-pic')
if (res.code == 0) {
this.setData({
adPositionIndexLivePic: res.data
})
}
},
clickAdPositionIndexLive() {
if (!this.data.adPositionIndexLivePic || !this.data.adPositionIndexLivePic.url) {
return
}
wx.navigateTo({
url: this.data.adPositionIndexLivePic.url,
})
}
})
\ No newline at end of file
......@@ -86,9 +86,7 @@
</view>
</block>
<view class="space"></view>
<navigator wx:if="{{aliveRooms}}" url="/pages/live/index">
<image class="live-banner" src="/images/live.jpg" mode="widthFix"></image>
</navigator>
<image wx:if="{{ adPositionIndexLivePic }}" class="live-banner" src="{{ adPositionIndexLivePic.val }}" mode="widthFix" bindtap="clickAdPositionIndexLive"></image>
<!-- 秒杀开始 -->
<block wx:if="{{miaoshaGoods && miaoshaGoods.length > 0}}">
<van-divider custom-class="table-text" contentPosition="center">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册