mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:03:27 +08:00
uniapp【优化】(支付模块):只有一种支付方式时,默认选中
This commit is contained in:
@@ -64,7 +64,13 @@
|
||||
if (props.orderType === PaymentTypeEnum.recharge) {
|
||||
payMethodList = payMethodList.filter(item => item.code !== 'balancepay' || !item.isOnline);
|
||||
}
|
||||
state.payMethodList = payMethodList;
|
||||
|
||||
/** 当支付方式只有一个的时候,默认选择 */
|
||||
if(payMethodList.length == 1){
|
||||
state.payCode = payMethodList[0].code;
|
||||
emits('handleSelectPay', payMethodList[0].code);
|
||||
}
|
||||
state.payMethodList = payMethodList;
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user