diff --git a/electron/controller/example.js b/electron/controller/example.js deleted file mode 100644 index 52baff0..0000000 --- a/electron/controller/example.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const { Controller } = require('ee-core'); -const Log = require('ee-core/log'); -const Services = require('ee-core/services'); - -/** - * example - * @class - */ -class ExampleController extends Controller { - - constructor(ctx) { - super(ctx); - } - - - /** - * 所有方法接收两个参数 - * @param args 前端传的参数 - * @param event - ipc通信时才有值。详情见:控制器文档 - */ - - /** - * test - */ - async test () { - const result = await Services.get('example').test('electron'); - Log.info('service result:', result); - - return 'hello electron-egg'; - } -} - -ExampleController.toString = () => '[class ExampleController]'; -module.exports = ExampleController; \ No newline at end of file diff --git a/electron/service/example.js b/electron/service/example.js deleted file mode 100644 index 99a81c3..0000000 --- a/electron/service/example.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const { Service } = require('ee-core'); - -/** - * 示例服务(service层为单例) - * @class - */ -class ExampleService extends Service { - - constructor(ctx) { - super(ctx); - } - - /** - * test - */ - async test(args) { - let obj = { - status:'ok', - params: args - } - - return obj; - } -} - -ExampleService.toString = () => '[class ExampleService]'; -module.exports = ExampleService; \ No newline at end of file diff --git a/frontend/.env.development b/frontend/.env.development index 92c4237..55c97ff 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -23,3 +23,5 @@ VITE_API_URL=/api VITE_PROXY=[["/api","http://192.168.1.124:18092/"]] #VITE_PROXY=[["/api","http://192.168.1.125:18092/"]] # VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文 +# 开启激活验证 +VITE_ACTIVATE_OPEN=true \ No newline at end of file diff --git a/frontend/.env.production b/frontend/.env.production index aadfb6c..9102cda 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -24,3 +24,5 @@ VITE_PWA=true # 线上环境接口地址 #VITE_API_URL="/api" # 打包时用 VITE_API_URL="http://192.168.1.125:18092/" +# 开启激活验证 +VITE_ACTIVATE_OPEN=true \ No newline at end of file diff --git a/frontend/src/api/activate/index.ts b/frontend/src/api/activate/index.ts new file mode 100644 index 0000000..13eade5 --- /dev/null +++ b/frontend/src/api/activate/index.ts @@ -0,0 +1,14 @@ +import http from '@/api' +import type { Activate } from '@/api/activate/interface' + +export const generateApplicationCode = (params: Activate.ApplicationCodePlaintext) => { + return http.post(`/activate/generateApplicationCode`, params) +} + +export const verifyActivationCode = (activationCode: string) => { + return http.post(`/activate/verifyActivationCode`, { activationCode }) +} + +export const getLicense = () => { + return http.post(`/activate/getLicense`) +} \ No newline at end of file diff --git a/frontend/src/api/activate/interface/index.ts b/frontend/src/api/activate/interface/index.ts new file mode 100644 index 0000000..b21e6cc --- /dev/null +++ b/frontend/src/api/activate/interface/index.ts @@ -0,0 +1,55 @@ +//激活模块 +export namespace Activate { + + export interface ApplicationModule { + /** + * 是否申请 1是 0否 + */ + apply: number; + } + + export interface ActivateModule extends ApplicationModule { + /** + * 是否永久 1是 0否 + */ + permanently: number; + } + + export interface ApplicationCodePlaintext { + + /** + * 模拟式模块 + */ + simulate: ApplicationModule; + + /** + * 数字式模块 + */ + digital: ApplicationModule; + + /** + * 比对式模块 + */ + contrast: ApplicationModule; + } + export interface ActivationCodePlaintext { + + /** + * 模拟式模块 + */ + simulate: ActivateModule; + + /** + * 数字式模块 + */ + digital: ActivateModule; + + /** + * 比对式模块 + */ + contrast: ActivateModule; + } + + + +} \ No newline at end of file diff --git a/frontend/src/layouts/components/Footer/index.vue b/frontend/src/layouts/components/Footer/index.vue index 4470ec1..36df60e 100644 --- a/frontend/src/layouts/components/Footer/index.vue +++ b/frontend/src/layouts/components/Footer/index.vue @@ -1,24 +1,21 @@ + + + \ No newline at end of file