Authored by 郝肖肖

'拆单提示'

... ... @@ -27,8 +27,11 @@ function formatPaymentData(data, yasInfo) {
deliveryWayList: data.delivery_way || [],
deliveryTimeList: data.delivery_time || [],
promotionList: data.shopping_cart_data.promotion_formula_list,
paymentAmount: data.shopping_cart_data.last_order_amount
paymentAmount: data.shopping_cart_data.last_order_amount,
isJit: false,
package_title_detail: ''
};
let supplierId = 0;
yasInfo = yasInfo || {};
... ... @@ -41,9 +44,19 @@ function formatPaymentData(data, yasInfo) {
yasInfo.skus && yasInfo.skus.push(value.product_sku);
yasInfo.pids && yasInfo.pids.push(value.product_id);
if (!info.isJit && value.is_jit === 'Y') {
supplierId = value.supplier_id;
info.isJit = true;
}
return value;
});
(data.shopping_cart_data && data.shopping_cart_data.package_list || []).some(item => {
info.package_title_detail = item.title || '';
return item === supplierId;
});
let selectWay,
selectTime;
... ... @@ -94,8 +107,11 @@ function formatShoppingPaymentData(data, yasInfo) {
deliveryWayList: data.delivery_way || [],
deliveryTimeList: data.delivery_time || [],
promotionList: data.shopping_cart_data.promotion_formula_list,
paymentAmount: data.shopping_cart_data.last_order_amount
paymentAmount: data.shopping_cart_data.last_order_amount,
isJit: false,
package_title_detail: ''
};
let supplierId = 0;
yasInfo = yasInfo || {};
... ... @@ -108,9 +124,19 @@ function formatShoppingPaymentData(data, yasInfo) {
yasInfo.skus && yasInfo.skus.push(value.product_sku);
yasInfo.pids && yasInfo.pids.push(value.product_id);
if (!info.isJit && value.is_jit === 'Y') {
supplierId = value.supplier_id;
info.isJit = true;
}
return value;
});
(data.shopping_cart_data && data.shopping_cart_data.package_list || []).some(item => {
info.package_title_detail = item.title || '';
return item === supplierId;
});
let selectWay,
selectTime;
... ... @@ -166,7 +192,10 @@ Page({
invoiceNeedStatus: false,
promotionList: [],
paymentAmount: ''
paymentAmount: '',
isJit: false,
package_title_detail: ''
},
onLoad(options) {
this.orderData = options;
... ... @@ -180,9 +209,7 @@ Page({
if (this.orderData.productSku) {
this.loadEnsurePayment({buyNumber: this.orderData.buyNumber, productSku: this.orderData.productSku});
} else {
setTimeout(() => {
this.loadShoppingPayment(options);
}, 1500);
this.loadShoppingPayment(options);
}
yas = new Yas(app);
... ...
... ... @@ -5,6 +5,10 @@
<address-card address="{{choosedAddress}}" bind:chooseAddress="chooseAddress" bind:addAddressByLocal="enterAddress" bind:addAddressByWechat="chooseWechatAddress"></address-card>
</view>
<view class="split-line"></view>
<view class="tip" wx:if="{{isJit && package_title_detail}}">
<text class="tipText">{{package_title_detail}}</text>
</view>
<view class="split-line"></view>
<view class="goods-list">
<block wx:if="{{goodsList.length}}">
<order-item wx:for="{{goodsList}}" wx:key="unique" item="{{item}}" index="{{index}}"></order-item>
... ...
... ... @@ -24,6 +24,23 @@ page {
height: 20rpx;
}
.container .tip {
width: 100%;
height: 60rpx;
background-color: white;
display: flex;
align-items: center;
}
.container .tip .tipText {
color: #444;
font-family: PingFang SC;
font-size: 30rpx;
background-color: white;
text-overflow: ellipsis;
margin-left: 5%;
}
.goods-list {
padding-left: 30rpx;
background-color: #fff;
... ...
... ... @@ -29,7 +29,7 @@
"list": []
},
"miniprogram": {
"current": 12,
"current": -1,
"list": [
{
"id": 1,
... ... @@ -107,7 +107,7 @@
"id": 12,
"name": "订单结算页",
"pathName": "pages/cart/ensure/ensure",
"query": ""
"query": "productSku=2030768"
}
]
}
... ...