Commit 748738a89d9e3ffbfeef2f1dd3814000be82b9e4

Authored by yvan.ni
1 parent bc014c22

1 . 券的领取的bug优化

2.   小程序使用券bug优化
packageA/pages/quan_pro/quan_pro.js
@@ -96,10 +96,8 @@ Page({ @@ -96,10 +96,8 @@ Page({
96 th.data.linging = 0; 96 th.data.linging = 0;
97 if (res.data.code == 0) { 97 if (res.data.code == 0) {
98 item.lqnum++; 98 item.lqnum++;
99 - var text = "dataList[" + index + "].is_get";  
100 - var text2 = "dataList[" + index + "].linging";  
101 var text3="q_data"; 99 var text3="q_data";
102 - var obj = {};obj[text] = 1; obj[text2] = 0;obj[text3] = item;obj['show_success']=1; 100 + var obj = {};obj[text3] = item;obj['show_success']=1;
103 th.setData(obj); 101 th.setData(obj);
104 } else { 102 } else {
105 app.confirmBox(res.data.msg); 103 app.confirmBox(res.data.msg);
packageA/pages/quan_pro/quan_pro.wxml
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <image style="width: 70rpx; height: 70rpx; vertical-align: middle; margin-right: 20rpx" src="{{iurl}}/miniapp/images/coupon_img/coupon_logo.png"></image> 13 <image style="width: 70rpx; height: 70rpx; vertical-align: middle; margin-right: 20rpx" src="{{iurl}}/miniapp/images/coupon_img/coupon_logo.png"></image>
14 {{q_data.name}} 14 {{q_data.name}}
15 </view> 15 </view>
16 - <view class="flex ai-center ellipsis-1" style="margin-top: 24rpx; margin-right: 20rpx"><view class="t_circle"></view> 16 + <view class="flex ai-center" style="margin-top: 24rpx; margin-right: 20rpx; width: 440rpx"><view class="t_circle"></view>
17 <text wx:if="{{q_data.useobjecttype==0}}">全场通用</text> 17 <text wx:if="{{q_data.useobjecttype==0}}">全场通用</text>
18 <text wx:else>仅限{{q_data.useobjectname}}使用</text> 18 <text wx:else>仅限{{q_data.useobjectname}}使用</text>
19 </view> 19 </view>
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 <view class="up flex jc-center"> 57 <view class="up flex jc-center">
58 <view class="t-c"> 58 <view class="t-c">
59 <image src="{{iurl}}/miniapp/images/coupon_img/success.png"></image> 59 <image src="{{iurl}}/miniapp/images/coupon_img/success.png"></image>
60 - <view style="margin-top:32rpx;color:#4e220b" class="fs36 ellipsis-1">恭喜您获得【{{get_item.name}}】优惠券</view> 60 + <view style="margin-top:32rpx;color:#4e220b" class="fs36 ellipsis-1">恭喜您获得【{{q_data.name}}】优惠券</view>
61 </view> 61 </view>
62 </view> 62 </view>
63 <view class="down co-w t-c fs35" bindtap="go_quan">查看我的优惠券</view> 63 <view class="down co-w t-c fs35" bindtap="go_quan">查看我的优惠券</view>
pages/cart/cart2/cart2.js
@@ -2200,8 +2200,8 @@ Page({ @@ -2200,8 +2200,8 @@ Page({
2200 var by_cart_list=this.data.by_quan_list_cart; 2200 var by_cart_list=this.data.by_quan_list_cart;
2201 if(by_cart_list){ 2201 if(by_cart_list){
2202 //---所有的券的显示红色选择都清理一遍--- 2202 //---所有的券的显示红色选择都清理一遍---
2203 - for(var ind in by_cart_list){  
2204 - by_cart_list[ind].show_red=0; 2203 + for(var inc in by_cart_list){
  2204 + by_cart_list[inc].show_red=0;
2205 } 2205 }
2206 this.setData({by_quan_list_cart:by_cart_list}); 2206 this.setData({by_quan_list_cart:by_cart_list});
2207 } 2207 }