|
@@ -23,10 +23,12 @@ import './MineCss/style.less'
|
23
|
23
|
export default (props) => {
|
24
|
24
|
const { person } = props
|
25
|
25
|
|
|
26
|
+
|
26
|
27
|
const { getAvatar } = useModel('person')
|
27
|
28
|
const [showCutover, setShowCutover] = useState(false)
|
28
|
29
|
const hasAvatar = !!person.avatar
|
29
|
|
- const hidePhone = person.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2")
|
|
30
|
+ // const hidePhone = person.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2")
|
|
31
|
+ // console.log("🚀 ~ file: Mine.jsx ~ line 31 ~ hidePhone", hidePhone)
|
30
|
32
|
|
31
|
33
|
const ShowMoldeOn = () => {
|
32
|
34
|
setShowCutover(true)
|
|
@@ -40,7 +42,6 @@ export default (props) => {
|
40
|
42
|
lang: 'zh_CN',
|
41
|
43
|
desc: "获取你的昵称、头像、地区及性别",
|
42
|
44
|
success: (res) => {
|
43
|
|
- console.log("🚀 ~ file: Mine.jsx ~ line 75 ~ handleGetUserProfile ~ res", res)
|
44
|
45
|
const sessionKey = Taro.getStorageSync('sessionKey')
|
45
|
46
|
const data = {
|
46
|
47
|
...res,
|
|
@@ -51,7 +52,7 @@ export default (props) => {
|
51
|
52
|
},
|
52
|
53
|
fail: () => {
|
53
|
54
|
//拒绝授权
|
54
|
|
- console.error("您拒绝了请求");
|
|
55
|
+ console.error("拒绝了请求");
|
55
|
56
|
return;
|
56
|
57
|
}
|
57
|
58
|
})
|
|
@@ -106,7 +107,7 @@ export default (props) => {
|
106
|
107
|
</view>
|
107
|
108
|
<view className='User-info-all'>
|
108
|
109
|
<view onClick={handleGetUserProfile} className='User-name'>{hasAvatar ? person.nickName : '点击授权头像'}</view>
|
109
|
|
- <view className='User-phone'>{hidePhone}</view>
|
|
110
|
+ <view className='User-phone'>{person.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</view>
|
110
|
111
|
<image className='User-sex' src={person.sex === 1 ? boy : girl} />
|
111
|
112
|
</view>
|
112
|
113
|
{/* 切换身份 */}
|