|
@@ -2,6 +2,7 @@ import React, { useState } from 'react'
|
2
|
2
|
import NavHeader from '@/components/NavHeader/index'
|
3
|
3
|
import Taro from '@tarojs/taro'
|
4
|
4
|
import { useModel } from '@/store'
|
|
5
|
+import request, { apis } from '@/utils/request'
|
5
|
6
|
import '@/assets/css/reset.less'
|
6
|
7
|
import '@/assets/css/iconfont.less'
|
7
|
8
|
import './index.less'
|
|
@@ -9,7 +10,20 @@ import './index.less'
|
9
|
10
|
export default function RenZhengScreen (props) {
|
10
|
11
|
|
11
|
12
|
const { Show = false } = props
|
12
|
|
- const { user } = useModel('user')
|
|
13
|
+ const { user, setUser } = useModel('user')
|
|
14
|
+ const [DataLock, setDataLock] = useState(false)
|
|
15
|
+
|
|
16
|
+ const RefreshUserInfo = () => {
|
|
17
|
+ if (DataLock) return
|
|
18
|
+ setDataLock(true)
|
|
19
|
+ request({ ...apis.getUserInfo }).then((res) => {
|
|
20
|
+ setUser({ ...user, ...res })
|
|
21
|
+ setDataLock(false)
|
|
22
|
+ }).catch((res) => {
|
|
23
|
+ setDataLock(false)
|
|
24
|
+ Taro.showToast({ title: res, icon: 'none' })
|
|
25
|
+ })
|
|
26
|
+ }
|
13
|
27
|
|
14
|
28
|
return (
|
15
|
29
|
<view className='RenZhengScreen' style={{ display: Show ? 'block' : 'none' }}>
|
|
@@ -17,13 +31,14 @@ export default function RenZhengScreen (props) {
|
17
|
31
|
<view className='centerLabel'>
|
18
|
32
|
{
|
19
|
33
|
user !== null &&
|
20
|
|
- <text className='Tips'>{user.verifyStatus === 'not_certified' ? '请进行业主信息认证' : user.verifyStatus === 'certification_in_progress' ? '业主认证中,请等待物业审核' : user.verifyStatus === 'certified' ? '未授权手机号' : '业主验证未通过,请重新验证'}</text>
|
|
34
|
+ <text className='Tips'>{user.verifyStatus === 'not_certified' ? '请进行业主信息认证' : user.verifyStatus === 'certification_in_progress' ? '业主认证中,请等待物业审核' : '业主验证未通过,请重新验证'}</text>
|
21
|
35
|
}
|
22
|
36
|
<view>
|
23
|
37
|
{
|
24
|
38
|
user !== null && user.verifyStatus !== 'certification_in_progress' && user.verifyStatus !== 'certified' &&
|
25
|
|
- <text onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuRenZheng/index?from=popup` }) }}>去认证</text>
|
|
39
|
+ <text onClick={() => { Taro.navigateTo({ url: `/pages/WoDe/YeZhuRenZheng/index?from=popup` }) }} className='active'>去认证</text>
|
26
|
40
|
}
|
|
41
|
+ {/* <text onClick={RefreshUserInfo} className={DataLock ? '' : 'active'}>{DataLock ? '正在刷新...' : '刷新人员信息'}</text> */}
|
27
|
42
|
</view>
|
28
|
43
|
</view>
|
29
|
44
|
</view>
|