Authored by 郝肖肖

'拆单提示'

@@ -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);
@@ -5,6 +5,10 @@ @@ -5,6 +5,10 @@
5 <address-card address="{{choosedAddress}}" bind:chooseAddress="chooseAddress" bind:addAddressByLocal="enterAddress" bind:addAddressByWechat="chooseWechatAddress"></address-card> 5 <address-card address="{{choosedAddress}}" bind:chooseAddress="chooseAddress" bind:addAddressByLocal="enterAddress" bind:addAddressByWechat="chooseWechatAddress"></address-card>
6 </view> 6 </view>
7 <view class="split-line"></view> 7 <view class="split-line"></view>
  8 + <view class="tip" wx:if="{{isJit && package_title_detail}}">
  9 + <text class="tipText">{{package_title_detail}}</text>
  10 + </view>
  11 + <view class="split-line"></view>
8 <view class="goods-list"> 12 <view class="goods-list">
9 <block wx:if="{{goodsList.length}}"> 13 <block wx:if="{{goodsList.length}}">
10 <order-item wx:for="{{goodsList}}" wx:key="unique" item="{{item}}" index="{{index}}"></order-item> 14 <order-item wx:for="{{goodsList}}" wx:key="unique" item="{{item}}" index="{{index}}"></order-item>
@@ -24,6 +24,23 @@ page { @@ -24,6 +24,23 @@ page {
24 height: 20rpx; 24 height: 20rpx;
25 } 25 }
26 26
  27 +.container .tip {
  28 + width: 100%;
  29 + height: 60rpx;
  30 + background-color: white;
  31 + display: flex;
  32 + align-items: center;
  33 +}
  34 +
  35 +.container .tip .tipText {
  36 + color: #444;
  37 + font-family: PingFang SC;
  38 + font-size: 30rpx;
  39 + background-color: white;
  40 + text-overflow: ellipsis;
  41 + margin-left: 5%;
  42 +}
  43 +
27 .goods-list { 44 .goods-list {
28 padding-left: 30rpx; 45 padding-left: 30rpx;
29 background-color: #fff; 46 background-color: #fff;
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 "list": [] 29 "list": []
30 }, 30 },
31 "miniprogram": { 31 "miniprogram": {
32 - "current": 12, 32 + "current": -1,
33 "list": [ 33 "list": [
34 { 34 {
35 "id": 1, 35 "id": 1,
@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
107 "id": 12, 107 "id": 12,
108 "name": "订单结算页", 108 "name": "订单结算页",
109 "pathName": "pages/cart/ensure/ensure", 109 "pathName": "pages/cart/ensure/ensure",
110 - "query": "" 110 + "query": "productSku=2030768"
111 } 111 }
112 ] 112 ]
113 } 113 }