xiaoe_mp_npm 0.5.44-test6 → 0.5.44-test7
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/ConfirmOrder/components/ConfirmOrderContent/index.js +3 -0
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.wxml +1 -0
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/index.js +25 -2
- package/miniprogram_dist/coupon/index.js +0 -7
- package/package.json +1 -1
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +3 -0
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxml +1 -0
- package/src/ConfirmOrder/components/GoodsInfo/index.js +25 -2
- package/src/coupon/index.js +0 -7
|
@@ -487,6 +487,7 @@ Component({
|
|
|
487
487
|
* @param {Boolean} data.triggerPrePay 本次修改是否触发批价
|
|
488
488
|
*/
|
|
489
489
|
payInfoChange(val) {
|
|
490
|
+
console.log('子组件传参父组件',val)
|
|
490
491
|
let data = {};
|
|
491
492
|
val.detail ? data = val.detail : data = val
|
|
492
493
|
this.setData({
|
|
@@ -541,6 +542,8 @@ Component({
|
|
|
541
542
|
})
|
|
542
543
|
}
|
|
543
544
|
}
|
|
545
|
+
console.log('prePayParams',this.data.prePayParams);
|
|
546
|
+
console.log('payParams',this.data.payParams);
|
|
544
547
|
},
|
|
545
548
|
// 返回箭头点击事件
|
|
546
549
|
backClick() {
|
|
@@ -83,7 +83,11 @@ Component({
|
|
|
83
83
|
isFullScreen: {
|
|
84
84
|
type: Boolean,
|
|
85
85
|
value: false
|
|
86
|
-
}
|
|
86
|
+
},
|
|
87
|
+
prePayInfo: {
|
|
88
|
+
type: Object,
|
|
89
|
+
value: () => {},
|
|
90
|
+
},
|
|
87
91
|
},
|
|
88
92
|
|
|
89
93
|
/**
|
|
@@ -91,7 +95,10 @@ Component({
|
|
|
91
95
|
*/
|
|
92
96
|
data: {
|
|
93
97
|
goodsCount: 1,
|
|
94
|
-
first: true
|
|
98
|
+
first: true,
|
|
99
|
+
usedPromoCode: '',
|
|
100
|
+
couponList: []
|
|
101
|
+
|
|
95
102
|
},
|
|
96
103
|
computed: {
|
|
97
104
|
historyBuy(data) {
|
|
@@ -306,6 +313,15 @@ Component({
|
|
|
306
313
|
this.changeVal(event)
|
|
307
314
|
}
|
|
308
315
|
},
|
|
316
|
+
'prePayInfo': function(data) {
|
|
317
|
+
console.log('data',data)
|
|
318
|
+
if(data) {
|
|
319
|
+
this.setData({
|
|
320
|
+
usedPromoCode: data?.promo_code || '',
|
|
321
|
+
couponList: this.changeCouponId(data?.coupon?.valid || []),
|
|
322
|
+
})
|
|
323
|
+
}
|
|
324
|
+
},
|
|
309
325
|
},
|
|
310
326
|
lifetimes: {
|
|
311
327
|
attached: function () {
|
|
@@ -323,6 +339,13 @@ Component({
|
|
|
323
339
|
})
|
|
324
340
|
this.countBlur(true);
|
|
325
341
|
},
|
|
342
|
+
changeCouponId(list) {
|
|
343
|
+
const arr = [];
|
|
344
|
+
for (let i = 0; i < list.length; i++) {
|
|
345
|
+
arr[i] = list[i].cu_id;
|
|
346
|
+
}
|
|
347
|
+
return arr
|
|
348
|
+
},
|
|
326
349
|
overlimit(limitType) {
|
|
327
350
|
if (limitType.detail === 'plus') {
|
|
328
351
|
if (this.data.goodsInfo?.stock === this.data.count || this.data.count > this.data.goodsInfo?.stock) {
|
|
@@ -34,13 +34,6 @@ Component({
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
'usedPromoCode, couponList': function(new1,new2) {
|
|
38
|
-
console.log('new1,new2',new1,new2)
|
|
39
|
-
if(new1 || new2){
|
|
40
|
-
let chooseCouponList = this.changeCouponId(this.data.couponList)
|
|
41
|
-
this.setPricingInfo(chooseCouponList, this.data.usedPromoCode)
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
37
|
},
|
|
45
38
|
/**
|
|
46
39
|
* 组件的属性列表
|
package/package.json
CHANGED
|
@@ -487,6 +487,7 @@ Component({
|
|
|
487
487
|
* @param {Boolean} data.triggerPrePay 本次修改是否触发批价
|
|
488
488
|
*/
|
|
489
489
|
payInfoChange(val) {
|
|
490
|
+
console.log('子组件传参父组件',val)
|
|
490
491
|
let data = {};
|
|
491
492
|
val.detail ? data = val.detail : data = val
|
|
492
493
|
this.setData({
|
|
@@ -541,6 +542,8 @@ Component({
|
|
|
541
542
|
})
|
|
542
543
|
}
|
|
543
544
|
}
|
|
545
|
+
console.log('prePayParams',this.data.prePayParams);
|
|
546
|
+
console.log('payParams',this.data.payParams);
|
|
544
547
|
},
|
|
545
548
|
// 返回箭头点击事件
|
|
546
549
|
backClick() {
|
|
@@ -83,7 +83,11 @@ Component({
|
|
|
83
83
|
isFullScreen: {
|
|
84
84
|
type: Boolean,
|
|
85
85
|
value: false
|
|
86
|
-
}
|
|
86
|
+
},
|
|
87
|
+
prePayInfo: {
|
|
88
|
+
type: Object,
|
|
89
|
+
value: () => {},
|
|
90
|
+
},
|
|
87
91
|
},
|
|
88
92
|
|
|
89
93
|
/**
|
|
@@ -91,7 +95,10 @@ Component({
|
|
|
91
95
|
*/
|
|
92
96
|
data: {
|
|
93
97
|
goodsCount: 1,
|
|
94
|
-
first: true
|
|
98
|
+
first: true,
|
|
99
|
+
usedPromoCode: '',
|
|
100
|
+
couponList: []
|
|
101
|
+
|
|
95
102
|
},
|
|
96
103
|
computed: {
|
|
97
104
|
historyBuy(data) {
|
|
@@ -306,6 +313,15 @@ Component({
|
|
|
306
313
|
this.changeVal(event)
|
|
307
314
|
}
|
|
308
315
|
},
|
|
316
|
+
'prePayInfo': function(data) {
|
|
317
|
+
console.log('data',data)
|
|
318
|
+
if(data) {
|
|
319
|
+
this.setData({
|
|
320
|
+
usedPromoCode: data?.promo_code || '',
|
|
321
|
+
couponList: this.changeCouponId(data?.coupon?.valid || []),
|
|
322
|
+
})
|
|
323
|
+
}
|
|
324
|
+
},
|
|
309
325
|
},
|
|
310
326
|
lifetimes: {
|
|
311
327
|
attached: function () {
|
|
@@ -323,6 +339,13 @@ Component({
|
|
|
323
339
|
})
|
|
324
340
|
this.countBlur(true);
|
|
325
341
|
},
|
|
342
|
+
changeCouponId(list) {
|
|
343
|
+
const arr = [];
|
|
344
|
+
for (let i = 0; i < list.length; i++) {
|
|
345
|
+
arr[i] = list[i].cu_id;
|
|
346
|
+
}
|
|
347
|
+
return arr
|
|
348
|
+
},
|
|
326
349
|
overlimit(limitType) {
|
|
327
350
|
if (limitType.detail === 'plus') {
|
|
328
351
|
if (this.data.goodsInfo?.stock === this.data.count || this.data.count > this.data.goodsInfo?.stock) {
|
package/src/coupon/index.js
CHANGED
|
@@ -34,13 +34,6 @@ Component({
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
'usedPromoCode, couponList': function(new1,new2) {
|
|
38
|
-
console.log('new1,new2',new1,new2)
|
|
39
|
-
if(new1 || new2){
|
|
40
|
-
let chooseCouponList = this.changeCouponId(this.data.couponList)
|
|
41
|
-
this.setPricingInfo(chooseCouponList, this.data.usedPromoCode)
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
37
|
},
|
|
45
38
|
/**
|
|
46
39
|
* 组件的属性列表
|