Procházet zdrojové kódy

Merge branch 'v20' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL into v20

li.shaoyi před 1 rokem
rodič
revize
e8fdb43097
1 změnil soubory, kde provedl 39 přidání a 28 odebrání
  1. 39 28
      src/packages/zrwyt/views/mine/Index.vue

+ 39 - 28
src/packages/zrwyt/views/mine/Index.vue

@@ -167,7 +167,8 @@ const { currentAccount } = accountStore.$toRefs()
 /// 判断是否能签约
 const hasSignContract = shallowRef(false)
 const headerRef = shallowRef<HTMLDivElement>()
-const authStatus = computed(() => userStore.userAccount.hasauth) // 实名认证状态
+// 实名认证状态
+const authStatus = computed(() => userStore.userAccount.hasauth) 
 
 const onReady = (el: HTMLDivElement) => {
     // 设置背景图位置
@@ -182,19 +183,44 @@ const doInOutMoney = (tab: string) => {
             queryBankAccountSign().then((res) => {
                 hideLoading()
                 const { signstatus } = res.data[0] ?? {}
-                /// 已实名未签合同
-                if (!hasSignContract.value) {
-                    dialog({
-                        message: '请先去签署合同条例!',
-                        showCancelButton: true,
-                        confirmButtonText: '去签署合同'
-                    }).then(() => {
-                        /// 只有已签约的情况下才可以进行出入金
-                        goToBank(signstatus, tab)
-                    })
+                /// 判断当前有签约
+                if (signstatus && signstatus === 4) {
+                    /// 已实名未签合同
+                    if (!hasSignContract.value) {
+                        dialog({
+                            message: '根据平台规定,请先签署《入市协议》后再进行出入金,谢谢!',
+                            showCancelButton: true,
+                            cancelButtonText: '关闭提醒继续操作',
+                            confirmButtonText: '立即去签署'
+                        })
+                        .then(() => {
+                            router.push({ name: 'account-protocol', query: { memberUserId: getMemberUserId()} })
+                        })
+                        .catch(() => {
+                            router.push({ name: 'bank-wallet', query: { tab } })
+                        })
+                    } else {
+                        router.push({ name: 'bank-wallet', query: { tab } })
+                    }
                 } else {
-                    /// 只有已签约的情况下才可以进行出入金
-                    goToBank(signstatus, tab)
+                    /// 未签约
+                    if (!hasSignContract.value) {
+                        dialog({
+                            message: '根据平台规定,请先签署《入市协议》后再进行签约,谢谢',
+                            showCancelButton: true,
+                            confirmButtonText: '立即去签署'
+                        }).then(() => {
+                            router.push({ name: 'account-protocol', query: { memberUserId: getMemberUserId()} })
+                        })
+                    } else {
+                        dialog({
+                            message: '请先添加签约账户信息!',
+                            showCancelButton: true,
+                            confirmButtonText: '立即去签约'
+                        }).then(() => {
+                            router.push({ name: 'bank-sign' })
+                        })
+                    }
                 }
             }).catch(() => {
                 hideLoading('加载失败', 'fail')
@@ -211,21 +237,6 @@ const doInOutMoney = (tab: string) => {
     }
 }
 
-const goToBank = (signstatus: number, tab: string) => {
-    /// 只有已签约的情况下才可以进行出入金
-    if (signstatus && signstatus === 4) {
-        router.push({ name: 'bank-wallet', query: { tab } })
-    } else {
-        dialog({
-            message: '请先添加签约账户信息!',
-            showCancelButton: true,
-            confirmButtonText: '去签约'
-        }).then(() => {
-            router.push({ name: 'bank-sign' })
-        })
-    }
-}
-
 const userLogout = () => {
     dialog({
         message: '是否退出当前账号?',