Merge branch 'master' of https://git.code.tencent.com/yazyunWeb/2024/soonWorkerDisk
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -36,7 +36,14 @@
|
||||
<div class="top_left_line"></div>
|
||||
</div>
|
||||
<div class="flex_box">
|
||||
<div v-if="printer_info.test_use" class="top_tip">试用版 {{printer_info.test_use}}天</div>
|
||||
<template v-if="printer_info.test_use || printer_info.test_use === 0">
|
||||
<div v-if="printer_info.test_use === 255" class="top_tip"></div>
|
||||
<template v-else-if="printer_info.test_use > -1">
|
||||
<div class="top_tip">试用版 {{printer_info.test_use}}天</div>
|
||||
<el-button @click="handleActive" type="text" class="top_tip_btn">前往激活</el-button>
|
||||
</template>
|
||||
<div v-else-if="printer_info.test_use == -1" class="top_tip1">正在验证注册信息</div>
|
||||
</template>
|
||||
<user-info></user-info>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user