fix: 修改许可证状态获取接口 (#4593)

Refs #4589
This commit is contained in:
ssongliu 2024-04-19 15:22:08 +08:00 committed by GitHub
parent dad8bac715
commit 25608e7378
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 4 deletions

View file

@ -151,4 +151,8 @@ export namespace Setting {
trial: boolean;
status: string;
}
export interface LicenseStatus {
productPro: string;
status: string;
}
}

View file

@ -13,6 +13,9 @@ export const UploadFileData = (params: FormData) => {
export const getLicense = () => {
return http.get<Setting.License>(`/licenses/get`);
};
export const getLicenseStatus = () => {
return http.get<Setting.LicenseStatus>(`/licenses/get/status`);
};
export const syncLicense = () => {
return http.post(`/licenses/sync`);

View file

@ -22,7 +22,7 @@ import { GlobalStore, MenuStore, TabsStore } from '@/store';
import { DeviceType } from '@/enums/app';
import { useI18n } from 'vue-i18n';
import { useTheme } from '@/hooks/use-theme';
import { getLicense, getSettingInfo, getSystemAvailable } from '@/api/modules/setting';
import { getLicenseStatus, getSettingInfo, getSystemAvailable } from '@/api/modules/setting';
import { useRoute, useRouter } from 'vue-router';
import { initFavicon, resetXSetting } from '@/utils/xpack';
useResize();
@ -109,7 +109,7 @@ const loadDataFromXDB = async () => {
};
const loadProductProFromDB = async () => {
const res = await getLicense();
const res = await getLicenseStatus();
if (!res.data) {
globalStore.isProductPro = false;
return;

View file

@ -157,7 +157,7 @@ import { GlobalStore, MenuStore, TabsStore } from '@/store';
import i18n from '@/lang';
import { MsgSuccess } from '@/utils/message';
import { useI18n } from 'vue-i18n';
import { getLicense } from '@/api/modules/setting';
import { getLicenseStatus } from '@/api/modules/setting';
import { initFavicon } from '@/utils/xpack';
const globalStore = GlobalStore();
@ -327,7 +327,7 @@ const loadLanguage = async () => {
};
const loadProductProFromDB = async () => {
const res = await getLicense();
const res = await getLicenseStatus();
if (!res.data) {
globalStore.isProductPro = false;
return;