li.shaoyi 3 anni fa
parent
commit
e7c6473875

+ 1 - 1
src/business/bank/index.ts

@@ -125,7 +125,7 @@ export function useBankAccountSign() {
     }
 
     const bankInfo = computed(() => {
-        return dataList.value[0] ?? {}
+        return dataList.value[0]
     })
 
     return {

+ 6 - 6
src/packages/mobile/views/home/components/mine/index.vue

@@ -119,7 +119,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
+import { shallowRef, onActivated } from 'vue'
 import { Cell, CellGroup, Button, Tag } from 'vant'
 import { dialog } from '@/utils/vant'
 import { useNavigation } from '@/hooks/navigation'
@@ -144,11 +144,11 @@ const onReady = (el: HTMLDivElement) => {
 /// 进行出入金操作判断
 const doInOutMoney = (tab: string) => {
   if (hasAuth) {
-    /// 当前未签约
-    if (bankInfo.value.signstatus === 1) {
-      dialog('当前未签约,请先进行账户签约才进行出入金操作')
-    } else {
+    const { signstatus } = bankInfo.value ?? {}
+    if (signstatus && signstatus !== 1) {
       router.push({ name: 'bank-wallet', query: { tab } })
+    } else {
+      dialog('当前未签约,请先进行账户签约才进行出入金操作')
     }
   } else {
     dialog('请先实名认证,再进行出入金操作业务!')
@@ -163,7 +163,7 @@ const userLogout = () => {
   })
 }
 
-getBankAccountList()
+onActivated(() => getBankAccountList())
 </script>
 
 <style lang="less">