Commit 35c0a533 by 谢中龙

优惠券修改

parent e40e4551
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre const PROJECT_ENV = 'test' // 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 : //仅生产环境时 配置 :
//3001 3001 , wx313ec36b710125d4 有直播 //3001 3001 , wx313ec36b710125d4 有直播
//2006 泰华 , wx40fec8944623c8b3 有直播 //2006 泰华 , wx40fec8944623c8b3 有直播 //门户 wx833d5ece112fc3fd
//2007 多多一上 , wxf7bc302c51166dc0 有直播 //2007 多多一上 , wxf7bc302c51166dc0 有直播
//2012 悦芙媞 wxfe14ebde4a6eea3d 有直播 //2012 悦芙媞 wxfe14ebde4a6eea3d 有直播
......
...@@ -30,7 +30,7 @@ wxService.page({ ...@@ -30,7 +30,7 @@ wxService.page({
this.getCouponDetail(cardno,type) this.getCouponDetail(cardno,type)
this.setData({ this.setData({
cardno : cardno, cardno : cardno,
couponType : type, couponType : this.data.couponType,
}); });
}, },
//页面卸载 //页面卸载
...@@ -80,7 +80,8 @@ wxService.page({ ...@@ -80,7 +80,8 @@ wxService.page({
data.coupon.startTime = data.coupon.startTime.substring(0,10) data.coupon.startTime = data.coupon.startTime.substring(0,10)
data.coupon.endTime = data.coupon.endTime.substring(0,10) data.coupon.endTime = data.coupon.endTime.substring(0,10)
data.coupon_name = data.couponSetting.title; data.coupon_name = data.couponSetting.title;
data.couponSetting.notice = JSON.parse(data.couponSetting.notice) data.couponSetting.notice = JSON.parse(data.couponSetting.notice);
data.indexImgUrl = data.couponDetail.style.takeCouponBgimg;
for (let i in data.couponSetting.notice){ for (let i in data.couponSetting.notice){
if (data.couponSetting.notice[i].type == 1){ if (data.couponSetting.notice[i].type == 1){
data.couponSetting.notice[i].value = data.coupon.startTime.substring(0, 10) + ' 至 ' + data.coupon.endTime.substring(0, 10) data.couponSetting.notice[i].value = data.coupon.startTime.substring(0, 10) + ' 至 ' + data.coupon.endTime.substring(0, 10)
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
<view class='coupon-name fs-28'>{{couponDetail.couponSetting.title}}</view> <view class='coupon-name fs-28'>{{couponDetail.couponSetting.title}}</view>
<view class='coupon-desc fs-28'>{{couponDetail.coupon.startTime}} 至 {{couponDetail.coupon.endTime}}</view> <view class='coupon-desc fs-28'>{{couponDetail.coupon.startTime}} 至 {{couponDetail.coupon.endTime}}</view>
</view> </view>
<view class='coupon-code fs-24' bindtap="handelPresentCouponCode" wx:if="{{!couponType}}">出示券码</view> <view class='coupon-code fs-24' bindtap="handelPresentCouponCode">出示券码</view>
<view class='coupon-code fs-24' wx:if="{{couponType == 1}}">支付券</view>
<view class='coupon-code fs-24' wx:if="{{couponType == 2}}">包邮券</view>
</view> </view>
<view class='integral-detail'> <view class='integral-detail'>
<!-- <view class='integral-list'> <!-- <view class='integral-list'>
...@@ -84,7 +82,7 @@ ...@@ -84,7 +82,7 @@
<!--goHome--> <!--goHome-->
<go-home/> <go-home/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/> <floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
<view class="position-bottom" wx:if="{{!couponType}}"> <view class="position-bottom" wx:if="{{couponType == 'coupon'}}">
<button type='primary' class="redeem-now" bindtap='handelPresentCouponCode'>出示券码</button> <button type='primary' class="redeem-now" bindtap='handelPresentCouponCode'>出示券码</button>
</view> </view>
......
...@@ -36,16 +36,16 @@ wxService.page({ ...@@ -36,16 +36,16 @@ wxService.page({
}); });
// 所有可使用优惠券 // 所有可使用优惠券
if( current == 0 ){ // if( current == 0 ){
this.getCouponList(1,10,1) // this.getCouponList(1,10,1)
}else if( current == 1){ // }else if( current == 1){
//微信支付券 // //微信支付券
this.getPayCouponList(); // this.getPayCouponList();
} // }
else if(current == 2){ // else if(current == 2){
//包邮券 // //包邮券
this.getPosCouponList(); // this.getPosCouponList();
} // }
} , } ,
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment