feat(dealer): 重构业务员申请页面并添加新功能

- 修改页面标题为"邀请注册"- 增加头像上传和昵称输入功能
- 添加获取微信昵称和手机号的功能- 优化表单布局和样式
- 移除审核状态相关代码
This commit is contained in:
2025-09-09 20:05:26 +08:00
parent 46f7b8f9b0
commit bfab2b190a
13 changed files with 616 additions and 753 deletions

View File

@@ -3,7 +3,7 @@ import Taro from '@tarojs/taro';
import { User } from '@/api/system/user/model';
import { getUserInfo, updateUserInfo, loginByOpenId } from '@/api/layout';
import { TenantId } from '@/config/app';
import { handleInviteRelation } from '@/utils/invite';
import {getStoredInviteParams, handleInviteRelation} from '@/utils/invite';
// 用户Hook
export const useUser = () => {
@@ -43,7 +43,17 @@ export const useUser = () => {
} else {
reject(new Error('自动登录失败'));
}
}).catch(reject);
}).catch(_ => {
// 首次注册,跳转到邀请注册页面
const pages = Taro.getCurrentPages();
const currentPage = pages[pages.length - 1];
const inviteParams = getStoredInviteParams()
if (currentPage?.route !== 'dealer/apply/add' && inviteParams?.inviter) {
return Taro.navigateTo({
url: '/dealer/apply/add'
});
}
});
},
fail: reject
});