This commit is contained in:
1 parent
d12cb873e1
commit
d3dcd58274
3 files changed
+51
-7
No files matched your search
@@ -102,6 +102,7 @@ import {
|
||||
type WecomCheckinPageData,
|
||||
} from '@/api/training'
|
||||
import { fmtBeijingTime } from '@/utils/datetime'
|
||||
import { apiErrorMessage } from '@/utils/request'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -285,7 +286,7 @@ const exchangeSession = async (code: string, stateToken: string) => {
|
||||
window.history.replaceState(null, '', window.location.pathname)
|
||||
} catch (e: any) {
|
||||
state.value = 'blocked'
|
||||
errorMsg.value = e?.response?.data?.message || '免登失败,请重新扫码'
|
||||
errorMsg.value = apiErrorMessage(e, '免登失败,请重新扫码')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,7 +310,7 @@ const loadAnonPage = async (presetErr?: any) => {
|
||||
applyPage(data)
|
||||
} catch (e: any) {
|
||||
state.value = 'blocked'
|
||||
errorMsg.value = e?.response?.data?.message || presetErr?.response?.data?.message || '签到码无效或已过期,请重新扫码'
|
||||
errorMsg.value = apiErrorMessage(e, '') || apiErrorMessage(presetErr, '签到码无效或已过期,请重新扫码')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,7 +393,9 @@ const sign = async () => {
|
||||
}
|
||||
} catch (e: any) {
|
||||
state.value = 'error'
|
||||
errorMsg.value = e?.response?.data?.message || '签到失败,请重试'
|
||||
// 000165 复测:透出后端具体原因(不在参加人员名单/工号无档案/当天性/防重放等),
|
||||
// 不再落到通用「签到失败,请重试」(后端错误信封为 {error:{message}},手写取值取不到)
|
||||
errorMsg.value = apiErrorMessage(e, '签到失败,请重试')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user