|
@@ -27,8 +27,11 @@ function formatPaymentData(data, yasInfo) { |
|
@@ -27,8 +27,11 @@ function formatPaymentData(data, yasInfo) { |
27
|
deliveryWayList: data.delivery_way || [],
|
27
|
deliveryWayList: data.delivery_way || [],
|
28
|
deliveryTimeList: data.delivery_time || [],
|
28
|
deliveryTimeList: data.delivery_time || [],
|
29
|
promotionList: data.shopping_cart_data.promotion_formula_list,
|
29
|
promotionList: data.shopping_cart_data.promotion_formula_list,
|
30
|
- paymentAmount: data.shopping_cart_data.last_order_amount
|
30
|
+ paymentAmount: data.shopping_cart_data.last_order_amount,
|
|
|
31
|
+ isJit: false,
|
|
|
32
|
+ package_title_detail: ''
|
31
|
};
|
33
|
};
|
|
|
34
|
+ let supplierId = 0;
|
32
|
|
35
|
|
33
|
yasInfo = yasInfo || {};
|
36
|
yasInfo = yasInfo || {};
|
34
|
|
37
|
|
|
@@ -41,9 +44,19 @@ function formatPaymentData(data, yasInfo) { |
|
@@ -41,9 +44,19 @@ function formatPaymentData(data, yasInfo) { |
41
|
yasInfo.skus && yasInfo.skus.push(value.product_sku);
|
44
|
yasInfo.skus && yasInfo.skus.push(value.product_sku);
|
42
|
yasInfo.pids && yasInfo.pids.push(value.product_id);
|
45
|
yasInfo.pids && yasInfo.pids.push(value.product_id);
|
43
|
|
46
|
|
|
|
47
|
+ if (!info.isJit && value.is_jit === 'Y') {
|
|
|
48
|
+ supplierId = value.supplier_id;
|
|
|
49
|
+ info.isJit = true;
|
|
|
50
|
+ }
|
|
|
51
|
+
|
44
|
return value;
|
52
|
return value;
|
45
|
});
|
53
|
});
|
46
|
|
54
|
|
|
|
55
|
+ (data.shopping_cart_data && data.shopping_cart_data.package_list || []).some(item => {
|
|
|
56
|
+ info.package_title_detail = item.title || '';
|
|
|
57
|
+ return item === supplierId;
|
|
|
58
|
+ });
|
|
|
59
|
+
|
47
|
let selectWay,
|
60
|
let selectWay,
|
48
|
selectTime;
|
61
|
selectTime;
|
49
|
|
62
|
|
|
@@ -94,8 +107,11 @@ function formatShoppingPaymentData(data, yasInfo) { |
|
@@ -94,8 +107,11 @@ function formatShoppingPaymentData(data, yasInfo) { |
94
|
deliveryWayList: data.delivery_way || [],
|
107
|
deliveryWayList: data.delivery_way || [],
|
95
|
deliveryTimeList: data.delivery_time || [],
|
108
|
deliveryTimeList: data.delivery_time || [],
|
96
|
promotionList: data.shopping_cart_data.promotion_formula_list,
|
109
|
promotionList: data.shopping_cart_data.promotion_formula_list,
|
97
|
- paymentAmount: data.shopping_cart_data.last_order_amount
|
110
|
+ paymentAmount: data.shopping_cart_data.last_order_amount,
|
|
|
111
|
+ isJit: false,
|
|
|
112
|
+ package_title_detail: ''
|
98
|
};
|
113
|
};
|
|
|
114
|
+ let supplierId = 0;
|
99
|
|
115
|
|
100
|
yasInfo = yasInfo || {};
|
116
|
yasInfo = yasInfo || {};
|
101
|
|
117
|
|
|
@@ -108,9 +124,19 @@ function formatShoppingPaymentData(data, yasInfo) { |
|
@@ -108,9 +124,19 @@ function formatShoppingPaymentData(data, yasInfo) { |
108
|
yasInfo.skus && yasInfo.skus.push(value.product_sku);
|
124
|
yasInfo.skus && yasInfo.skus.push(value.product_sku);
|
109
|
yasInfo.pids && yasInfo.pids.push(value.product_id);
|
125
|
yasInfo.pids && yasInfo.pids.push(value.product_id);
|
110
|
|
126
|
|
|
|
127
|
+ if (!info.isJit && value.is_jit === 'Y') {
|
|
|
128
|
+ supplierId = value.supplier_id;
|
|
|
129
|
+ info.isJit = true;
|
|
|
130
|
+ }
|
|
|
131
|
+
|
111
|
return value;
|
132
|
return value;
|
112
|
});
|
133
|
});
|
113
|
|
134
|
|
|
|
135
|
+ (data.shopping_cart_data && data.shopping_cart_data.package_list || []).some(item => {
|
|
|
136
|
+ info.package_title_detail = item.title || '';
|
|
|
137
|
+ return item === supplierId;
|
|
|
138
|
+ });
|
|
|
139
|
+
|
114
|
let selectWay,
|
140
|
let selectWay,
|
115
|
selectTime;
|
141
|
selectTime;
|
116
|
|
142
|
|
|
@@ -166,7 +192,10 @@ Page({ |
|
@@ -166,7 +192,10 @@ Page({ |
166
|
invoiceNeedStatus: false,
|
192
|
invoiceNeedStatus: false,
|
167
|
|
193
|
|
168
|
promotionList: [],
|
194
|
promotionList: [],
|
169
|
- paymentAmount: ''
|
195
|
+ paymentAmount: '',
|
|
|
196
|
+
|
|
|
197
|
+ isJit: false,
|
|
|
198
|
+ package_title_detail: ''
|
170
|
},
|
199
|
},
|
171
|
onLoad(options) {
|
200
|
onLoad(options) {
|
172
|
this.orderData = options;
|
201
|
this.orderData = options;
|
|
@@ -180,9 +209,7 @@ Page({ |
|
@@ -180,9 +209,7 @@ Page({ |
180
|
if (this.orderData.productSku) {
|
209
|
if (this.orderData.productSku) {
|
181
|
this.loadEnsurePayment({buyNumber: this.orderData.buyNumber, productSku: this.orderData.productSku});
|
210
|
this.loadEnsurePayment({buyNumber: this.orderData.buyNumber, productSku: this.orderData.productSku});
|
182
|
} else {
|
211
|
} else {
|
183
|
- setTimeout(() => {
|
|
|
184
|
this.loadShoppingPayment(options);
|
212
|
this.loadShoppingPayment(options);
|
185
|
- }, 1500);
|
|
|
186
|
}
|
213
|
}
|
187
|
|
214
|
|
188
|
yas = new Yas(app);
|
215
|
yas = new Yas(app);
|