xiaoe_mp_npm 0.5.44 → 0.5.45-alpha.1

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.
@@ -79,8 +79,8 @@ Component({
79
79
  this.setData({
80
80
  showPopup: false
81
81
  });
82
- wx.removeStorage('oldChooseCouponList')
83
- wx.removeStorage('oldUsedPromoCode')
82
+ wx.removeStorageSync('oldChooseCouponList')
83
+ wx.removeStorageSync('oldUsedPromoCode')
84
84
  this.triggerEvent("closePop")
85
85
  },
86
86
  changeSheetInfo(val) {
@@ -30,32 +30,43 @@ Component({
30
30
  // setCoupon: true
31
31
  // })
32
32
  // }
33
- wx.getStorage({
34
- key: 'oldChooseCouponList',
35
- success : (res)=> {
36
- console.log('this.changeCouponId(this.data.chooseCouponList)',this.changeCouponId(this.data.chooseCouponList))
37
- console.log('oldChooseCouponList',res)
38
- if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != res.data ){
39
- this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
40
- }
41
- }
42
- })
43
- wx.getStorage({
44
- key: 'oldUsedPromoCode',
45
- success : (res)=> {
46
- if(this.data.usedPromoCode != res.data ){
47
- this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
48
- }
49
- }
50
- })
51
- wx.setStorage({
52
- key:"oldChooseCouponList",
53
- data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
54
- })
55
- wx.setStorage({
56
- key:"oldUsedPromoCode",
57
- data: this.data.usedPromoCode
58
- })
33
+ // wx.getStorage({
34
+ // key: 'oldChooseCouponList',
35
+ // success : (res)=> {
36
+ // console.log('this.changeCouponId(this.data.chooseCouponList)',this.changeCouponId(this.data.chooseCouponList))
37
+ // console.log('oldChooseCouponList',res)
38
+ // if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != res.data ){
39
+ // this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
40
+ // }
41
+ // }
42
+ // })
43
+ var chooseCouponListStorage = wx.getStorageSync('oldChooseCouponList');
44
+ if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != chooseCouponListStorage ){
45
+ this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
46
+ }
47
+ // wx.getStorage({
48
+ // key: 'oldUsedPromoCode',
49
+ // success : (res)=> {
50
+ // if(this.data.usedPromoCode != res.data ){
51
+ // this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
52
+ // }
53
+ // }
54
+ // })
55
+ var usedPromoCodeStorage = wx.getStorageSync('oldUsedPromoCode');
56
+ if(this.data.usedPromoCode != usedPromoCodeStorage ){
57
+ this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
58
+ }
59
+
60
+ wx.setStorageSync('oldChooseCouponList',JSON.stringify(this.changeCouponId(this.data.chooseCouponList)))
61
+ // wx.setStorage({
62
+ // key:"oldChooseCouponList",
63
+ // data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
64
+ // })
65
+ wx.setStorageSync('oldUsedPromoCode',this.data.usedPromoCode)
66
+ // wx.setStorage({
67
+ // key:"oldUsedPromoCode",
68
+ // data: this.data.usedPromoCode
69
+ // })
59
70
  }
60
71
  },
61
72
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaoe_mp_npm",
3
- "version": "0.5.44",
3
+ "version": "0.5.45-alpha.1",
4
4
  "description": "",
5
5
  "main": "miniprogram_dist/index.js",
6
6
  "scripts": {
@@ -79,8 +79,8 @@ Component({
79
79
  this.setData({
80
80
  showPopup: false
81
81
  });
82
- wx.removeStorage('oldChooseCouponList')
83
- wx.removeStorage('oldUsedPromoCode')
82
+ wx.removeStorageSync('oldChooseCouponList')
83
+ wx.removeStorageSync('oldUsedPromoCode')
84
84
  this.triggerEvent("closePop")
85
85
  },
86
86
  changeSheetInfo(val) {
@@ -30,32 +30,43 @@ Component({
30
30
  // setCoupon: true
31
31
  // })
32
32
  // }
33
- wx.getStorage({
34
- key: 'oldChooseCouponList',
35
- success : (res)=> {
36
- console.log('this.changeCouponId(this.data.chooseCouponList)',this.changeCouponId(this.data.chooseCouponList))
37
- console.log('oldChooseCouponList',res)
38
- if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != res.data ){
39
- this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
40
- }
41
- }
42
- })
43
- wx.getStorage({
44
- key: 'oldUsedPromoCode',
45
- success : (res)=> {
46
- if(this.data.usedPromoCode != res.data ){
47
- this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
48
- }
49
- }
50
- })
51
- wx.setStorage({
52
- key:"oldChooseCouponList",
53
- data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
54
- })
55
- wx.setStorage({
56
- key:"oldUsedPromoCode",
57
- data: this.data.usedPromoCode
58
- })
33
+ // wx.getStorage({
34
+ // key: 'oldChooseCouponList',
35
+ // success : (res)=> {
36
+ // console.log('this.changeCouponId(this.data.chooseCouponList)',this.changeCouponId(this.data.chooseCouponList))
37
+ // console.log('oldChooseCouponList',res)
38
+ // if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != res.data ){
39
+ // this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
40
+ // }
41
+ // }
42
+ // })
43
+ var chooseCouponListStorage = wx.getStorageSync('oldChooseCouponList');
44
+ if(JSON.stringify(this.changeCouponId(this.data.chooseCouponList)) != chooseCouponListStorage ){
45
+ this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
46
+ }
47
+ // wx.getStorage({
48
+ // key: 'oldUsedPromoCode',
49
+ // success : (res)=> {
50
+ // if(this.data.usedPromoCode != res.data ){
51
+ // this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
52
+ // }
53
+ // }
54
+ // })
55
+ var usedPromoCodeStorage = wx.getStorageSync('oldUsedPromoCode');
56
+ if(this.data.usedPromoCode != usedPromoCodeStorage ){
57
+ this.setPricingInfoFirst(this.changeCouponId(this.data.chooseCouponList), this.data.usedPromoCode)
58
+ }
59
+
60
+ wx.setStorageSync('oldChooseCouponList',JSON.stringify(this.changeCouponId(this.data.chooseCouponList)))
61
+ // wx.setStorage({
62
+ // key:"oldChooseCouponList",
63
+ // data: JSON.stringify(this.changeCouponId(this.data.chooseCouponList))
64
+ // })
65
+ wx.setStorageSync('oldUsedPromoCode',this.data.usedPromoCode)
66
+ // wx.setStorage({
67
+ // key:"oldUsedPromoCode",
68
+ // data: this.data.usedPromoCode
69
+ // })
59
70
  }
60
71
  },
61
72
  },