jufubao-mall 2.0.63 → 2.0.64-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.
package/package.json
CHANGED
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
</xd-card-pay-chose>
|
|
260
260
|
</template>
|
|
261
261
|
<xd-wallet-chose
|
|
262
|
-
v-if="payWallet"
|
|
262
|
+
v-if="payWallet && canLoadWalletComp"
|
|
263
263
|
ref="xdWalletChose"
|
|
264
264
|
:defaultUseFirst="defaultUseWalletFirst"
|
|
265
265
|
:hadChoseWallet="choseWallet && choseWallet.selectedWalletList"
|
|
@@ -466,6 +466,7 @@
|
|
|
466
466
|
showWalletChose: false,
|
|
467
467
|
choseWallet: null,
|
|
468
468
|
wallet_total_amount: "",
|
|
469
|
+
canLoadWalletComp: false, //是否可以加载钱包组件
|
|
469
470
|
|
|
470
471
|
//优惠券
|
|
471
472
|
choseCoupon: null,
|
|
@@ -744,9 +745,16 @@
|
|
|
744
745
|
return this.checkPayMethod.includes('wallet');
|
|
745
746
|
},
|
|
746
747
|
defaultUseWalletFirst(){
|
|
747
|
-
|
|
748
|
-
//钱包会从被动触发变主动触发,
|
|
749
|
-
if(this.is_wallet_use_with_coupon === "Y")
|
|
748
|
+
//钱包与优惠券可共同使用的情况下(is_wallet_use_with_coupon === 'Y'), 需要先选优惠券,再选钱包
|
|
749
|
+
//钱包会从被动触发变主动触发, 此时钱包默认不选中
|
|
750
|
+
if(this.is_wallet_use_with_coupon === "Y") {
|
|
751
|
+
//支持优惠券,并且优惠券不为空
|
|
752
|
+
let hasCoupon = this.otherPayMethod.find(p => p.method === 'coupon')
|
|
753
|
+
//钱包使用依赖于优惠券(支付方式是否支持, 是否有优惠券可用(异步), 所以钱包需延迟加载(获取优惠券之后))
|
|
754
|
+
if(hasCoupon && this.couponList.length > 0){
|
|
755
|
+
return false;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
750
758
|
return this.defaultUseWallet;
|
|
751
759
|
},
|
|
752
760
|
defaultUseCouponFirst(){
|
|
@@ -925,7 +933,7 @@
|
|
|
925
933
|
let addrShadow = gCPVal(container, 'addrShadow', ['none'], {sKey: "addrShadowStatus", fields: ['addrShadow']});
|
|
926
934
|
this.addrShadow = addrShadow ? this.getBSStr(addrShadow, 'shadow') : 'none';
|
|
927
935
|
this.coupon_layout = gCPVal(container, 'coupon_layout', ['1']);
|
|
928
|
-
this.checkPayMethod = gCPVal(container, 'checkPayMethod', []);
|
|
936
|
+
this.checkPayMethod = gCPVal(container, 'checkPayMethod', ['wallet']);
|
|
929
937
|
console.log("this.checkPayMethod", this.checkPayMethod);
|
|
930
938
|
this.openVipBgImg = getServiceUrl(
|
|
931
939
|
getContainerPropsValue(container, "content.openVipBgImg", { url: "" }).url,
|
|
@@ -988,6 +996,9 @@
|
|
|
988
996
|
},
|
|
989
997
|
handleCouponInit(coupList){
|
|
990
998
|
this.couponList = coupList;
|
|
999
|
+
//已获取优惠券
|
|
1000
|
+
//参: computed: defaultUseWalletFirst
|
|
1001
|
+
this.canLoadWalletComp = true;
|
|
991
1002
|
},
|
|
992
1003
|
|
|
993
1004
|
//only选择卡片
|
|
@@ -1582,6 +1593,12 @@
|
|
|
1582
1593
|
this.is_wallet_use_with_coupon = res.is_wallet_use_with_coupon;
|
|
1583
1594
|
this.otherPayMethod = res.list;
|
|
1584
1595
|
this.otherPayLoaded = true;
|
|
1596
|
+
|
|
1597
|
+
//如果不支持优惠券,则直接加载钱包支付 参: computed: defaultUseWalletFirst
|
|
1598
|
+
let hasCoupon = this.otherPayMethod.find(item => item.method === 'coupon');
|
|
1599
|
+
if(!(this.is_wallet_use_with_coupon === 'Y' && hasCoupon)){
|
|
1600
|
+
this.canLoadWalletComp = true;
|
|
1601
|
+
}
|
|
1585
1602
|
})
|
|
1586
1603
|
},
|
|
1587
1604
|
|
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
|
-
}
|