mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 06:32:59 +08:00
parent
dad8bac715
commit
25608e7378
@ -151,4 +151,8 @@ export namespace Setting {
|
||||
trial: boolean;
|
||||
status: string;
|
||||
}
|
||||
export interface LicenseStatus {
|
||||
productPro: string;
|
||||
status: string;
|
||||
}
|
||||
}
|
||||
|
@ -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`);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user