diff --git a/src/main/index.dev.js b/src/main/index.dev.js index 1d10bc4..1fbb870 100644 --- a/src/main/index.dev.js +++ b/src/main/index.dev.js @@ -8,7 +8,7 @@ /* eslint-disable */ // Install `electron-debug` with `devtron` -require('electron-debug')({ showDevTools: true }) +require('electron-debug')({ showDevTools: false }) // Install `vue-devtools` require('electron').app.on('ready', () => { diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue index 87be8ae..131fb76 100644 --- a/src/renderer/views/dashboard/index.vue +++ b/src/renderer/views/dashboard/index.vue @@ -36,7 +36,14 @@
-
试用版 {{printer_info.test_use}}天
+
@@ -333,6 +340,7 @@ import UserInfo from '@/components/userInfo/userInfo.vue' import WorkAdd from '@/components/workAdd/workAdd.vue' const exePath = !app.isPackaged ? process.cwd() : path.dirname(process.execPath) const shPath = path.join(exePath, 'CardsoonServer', 'control.sh') +const activePath = path.join(exePath, 'CardsoonServer', 'regist.sh') export default { name: 'dashboard', components: { UserInfo, WorkAdd }, @@ -726,6 +734,31 @@ export default { that.serviceLoading = false }) }, + // 激活设备 + handleActive() { + let that = this + that + .$prompt('请输入管理员密码并点击确定以前往激活设备', '温馨提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + inputType: 'password' + }) + .then(({ value }) => { + that + .$runCmd(`bash ${activePath} ${value}`) + .then((res) => { + + }) + .catch((err) => { + that.$message({ + message: err, + type: 'error' + }) + }) + }) + .catch(() => { + }) + }, // 执行 handleRun() { if (!that.workStatus) { @@ -1209,6 +1242,15 @@ $red: #ff0000; font-size: 14px; color: #000; } + .top_tip1 { + font-size: 14px; + color: #279fd0; + } + .top_tip_btn { + font-size: 14px; + text-decoration: underline; + padding: 0 20px; + } } .content_body { background-color: #f8f8f8;