refactor: 项目重构,仅保留 login 和 supplementPersonal 页面
删除 11 个旧页面、组件、lefu SDK、旧资源文件。 新增 request 封装(GET/POST/PUT)、api 层、utils/common 身份证工具。 重写 login(登录流程提取到 app.ts) 和 supplementPersonal(简化表单逻辑)。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
439f560218
commit
83d909b95b
+17
-13
@@ -1,18 +1,22 @@
|
||||
App<IAppOption>({
|
||||
globalData: {
|
||||
/** 当前已连接设备的蓝牙状态,页面可读取 */
|
||||
connectState: '' as string,
|
||||
},
|
||||
globalData: {},
|
||||
|
||||
onLaunch() {
|
||||
// 已登录则跳过登录页
|
||||
const userInfo = wx.getStorageSync('userInfo')
|
||||
if (userInfo) {
|
||||
const connectDeviceInfo = wx.getStorageSync('connectDeviceInfo')
|
||||
const hasDevice = connectDeviceInfo && Object.keys(connectDeviceInfo).length > 0
|
||||
wx.reLaunch({
|
||||
url: hasDevice ? '/pages/home/home' : '/pages/connectedDevice/connectedDevice'
|
||||
onLaunch() {},
|
||||
|
||||
getWxLoginCode(): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.login({
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
resolve(res.code)
|
||||
} else {
|
||||
reject(new Error('获取登录凭证失败'))
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(new Error(err.errMsg || '获取登录凭证失败'))
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user