🐞 fix(登录页面): 忘记密码显示提示框

This commit is contained in:
xuan 2022-09-27 16:51:42 +08:00
parent 37d9f85c82
commit e8bc813d11
3 changed files with 9 additions and 6 deletions

View File

@ -75,8 +75,8 @@ export default () => {
setHasMore(true)
setRefresherTriggeredStatus(true)
}
const onj = JSON.parse(Taro.getStorageSync('userInfo'))
const onj = JSON.parse(Taro.getStorageSync('userInfo') || '{}')
const [search, setSearchObj] = useState({
modeId: 0,
goodsId: null,

View File

@ -75,7 +75,10 @@ const Login: FC = () => {
alert.error('登陆失败')
}
}
// 处理忘记密码的逻辑
const handleForgetPwd = () => {
Taro.showToast({ title: '联系客服:0757-86834274', icon: 'none' })
}
return (
<View className={styles.login}>
@ -108,7 +111,7 @@ const Login: FC = () => {
</MCheckbox>
</View>
<View className={styles['login-option']}>
<View className={styles['login-option']} onClick={handleForgetPwd}>
<Text className={styles.isForgetPwd}></Text>
</View>
</View>

View File

@ -128,10 +128,10 @@ const UserInfo: FC = () => {
<LayoutBlock circle>
<View className={styles.topBar}>
<View className={styles.left}>
<UserAvatar src={userInfo.userInfo.avatar_url} />
<UserAvatar src={userInfo.userInfo?.avatar_url} />
</View>
<View className={styles.middle}>
<Text className={styles.username}>{userInfo.userInfo.user_name}</Text>
<Text className={styles.username}>{userInfo.userInfo?.user_name}</Text>
<Text className={styles.userno}>{userInfo.userInfo.user_code}</Text>
</View>
<View className={styles.right}>