@@ -1,7 +1,6 @@
### todo List
* 首页
- - 最新通知:缺接口
- [ ] 优秀产品:批发价、零售价、标签(第一、火焰、销量)
* 收藏-商品列表
@@ -19,7 +19,8 @@ Page({
key_words: '',
category_id: ''
},
- txtlist: [],
+ lunbos: [],
+ lunboMsg: [],
headerNav: [
{
icon: 'partner@2x.png',
@@ -120,9 +121,10 @@ Page({
try {
const { status, data, msg } = await getLunboList()
if (status) {
- const { lunbos } = data
+ const { lunbos, lunbo_msg } = data
this.setData({
- lunbos: lunbos
+ lunbos: lunbos,
+ lunboMsg: lunbo_msg
})
} else {
wx.showToast({
@@ -40,16 +40,18 @@
<!-- 消息通知 -->
<view
class="news-section"
- wx:if="{{txtlist.length > 0}}">
+ wx:if="{{lunboMsg.length > 0}}">
<image src="../../image/home/notice.png"></image>
<swiper
vertical="{{true}}"
interval="{{2000}}"
circular="{{true}}"
autoplay="{{true}}">
- <block wx:for="{{txtlist}}" wx:key="index">
- <swiper-item>
- <view class="swiper-item {{item}}">{{item}}</view>
+ <block wx:for="{{lunboMsg}}" wx:key="index">
+ <swiper-item
+ data-item="{{item}}"
+ bind:tap="handleSwiperClick">
+ <view class="swiper-item">{{item.lunbo_msg}}</view>
</swiper-item>
</block>
</swiper>