Handy_Cao před 9 měsíci
rodič
revize
e662d9cd7e

+ 1 - 1
oem/tss/config/appconfig.json

@@ -3,7 +3,7 @@
   "appName": "TCE",
   "version": "1.0.46",
   "versionCode": "100046",
-  "apiUrl": "http://192.168.31.136:8080/cfg?key=test_136",
+  "apiUrl": "http://192.168.31.210:8080/cfg?key=test_210",
   "tradeChannel": "ws",
   "showLoginAlert": true,
   "modules": [

+ 12 - 8
src/business/bank/index.ts

@@ -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 ?? ''
+                }
             }
         }
     })    

+ 6 - 2
src/packages/tss/views/bank/wallet/components/deposit/Index.vue

@@ -38,7 +38,7 @@
                             :optionProps="{ label: 'channel_name', value: 'channel_code' }" @confirm="onHibirdChange"/>
                     </template>
                 </Field>
-                <Field v-if="sign.ismix === 1 && channel_banks.length != 0" label="银行名称" name="bank_code" is-link >
+                <Field v-if="sign.ismix === 1 && bank_code != ''" label="银行名称" name="bank_code" is-link >
                     <template #input>
                         <app-select v-model="bank_code" :options="channel_banks"
                             :optionProps="{ label: 'bank_name', value: 'bank_code' }" />
@@ -128,7 +128,7 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 
 // 数量步长列表
 const qtyStepList = [100, 500, 1000, 5000, 10000, 50000]
-// 数量步长
+// 数量步长 
 const qtyStep = shallowRef(qtyStepList[0])
 
 const onRadioChange = (value: number) => {
@@ -248,6 +248,10 @@ const formSubmit = () => {
 
 onMounted(() => {
     formData.Amount = qtyStepList[0]
+    // 默认选中第一个
+    setTimeout(() => {
+        onHibirdChange(channel_code.value)
+    }, 500);
 })
 </script>
 

+ 8 - 1
src/packages/tss/views/bank/wallet/components/withdraw/Index.vue

@@ -72,7 +72,7 @@
 </template>
 
 <script lang="ts" setup>
-import { reactive, shallowRef, defineAsyncComponent } from 'vue'
+import { reactive, shallowRef, defineAsyncComponent, onMounted } from 'vue'
 import { Form, Field, Cell, CellGroup, FormInstance, Button, FieldRule } from 'vant'
 import { fullloading, dialog, } from '@/utils/vant'
 import { useDoWithdraw, useAccountFundInfo, useDoCusBankExtendConfigs } from '@/business/bank'
@@ -236,6 +236,13 @@ const formSubmit = () => {
         })
     })
 }
+
+onMounted(() => {
+    // 默认选中第一个
+    setTimeout(() => {
+        onHibirdChange(channel_code.value)
+    }, 500);
+})
 </script>
 
 <style lang="less">