mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 17:49:19 +08:00
refactor: 移除初始化向导
This commit is contained in:
@@ -1,23 +1,11 @@
|
||||
import type { LicenseDTO, LicenseVO } from './types';
|
||||
|
||||
import { baseRequestClient, requestClient } from '#/api/request';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/** 初始化相关 API(无需登录) */
|
||||
/** 已登录用户的 License 管理 API */
|
||||
|
||||
export async function getInitStatusApi() {
|
||||
return baseRequestClient.get<LicenseVO.InitStatus>('/init/status');
|
||||
}
|
||||
|
||||
export async function createInitAdminApi(data: LicenseDTO.InitAdmin) {
|
||||
return baseRequestClient.post<void>('/init/admin', data);
|
||||
}
|
||||
|
||||
export async function saveInitCompanyApi(data: LicenseDTO.InitCompany) {
|
||||
return baseRequestClient.post<void>('/init/company', data);
|
||||
}
|
||||
|
||||
export async function getInitFingerprintApi() {
|
||||
return baseRequestClient.get<LicenseVO.Fingerprint>('/init/fingerprint');
|
||||
export async function getLicenseInfoApi() {
|
||||
return requestClient.get<LicenseVO.LicenseSummary>('/system/license');
|
||||
}
|
||||
|
||||
export async function activateLicenseApi(data: LicenseDTO.ActivateLicense) {
|
||||
@@ -27,20 +15,6 @@ export async function activateLicenseApi(data: LicenseDTO.ActivateLicense) {
|
||||
);
|
||||
}
|
||||
|
||||
/** @deprecated 初始化向导用,后端若未实现可忽略 */
|
||||
export async function activateInitLicenseApi(data: LicenseDTO.ActivateLicense) {
|
||||
return baseRequestClient.post<LicenseVO.LicenseSummary>(
|
||||
'/init/activate',
|
||||
data,
|
||||
);
|
||||
}
|
||||
|
||||
/** 已登录用户的 License 管理 API */
|
||||
|
||||
export async function getLicenseInfoApi() {
|
||||
return requestClient.get<LicenseVO.LicenseSummary>('/system/license');
|
||||
}
|
||||
|
||||
export async function updateLicenseApi(data: LicenseDTO.ActivateLicense) {
|
||||
return requestClient.put<LicenseVO.LicenseSummary>('/system/license', data);
|
||||
}
|
||||
|
||||
@@ -2,19 +2,6 @@
|
||||
* License 模块 — 请求 DTO
|
||||
*/
|
||||
export namespace LicenseDTO {
|
||||
export interface InitAdmin {
|
||||
loginCode: string;
|
||||
phone?: string;
|
||||
password: string;
|
||||
realName: string;
|
||||
}
|
||||
|
||||
export interface InitCompany {
|
||||
companyName: string;
|
||||
contactPhone?: string;
|
||||
contactEmail?: string;
|
||||
}
|
||||
|
||||
export interface ActivateLicense {
|
||||
licenseKey: string;
|
||||
}
|
||||
|
||||
@@ -2,20 +2,11 @@
|
||||
* License 模块 — 响应 VO
|
||||
*/
|
||||
export namespace LicenseVO {
|
||||
/** 初始化状态 */
|
||||
export interface InitStatus {
|
||||
initialized: boolean;
|
||||
currentStep: number;
|
||||
adminCreated: boolean;
|
||||
companySaved: boolean;
|
||||
licenseActivated: boolean;
|
||||
}
|
||||
|
||||
/** 机器指纹 */
|
||||
export interface Fingerprint {
|
||||
fingerprint: string;
|
||||
machineId: string;
|
||||
hostname: string;
|
||||
machineId?: string;
|
||||
hostname?: string;
|
||||
}
|
||||
|
||||
/** License 摘要 */
|
||||
|
||||
Reference in New Issue
Block a user