chore: 永久专业版特殊颜色

This commit is contained in:
xiaojunnuo
2025-08-10 02:07:48 +08:00
parent 54365528a8
commit 74c331eaf7
2 changed files with 21 additions and 5 deletions

View File

@@ -125,10 +125,10 @@ export const useSettingStore = defineStore({
return this.installInfo;
},
isPlus(): boolean {
return this.plusInfo?.isPlus && this.plusInfo?.expireTime > new Date().getTime();
return this.plusInfo?.isPlus && (this.plusInfo?.expireTime === -1 || this.plusInfo?.expireTime > new Date().getTime());
},
isComm(): boolean {
return this.plusInfo?.isComm && this.plusInfo?.expireTime > new Date().getTime();
return this.plusInfo?.isComm && (this.plusInfo?.expireTime === -1 || this.plusInfo?.expireTime > new Date().getTime());
},
isAgent(): boolean {
return this.siteEnv?.agent?.enabled === true;
@@ -136,6 +136,18 @@ export const useSettingStore = defineStore({
isCommOrAgent() {
return this.isComm || this.isAgent;
},
expiresText() {
if (this.plusInfo?.expireTime == null) {
return "";
}
if (this.plusInfo?.expireTime === -1) {
return "永久";
}
return utils.time.formatDate(this.plusInfo?.expireTime, "yyyy-MM-dd");
},
isForever() {
return this.isPlus && this.plusInfo?.expireTime === -1;
},
vipLabel(): string {
const { t } = useI18n();
const vipLabelMap: any = {