jufubao-mall 2.0.92 → 2.0.93-beta1
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(git checkout *)",
|
|
5
|
+
"Bash(npx lessc *)",
|
|
6
|
+
"Bash(python3 *)",
|
|
7
|
+
"Bash(sips -g pixelWidth -g pixelHeight \"/Users/zxd/Workspaces/jufubao-mall/temp_screenshot.jpg\")",
|
|
8
|
+
"Bash(identify \"/Users/zxd/Workspaces/jufubao-mall/temp_screenshot.jpg\")",
|
|
9
|
+
"Bash(sips *)"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -54,8 +54,11 @@
|
|
|
54
54
|
<view style="display:flex;align-items:center">
|
|
55
55
|
<!-- <xd-unit :price="prod.sale_price" :isOld="false" color="#333" :iconSize="0.3" :fontSize="32"/> -->
|
|
56
56
|
<CusPrice :isPlus="is_plus_site" :type="order" :showPrice="prod.show_prices"></CusPrice>
|
|
57
|
+
<view style="font-size: 28rpx;color:#999;margin-left: 16rpx;">{{prod['product_num'] ? 'x': ''}} {{prod['product_num']}}</view>
|
|
58
|
+
</view>
|
|
59
|
+
<view class="coupon_paid">
|
|
60
|
+
实付: <xd-unit :price="prod['paid_amount']" :isOld="false" color="#333" :iconSize="0.3" :fontSize="32"/>
|
|
57
61
|
</view>
|
|
58
|
-
<view style="font-size: 28rpx;color:#999">{{prod['product_num'] ? 'x': ''}} {{prod['product_num']}}</view>
|
|
59
62
|
</view>
|
|
60
63
|
<view v-if="prod.error_message" :style="{color:priceTextColor,fontSize:'24rpx'}">{{prod.error_message}}</view>
|
|
61
64
|
<view v-else-if="showActivityPrice==='Y'&&prod.is_activity==='Y'"
|
|
@@ -1070,11 +1073,36 @@
|
|
|
1070
1073
|
if(!this.canUseCoupon) return;
|
|
1071
1074
|
this.showCouponChose = true;
|
|
1072
1075
|
},
|
|
1076
|
+
//选择完优惠券,需要在商品上展示实付款信息(商品价格-优惠券优惠价格)
|
|
1077
|
+
handleCouponChoseResult(data){
|
|
1078
|
+
//data.total_coupon_parts: [{"card_number":"10001000008865","part_id":"60031172_0_0","sale_amount":8000,"coupon_amount":5000,"coupon_split":"[{\"card_number\":\"10001000008865\",\"coupon_amount\":5000,\"coupon_point\":5000}]","coupon_point":5000}]
|
|
1079
|
+
if(!data || !data.total_coupon_parts || !this.shopList) return;
|
|
1080
|
+
// 按 part_id 建立映射,快速查找
|
|
1081
|
+
const couponMap = {};
|
|
1082
|
+
data.total_coupon_parts.forEach(item => {
|
|
1083
|
+
couponMap[item.part_id] = item;
|
|
1084
|
+
});
|
|
1085
|
+
// 遍历 shopList 下每个商品的 product,匹配 part_id 计算实付金额
|
|
1086
|
+
this.shopList.forEach(shop => {
|
|
1087
|
+
if(!shop.product) return;
|
|
1088
|
+
shop.product.forEach(prod => {
|
|
1089
|
+
const partId = prod.part_id;
|
|
1090
|
+
const couponItem = couponMap[partId];
|
|
1091
|
+
if(couponItem) {
|
|
1092
|
+
// sale_price、coupon_point 均为分,实付金额 = 商品价格 x 数量 - 优惠券优惠价格
|
|
1093
|
+
prod.paid_amount = (prod.sale_price || 0) * (prod.product_num || 1) - (couponItem.coupon_point || 0);
|
|
1094
|
+
} else {
|
|
1095
|
+
prod.paid_amount = (prod.sale_price || 0) * (prod.product_num || 1);
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
});
|
|
1099
|
+
},
|
|
1073
1100
|
//only选择满减券结果
|
|
1074
1101
|
handleCouponChose(data){
|
|
1075
1102
|
console.log(data,'alalalal')
|
|
1076
1103
|
this.choseCoupon = data;
|
|
1077
1104
|
this.showCouponChose = false;
|
|
1105
|
+
this.handleCouponChoseResult(data);
|
|
1078
1106
|
//共同使用模式:优惠券 + 积分 + 钱包可叠加
|
|
1079
1107
|
//串行逻辑:先选积分 → 积分选完后检查 orderNeedPayPrice > 0 才选钱包
|
|
1080
1108
|
if(this.is_wallet_use_with_coupon === "Y"){
|
|
@@ -2036,6 +2064,12 @@
|
|
|
2036
2064
|
align-items: flex-end;
|
|
2037
2065
|
justify-content: space-between;
|
|
2038
2066
|
}
|
|
2067
|
+
.coupon_paid{
|
|
2068
|
+
font-size: 28rpx;
|
|
2069
|
+
color:#999;
|
|
2070
|
+
display:flex;
|
|
2071
|
+
align-items: center;
|
|
2072
|
+
}
|
|
2039
2073
|
}
|
|
2040
2074
|
.postage_tip{
|
|
2041
2075
|
color: rgb(229, 116, 112);
|
package/get.package.path.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description 第三方库
|
|
5
|
-
* @param threePackagePath {String} 第三方库所在项目路径存放路径路
|
|
6
|
-
* @param packname {String} 包名字
|
|
7
|
-
* @returns {string|*}
|
|
8
|
-
*/
|
|
9
|
-
const getPackagePath = (threePackagePath, packname = 'gxd-commands-bussiness')=>{
|
|
10
|
-
if(packname === 'gxd-commands-bussiness') {
|
|
11
|
-
return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-commands-bussiness/${threePackagePath}`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (packname === 'gxd-uni-library-editx') {
|
|
15
|
-
return `/Users/shiyonggao/Desktop/code/BASE/UNIAPP/xd-uni-library-editx/${threePackagePath}`;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = {
|
|
21
|
-
getPackagePath
|
|
22
|
-
}
|