xiaoe_mp_npm 0.5.44-test10 → 0.5.44-test12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/miniprogram_dist/coupon/index.js +11 -12
- package/package.json +1 -1
- package/src/coupon/index.js +11 -12
|
@@ -30,17 +30,16 @@ Component({
|
|
|
30
30
|
setCoupon: true
|
|
31
31
|
})
|
|
32
32
|
}
|
|
33
|
-
|
|
34
33
|
wx.getStorage({
|
|
35
34
|
key: 'oldChooseCouponList',
|
|
36
35
|
success : (res)=> {
|
|
36
|
+
console.log('this.changeCouponId(this.data.chooseCouponList)',this.changeCouponId(this.data.chooseCouponList))
|
|
37
37
|
console.log('oldChooseCouponList',res)
|
|
38
|
-
if(this.changeCouponId(this.data.chooseCouponList) !=
|
|
38
|
+
if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != res.data ){
|
|
39
39
|
this.setPricingInfo(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
})
|
|
43
|
-
|
|
44
43
|
wx.getStorage({
|
|
45
44
|
key: 'oldUsedPromoCode',
|
|
46
45
|
success : (res)=> {
|
|
@@ -49,7 +48,15 @@ Component({
|
|
|
49
48
|
this.setPricingInfo(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
})
|
|
51
|
+
})
|
|
52
|
+
wx.setStorage({
|
|
53
|
+
key:"oldChooseCouponList",
|
|
54
|
+
data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
|
|
55
|
+
})
|
|
56
|
+
wx.setStorage({
|
|
57
|
+
key:"oldUsedPromoCode",
|
|
58
|
+
data: this.data.usedPromoCode
|
|
59
|
+
})
|
|
53
60
|
}
|
|
54
61
|
},
|
|
55
62
|
},
|
|
@@ -216,14 +223,6 @@ Component({
|
|
|
216
223
|
// 判断当前显示文案
|
|
217
224
|
choosedType () {
|
|
218
225
|
console.log('properties', this.properties)
|
|
219
|
-
wx.setStorage({
|
|
220
|
-
key:"oldChooseCouponList",
|
|
221
|
-
data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
|
|
222
|
-
})
|
|
223
|
-
wx.setStorage({
|
|
224
|
-
key:"oldUsedPromoCode",
|
|
225
|
-
data: this.data.usedPromoCode
|
|
226
|
-
})
|
|
227
226
|
if (this.properties.usedPromoCode) {
|
|
228
227
|
return `已选优惠码`;
|
|
229
228
|
}
|
package/package.json
CHANGED
package/src/coupon/index.js
CHANGED
|
@@ -30,17 +30,16 @@ Component({
|
|
|
30
30
|
setCoupon: true
|
|
31
31
|
})
|
|
32
32
|
}
|
|
33
|
-
|
|
34
33
|
wx.getStorage({
|
|
35
34
|
key: 'oldChooseCouponList',
|
|
36
35
|
success : (res)=> {
|
|
36
|
+
console.log('this.changeCouponId(this.data.chooseCouponList)',this.changeCouponId(this.data.chooseCouponList))
|
|
37
37
|
console.log('oldChooseCouponList',res)
|
|
38
|
-
if(this.changeCouponId(this.data.chooseCouponList) !=
|
|
38
|
+
if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != res.data ){
|
|
39
39
|
this.setPricingInfo(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
})
|
|
43
|
-
|
|
44
43
|
wx.getStorage({
|
|
45
44
|
key: 'oldUsedPromoCode',
|
|
46
45
|
success : (res)=> {
|
|
@@ -49,7 +48,15 @@ Component({
|
|
|
49
48
|
this.setPricingInfo(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
})
|
|
51
|
+
})
|
|
52
|
+
wx.setStorage({
|
|
53
|
+
key:"oldChooseCouponList",
|
|
54
|
+
data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
|
|
55
|
+
})
|
|
56
|
+
wx.setStorage({
|
|
57
|
+
key:"oldUsedPromoCode",
|
|
58
|
+
data: this.data.usedPromoCode
|
|
59
|
+
})
|
|
53
60
|
}
|
|
54
61
|
},
|
|
55
62
|
},
|
|
@@ -216,14 +223,6 @@ Component({
|
|
|
216
223
|
// 判断当前显示文案
|
|
217
224
|
choosedType () {
|
|
218
225
|
console.log('properties', this.properties)
|
|
219
|
-
wx.setStorage({
|
|
220
|
-
key:"oldChooseCouponList",
|
|
221
|
-
data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
|
|
222
|
-
})
|
|
223
|
-
wx.setStorage({
|
|
224
|
-
key:"oldUsedPromoCode",
|
|
225
|
-
data: this.data.usedPromoCode
|
|
226
|
-
})
|
|
227
226
|
if (this.properties.usedPromoCode) {
|
|
228
227
|
return `已选优惠码`;
|
|
229
228
|
}
|