feat(pda): prefer business identifiers

This commit is contained in:
2026-08-30 17:36:57 +08:00
parent 921847d70c
commit 50a2e5082d
12 changed files with 167 additions and 65 deletions
+2 -1
View File
@@ -19,6 +19,7 @@
import { ensureAccessToken } from '@/api/http.js'
import { loadLoginPreference, saveLoginPreference, session, restoreSession, signInWithTokens } from '@/stores/session.js'
import { requireOnline } from '@/utils/network.js'
import { formatApiError } from '@/utils/user-facing.js'
export default {
data() { return { form: { userId: '', password: '' }, rememberAccount: true, error: '', submitting: false } },
async onLoad() {
@@ -55,7 +56,7 @@
saveLoginPreference(this.rememberAccount, userId)
uni.reLaunch({ url: '/pages/home/home' })
} catch (error) {
this.error = error.network ? '当前网络不可用,请联网后重试' : (error.message || '登录失败')
this.error = error.network ? '当前网络不可用,请联网后重试' : formatApiError(error, '登录失败')
} finally {
this.submitting = false
}