feat(dealer/wechat, user/profile): 添加联系电话展示并优化用户信息更新逻辑
- 在微信二维码页面添加联系电话展示 - 在用户资料页面添加用户信息更新逻辑 - 优化用户信息保存和上传后的处理流程
This commit is contained in:
@@ -19,6 +19,19 @@ import {DictData} from "@/api/system/dict-data/model";
|
||||
import {pageDictData} from "@/api/system/dict-data";
|
||||
import {User} from "@/api/system/user/model";
|
||||
import {useUser} from "@/hooks/useUser";
|
||||
|
||||
// 类型定义
|
||||
interface ChooseAvatarEvent {
|
||||
detail: {
|
||||
avatarUrl: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface InputEvent {
|
||||
detail: {
|
||||
value: string;
|
||||
};
|
||||
}
|
||||
function Profile() {
|
||||
const formId = Number(router?.params.id)
|
||||
const {fetchUserInfo} =useUser()
|
||||
@@ -70,7 +83,7 @@ function Profile() {
|
||||
console.log(error, 'err...')
|
||||
}
|
||||
|
||||
const uploadAvatar = ({detail}: {detail: {avatarUrl: string}}) => {
|
||||
const uploadAvatar = ({detail}: ChooseAvatarEvent) => {
|
||||
setFormData({
|
||||
...FormData,
|
||||
avatar: `${detail.avatarUrl}`,
|
||||
@@ -160,7 +173,7 @@ function Profile() {
|
||||
className="info-content__input"
|
||||
placeholder="请输入昵称"
|
||||
value={FormData?.nickname}
|
||||
onInput={(e: {detail: {value: string}}) => getWxNickname(e.detail.value)}
|
||||
onInput={(e: InputEvent) => getWxNickname(e.detail.value)}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
|
||||
Reference in New Issue
Block a user