@@ -1,6 +1,6 @@ | |||||
<view class="i-class i-tabs-tab {{ scroll ? 'i-tabs-tab-scroll' : '' }} {{ current ? 'i-tabs-tab-current' : '' }}"> | |||||
<view class="i-class i-tabs-tab {{ scroll ? 'i-tabs-tab-scroll' : '' }} {{ current ? 'i-tabs-tab-current' : '' }}" bindtap="handleClickItem"> | |||||
<i-badge dot="{{ dot }}" count="{{ dot ? 0 : count }}"> | <i-badge dot="{{ dot }}" count="{{ dot ? 0 : count }}"> | ||||
<view bindtap="handleClickItem"> | |||||
<view> | |||||
<view class="i-tabs-tab-title {{ current ? 'i-tabs-tab-title-current' : '' }}" wx:if="{{ current && currentColor }}" style="color: {{ currentColor }}">{{ | <view class="i-tabs-tab-title {{ current ? 'i-tabs-tab-title-current' : '' }}" wx:if="{{ current && currentColor }}" style="color: {{ currentColor }}">{{ | ||||
title }}</view> | title }}</view> | ||||
<view class="i-tabs-tab-title {{ current ? 'i-tabs-tab-title-current' : '' }}" wx:else>{{ title }}</view> | <view class="i-tabs-tab-title {{ current ? 'i-tabs-tab-title-current' : '' }}" wx:else>{{ title }}</view> | ||||
@@ -28,7 +28,8 @@ Page({ | |||||
allow_load: true, | allow_load: true, | ||||
loading: true, //"上拉加载"的变量,默认false,隐藏 | loading: true, //"上拉加载"的变量,默认false,隐藏 | ||||
content: "", | content: "", | ||||
mystatus: '' | |||||
mystatus: '', | |||||
showPage:false | |||||
}, | }, | ||||
onLoad() { | onLoad() { | ||||
this.getList(0, 1); | this.getList(0, 1); | ||||
@@ -69,7 +70,13 @@ Page({ | |||||
pageSize: 6, | pageSize: 6, | ||||
couponOrderStatus: key | couponOrderStatus: key | ||||
} | } | ||||
}).then(res => { | |||||
}) | |||||
.then(res => { | |||||
if(res.code == 200){ | |||||
that.setData({ | |||||
showPage:true | |||||
}) | |||||
} | |||||
res.data.list.map(file => { | res.data.list.map(file => { | ||||
file.expiredTime = util.fmtDate(file.expiredTime); | file.expiredTime = util.fmtDate(file.expiredTime); | ||||
}); | }); | ||||
@@ -95,12 +102,11 @@ Page({ | |||||
}) | }) | ||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: err.errMsg, | |||||
showCancel:false | |||||
}) | |||||
}) | }) | ||||
} else { | } else { | ||||
that.setData({ | that.setData({ | ||||
@@ -1,4 +1,4 @@ | |||||
<view class="market"> | |||||
<view class="market" wx:if="{{showPage}}"> | |||||
<!-- 券包 我的优惠券 --> | <!-- 券包 我的优惠券 --> | ||||
<i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | <i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | ||||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | <i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | ||||
@@ -205,12 +205,11 @@ Page({ | |||||
url: "/pages/getuserinfo/index" | url: "/pages/getuserinfo/index" | ||||
}); | }); | ||||
}else{ | }else{ | ||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: err.errMsg, | |||||
showCancel:false | |||||
}) | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -15,12 +15,8 @@ Page({ | |||||
minute: "", | minute: "", | ||||
loading: true, //"上拉加载"的变量,默认false,隐藏 | loading: true, //"上拉加载"的变量,默认false,隐藏 | ||||
content: "", | content: "", | ||||
showPage:false | |||||
}, | }, | ||||
/** | |||||
* 生命周期函数--监听页面加载 | |||||
*/ | |||||
onLoad: function (options) {}, | |||||
//列表 | //列表 | ||||
getList: function (page) { | getList: function (page) { | ||||
let that = this; | let that = this; | ||||
@@ -41,7 +37,13 @@ Page({ | |||||
pageSize: 5, | pageSize: 5, | ||||
targetAd: 2 | targetAd: 2 | ||||
} | } | ||||
}).then(res => { | |||||
}) | |||||
.then(res => { | |||||
if(res.code == 200){ | |||||
that.setData({ | |||||
showPage:true | |||||
}) | |||||
} | |||||
if (page >= res.data.pages) { | if (page >= res.data.pages) { | ||||
that.setData({ | that.setData({ | ||||
allow_load: false | allow_load: false | ||||
@@ -91,12 +93,11 @@ Page({ | |||||
}) | }) | ||||
.catch(err => { | .catch(err => { | ||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
wx.showModal({ | |||||
title: '提示', | |||||
content: err.errMsg, | |||||
showCancel:false | |||||
}) | |||||
}) | }) | ||||
} else { | } else { | ||||
that.setData({ | that.setData({ | ||||
@@ -1,5 +1,5 @@ | |||||
<!-- 限时抢购 查看更多对应的页面 --> | <!-- 限时抢购 查看更多对应的页面 --> | ||||
<view class='flashSale'> | |||||
<view wx:if="{{showPage}}"> | |||||
<view wx:for="{{list}}" wx:if="{{item.targetA!='end'}}" class='flashSaleItemWrap' wx:key="index"> | <view wx:for="{{list}}" wx:if="{{item.targetA!='end'}}" class='flashSaleItemWrap' wx:key="index"> | ||||
<view class='flashSaleItem'> | <view class='flashSaleItem'> | ||||
<view class='flashSaleItemTop'> | <view class='flashSaleItemTop'> | ||||