张延森 пре 4 година
родитељ
комит
18b69658ff

+ 11
- 3
src/components/RenZhengScreen/index.jsx Прегледај датотеку

@@ -1,6 +1,7 @@
1 1
 import React, { useState } from 'react'
2 2
 import NavHeader from '@/components/NavHeader/index'
3 3
 import Taro from '@tarojs/taro'
4
+import { useModel } from '@/store'
4 5
 import '@/assets/css/reset.less'
5 6
 import '@/assets/css/iconfont.less'
6 7
 import './index.less'
@@ -8,14 +9,21 @@ import './index.less'
8 9
 export default function RenZhengScreen (props) {
9 10
 
10 11
   const { Show = false } = props
12
+  const { user } = useModel('user')
11 13
 
12 14
   return (
13
-    <view className='RenZhengScreen' style={{display: Show ? 'block' : 'none'}}>
15
+    <view className='RenZhengScreen' style={{ display: Show ? 'block' : 'none' }}>
14 16
       <NavHeader Title='业主认证' Color='#000'></NavHeader>
15 17
       <view className='centerLabel'>
16
-        <text>请进行业主信息认证</text>
18
+        {
19
+          user !== null &&
20
+          <text className='Tips'>{user.verifyStatus === 'not_certified' ? '请进行业主信息认证' : user.verifyStatus === 'certification_in_progress' ? '业主认证中' : '业主验证未通过,请重新验证'}</text>
21
+        }
17 22
         <view>
18
-          <text onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuRenZheng/index?from=popup` }) }}>去认证</text>
23
+          {
24
+            user !== null && user.verifyStatus !== 'certification_in_progress' &&
25
+            <text onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuRenZheng/index?from=popup` }) }}>去认证</text>
26
+          }
19 27
         </view>
20 28
       </view>
21 29
     </view>

+ 1
- 1
src/components/RenZhengScreen/index.less Прегледај датотеку

@@ -10,7 +10,7 @@
10 10
   >view.centerLabel {
11 11
     width: 100%;
12 12
 
13
-    >text {
13
+    text.Tips {
14 14
       display: block;
15 15
       font-size: 24px;
16 16
       color: #666;

+ 6
- 3
src/pages/WoDe/YeZhuRenZheng/index.jsx Прегледај датотеку

@@ -65,7 +65,7 @@ export default function YeZhuRenZheng () {
65 65
       clearTimeout(CodeTimer)
66 66
       setCodeTimerNum(60)
67 67
     }
68
-
68
+  
69 69
     return () => {
70 70
       if (CodeTimer) {
71 71
         clearTimeout(CodeTimer)
@@ -163,8 +163,11 @@ export default function YeZhuRenZheng () {
163 163
         }).then((res) => {
164 164
           Taro.showToast({ title: '添加认证成功', icon: 'none' })
165 165
           if (PageFrom === 'popup') {
166
-            setUser({ ...user, verifyStatus: 'certification_in_progress' })
167
-            Taro.navigateBack({ delta: 1 })
166
+            // 获取审核详情
167
+            request({ ...apis.getRenZhengDetail, args: { id: res.id } }).then((cRes) => {
168
+              setUser({ ...user, verifyStatus: cRes.verifyStatus === 0 ? 'certification_in_progress' : cRes.verifyStatus === 1 ? 'certified' : 'certification_failed' })
169
+              Taro.navigateBack({ delta: 1 })
170
+            })
168 171
           } else {
169 172
             Taro.navigateTo({ url: `/pages/WoDe/YeZhuShenHe/index?id=${res.id}` })
170 173
           }