|
|
@@ -68,12 +68,14 @@ export function useDoWithdraw() {
|
|
|
// 获取支付中心混合支付渠道配置信息列表 泰商所采用
|
|
|
getHybridConfigs().then((res) => {
|
|
|
if (res.data.length) {
|
|
|
- hybrids.value = res.data.filter(e => e.can_amt_out === 1)
|
|
|
+ hybrids.value = res.data.filter(e => e.can_amt_out === 1 && e.bank_infos.length != 0)
|
|
|
if (hybrids.value.length) {
|
|
|
channel_code.value = hybrids.value[0].channel_code ?? ''
|
|
|
- }
|
|
|
- if (hybrids.value[0].bank_infos.length) {
|
|
|
- bank_code.value = hybrids.value[0].bank_infos[0].bank_code
|
|
|
+ // 默认选中第一个
|
|
|
+ const banks = hybrids.value.filter(e => e.channel_code === channel_code.value)[0].bank_infos
|
|
|
+ if (banks.length) {
|
|
|
+ bank_code.value = banks[0].bank_code ?? ''
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -141,12 +143,14 @@ export function useDoDeposit(userid?: number) {
|
|
|
// 获取支付中心混合支付渠道配置信息列表 泰商所采用
|
|
|
getHybridConfigs().then((res) => {
|
|
|
if (res.data.length) {
|
|
|
- hybrids.value = res.data.filter(e => e.can_amt_in === 1)
|
|
|
+ hybrids.value = res.data.filter(e => e.can_amt_in === 1 && e.bank_infos.length != 0)
|
|
|
if (hybrids.value.length) {
|
|
|
channel_code.value = hybrids.value[0].channel_code ?? ''
|
|
|
- }
|
|
|
- if (hybrids.value[0].bank_infos.length) {
|
|
|
- bank_code.value = hybrids.value[0].bank_infos[0].bank_code
|
|
|
+ // 默认选中第一个
|
|
|
+ const banks = hybrids.value.filter(e => e.channel_code === channel_code.value)[0].bank_infos
|
|
|
+ if (banks.length) {
|
|
|
+ bank_code.value = banks[0].bank_code ?? ''
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|