feat 查询添加版本号新字段
This commit is contained in:
@@ -8,6 +8,7 @@ export interface DeviceAuthStatus {
|
||||
startDate: string
|
||||
endDate: string
|
||||
remainingDays: number
|
||||
latestVersionNo: string
|
||||
}
|
||||
|
||||
export interface ActivateDeviceResult extends ApiResult {
|
||||
|
||||
@@ -65,6 +65,7 @@ function normalizeAuthInfo(payload: Partial<DeviceAuthStatus> | null | undefined
|
||||
startDate: payload.startDate ?? '',
|
||||
endDate: payload.endDate ?? '',
|
||||
remainingDays: Number(payload.remainingDays ?? 0),
|
||||
latestVersionNo: payload.latestVersionNo ?? '',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +78,7 @@ function createUnauthorizedInfo(): DeviceAuthStatus {
|
||||
endDate: '',
|
||||
// -1 表示无有效剩余天数,避免误触发到期提醒
|
||||
remainingDays: -1,
|
||||
latestVersionNo: '',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +107,7 @@ export function useDeviceAuth(options?: { watchShow?: boolean }) {
|
||||
const days = authInfo.value?.remainingDays
|
||||
return days == null || Number.isNaN(Number(days)) ? null : Number(days)
|
||||
})
|
||||
const latestVersionNo = computed(() => authInfo.value?.latestVersionNo || '')
|
||||
/**
|
||||
* 从当前授权信息判断是否需到期提醒:
|
||||
* storage 中 remainingDays 为 0~7(含)时弹出
|
||||
@@ -247,6 +250,7 @@ export function useDeviceAuth(options?: { watchShow?: boolean }) {
|
||||
startDate: authInfo.value?.startDate ?? '',
|
||||
endDate: res.endDate || authInfo.value?.endDate || '',
|
||||
remainingDays: authInfo.value?.remainingDays ?? 0,
|
||||
latestVersionNo: authInfo.value?.latestVersionNo ?? '',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -274,6 +278,7 @@ export function useDeviceAuth(options?: { watchShow?: boolean }) {
|
||||
hasActivationCode,
|
||||
deviceId,
|
||||
remainingDays,
|
||||
latestVersionNo,
|
||||
loading,
|
||||
authReady,
|
||||
expireNoticeVisible,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"navigationBarTitleText": "Road-Roller"
|
||||
},
|
||||
"pages": [
|
||||
// GENERATED BY UNI-PAGES, PLATFORM: APP || H5
|
||||
// GENERATED BY UNI-PAGES, PLATFORM: H5 || APP
|
||||
{
|
||||
"path": "pages/Ahome/index",
|
||||
"type": "home",
|
||||
@@ -121,7 +121,7 @@
|
||||
"color": "@tabFontColor",
|
||||
"selectedColor": "@tabSelectedColor",
|
||||
"list": [
|
||||
// GENERATED BY UNI-PAGES, PLATFORM: APP || H5
|
||||
// GENERATED BY UNI-PAGES, PLATFORM: H5 || APP
|
||||
{
|
||||
"pagePath": "pages/Ahome/index",
|
||||
"text": "首页",
|
||||
|
||||
Reference in New Issue
Block a user