This commit is contained in:
zoujiandong
2024-04-30 17:29:55 +08:00
parent 060e3deae8
commit 554750b145
4 changed files with 35 additions and 13 deletions
+9 -3
View File
@@ -11,6 +11,7 @@ Page({
nouseList: [],
useList: [],
expireList: [],
active:0,
user_coupon_status:0,
},
goIndex() {
@@ -55,10 +56,12 @@ Page({
*/
onChange(event) {
let tabIndex = `${event.detail.index}`
console.log(event.detail.index);
if(tabIndex==2){
tabIndex=3
}
this.setData({
active:`${event.detail.index}`,
nouseList: [],
useList: [],
expireList: [],
@@ -76,15 +79,18 @@ Page({
console.log(options.status)
if(options.status==0){
this.setData({
user_coupon_status:0
user_coupon_status:0,
active:0
})
}else if(options.status==1){
this.setData({
user_coupon_status:1
user_coupon_status:1,
active:1
})
}else if(options.status==3){
this.setData({
user_coupon_status:3
user_coupon_status:3,
active:2
})
}
this.getcoupon();
+19 -3
View File
@@ -3,7 +3,9 @@
<nav navName="我的福利"></nav>
<view class="page">
<van-tabs animated type="line" tab-class="tabdiv" wrap-class="tabwrap" custom-class="tabbox" line-width="50rpx" tab-active-class="tabactive" title-inactive-color="#1C2023;" line-height="height: 10rpx;" swipeable title-active-color="#3CC7C0" color="#3CC7C0" bind:change="onChange">
<van-tabs animated type="line" tab-class="tabdiv" wrap-class="tabwrap" custom-class="tabbox"
active="{{ active }}"
line-width="50rpx" tab-active-class="tabactive" title-inactive-color="#1C2023;" line-height="height: 10rpx;" swipeable title-active-color="#3CC7C0" color="#3CC7C0" bind:change="onChange">
<van-tab title="未使用" class="vantab">
<scroll-view scroll-y class="scrollwraper" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" >
<view class="listbox" wx:if="{{nouseList.length>0}}">
@@ -42,11 +44,18 @@
<view class="name">
<view class="tag" wx:if="{{item.application_scope==5}}">单品补贴</view>
<view class="names">{{item.coupon_name}}</view></view>
<view class="range" wx:if="{{item.application_scope==1}}">使用范围:全场通用</view>
<view class="rangbox">
<view class="range" wx:if="{{item.application_scope==1}}">使用范围:全场通用</view>
<view class="range" wx:elif="{{item.application_scope==2}}">使用范围:问诊适用</view>
<view class="range" wx:elif="{{item.application_scope==3}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==4}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==5}}">使用范围:购药</view>
</view>
<!-- <view class="range" wx:if="{{item.application_scope==1}}">使用范围:全场通用</view>
<view class="range" wx:elif="{{item.application_scope==2}}">使用范围:问诊适用</view>
<view class="range" wx:elif="{{item.application_scope==3}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==4}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==5}}">使用范围:购药</view> -->
<view class="date">有效期:{{item.valid_end_time}}</view>
</view>
<view class="right">
@@ -68,11 +77,18 @@
<view class="name">
<view class="tag" wx:if="{{item.application_scope==5}}">单品补贴</view>
<view class="names">{{item.coupon_name}}</view></view>
<view class="range" wx:if="{{item.application_scope==1}}">使用范围:全场通用</view>
<view class="rangbox">
<view class="range" wx:if="{{item.application_scope==1}}">使用范围:全场通用</view>
<view class="range" wx:elif="{{item.application_scope==2}}">使用范围:问诊适用</view>
<view class="range" wx:elif="{{item.application_scope==3}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==4}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==5}}">使用范围:购药</view>
</view>
<!-- <view class="range" wx:if="{{item.application_scope==1}}">使用范围:全场通用</view>
<view class="range" wx:elif="{{item.application_scope==2}}">使用范围:问诊适用</view>
<view class="range" wx:elif="{{item.application_scope==3}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==4}}">使用范围:购药</view>
<view class="range" wx:elif="{{item.application_scope==5}}">使用范围:购药</view> -->
<view class="date">有效期:{{item.valid_end_time}}</view>
</view>
<view class="right">