Handy_Cao 3 years ago
parent
commit
8153d638e3

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

@@ -353,7 +353,7 @@ export function doCancelBankSign() {
         }
     })
 
-    const formSubmit = async () => {
+    const cancelSubmit = async () => {
         await request
         const { cusbankid, currency, accountcode, bankaccountno2, bankaccountname2 } = bankAccountSign.value[0]
         loading.value = true
@@ -377,7 +377,7 @@ export function doCancelBankSign() {
 
     return {
         loading,
-        formSubmit,
+        cancelSubmit,
         formData,
         sign
     }

+ 0 - 1
src/packages/mobile/views/bank/sign/components/edit/index.vue

@@ -14,7 +14,6 @@
         </Form>
         <template #footer>
             <div class="g-form__footer">
-                <!-- <Button type="success" round block>解约</Button> -->
                 <Button type="primary" round block @click="formRef?.submit()">提交</Button>
             </div>
         </template>

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

@@ -67,7 +67,7 @@
     </div>
     <div class="g-navmenu">
       <CellGroup>
-        <Cell is-link  :to="{ name: 'account-certification' }">
+        <Cell is-link  @click="hasAuth">
           <template #title>
             <app-iconfont icon="icon-shimingrenzheng">实名认证</app-iconfont>
           </template>
@@ -117,24 +117,48 @@
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
-import { Cell, CellGroup, Button } from 'vant'
+import { Cell, CellGroup, Button, Toast } from 'vant'
 import { dialog } from '@/utils/vant'
 import { useNavigation } from '@/hooks/navigation'
 import { useLoginStore, useAccountStore } from '@/stores'
 import { useAuth } from '@/business/auth'
 import AppIconfont from '@mobile/components/base/iconfont/index.vue'
+import { queryUserAccount } from '@/services/api/account'
 
 const { routerTo } = useNavigation()
 const { getLoginId, getUserId, getFirstAccountId } = useLoginStore()
 const { logout } = useAuth()
 const { accountInfo } = useAccountStore()
 const headerRef = shallowRef<HTMLDivElement>()
+const userAccount = shallowRef<Partial<Model.UserAccount>>({})
+
 
 const onReady = (el: HTMLDivElement) => {
   // 设置背景图位置
   headerRef.value?.style.setProperty('background-position', `0 -${el.clientHeight}px`)
 }
 
+const hasAuth = () => {
+  /// 当前已实名
+  if (userAccount.value.hasauth === 1) {
+    Toast('当前已实名');
+    return
+  } 
+  routerTo('account-certification')
+}
+
+const getUserAccount = () => {
+    queryUserAccount({
+        data: {
+            userID: getUserId()
+        },
+        success: (res) => {
+            userAccount.value = res.data
+        }
+    })
+}
+getUserAccount()
+
 const userLogout = () => {
   dialog('是否退出当前账号?', {
     showCancelButton: true