mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
update
This commit is contained in:
parent
f6a72e02c8
commit
11df31f1e2
20708
web/package-lock.json
generated
20708
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -32,6 +32,7 @@
|
||||
"fs-extra": "^7.0.1",
|
||||
"highlight.js": "^10.7.3",
|
||||
"katex": "^0.16.9",
|
||||
"node-machine-id": "^1.1.12",
|
||||
"simple-mind-map-plugin-themes": "^1.0.0",
|
||||
"uuid": "^3.4.0",
|
||||
"v-viewer": "^1.6.4",
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { BrowserWindow, ipcMain, shell } from 'electron'
|
||||
import { saveClientConfig, getClientConfig } from './storage'
|
||||
import { execSync } from 'child_process'
|
||||
import {machineId, machineIdSync} from 'node-machine-id';
|
||||
|
||||
export const bindOtherHandleEvent = () => {
|
||||
// 处理缩放事件
|
||||
@ -30,44 +31,7 @@ export const bindOtherHandleEvent = () => {
|
||||
|
||||
// 获取机器码
|
||||
ipcMain.handle('getClientUUID', () => {
|
||||
try {
|
||||
if (process.platform === 'win32') {
|
||||
const stdout = execSync('wmic csproduct get uuid', {
|
||||
windowsHide: true
|
||||
})
|
||||
return stdout
|
||||
.toString()
|
||||
.split('\n')[1]
|
||||
.trim()
|
||||
} else if (process.platform === 'darwin') {
|
||||
const stdout = execSync('wmic csproduct get uuid', {
|
||||
windowsHide: true
|
||||
})
|
||||
return stdout
|
||||
.toString()
|
||||
.split('\n')[1]
|
||||
.trim()
|
||||
} else if (process.platform === 'linux') {
|
||||
if (require('fs').existsSync('/etc/machine-id')) {
|
||||
return require('fs')
|
||||
.readFileSync('/etc/machine-id')
|
||||
.toString()
|
||||
.trim()
|
||||
}
|
||||
const stdout = execSync('sudo dmidecode -s system-uuid', {
|
||||
timeout: 1000
|
||||
})
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
} catch (e) {
|
||||
return [
|
||||
process.arch,
|
||||
process.env.COMPUTERNAME || process.env.HOSTNAME,
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.slice(2)
|
||||
].join(':')
|
||||
}
|
||||
return machineId()
|
||||
})
|
||||
|
||||
//
|
||||
|
||||
@ -315,7 +315,7 @@ export default {
|
||||
async getVipInfo() {
|
||||
try {
|
||||
const clientUUID = await window.electronAPI.getClientUUID()
|
||||
const { data } = await axios.get(vipFileUrl, {
|
||||
const { data } = await axios.get(vipFileUrl + '?' + Date.now(), {
|
||||
responseType: 'json'
|
||||
})
|
||||
this.setIsVIP(data.includes(clientUUID))
|
||||
|
||||
@ -26,7 +26,7 @@ export default {
|
||||
async getVipInfo(showTip = false) {
|
||||
try {
|
||||
const clientUUID = await window.electronAPI.getClientUUID()
|
||||
const { data } = await axios.get(vipFileUrl, {
|
||||
const { data } = await axios.get(vipFileUrl + '?' + Date.now(), {
|
||||
responseType: 'json'
|
||||
})
|
||||
this.setIsVIP(data.includes(clientUUID))
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
class="vipDialog"
|
||||
title="思绪会员"
|
||||
:title="''"
|
||||
:visible.sync="dialogVisible"
|
||||
width="700px"
|
||||
@close="onClose"
|
||||
@ -10,16 +10,21 @@
|
||||
<div class="vipBox customScrollbar">
|
||||
<div class="statusBox">
|
||||
<div class="left" :class="{ isVIP: isVIP }">
|
||||
<span class="iconfont iconhuiyuan-"></span>您{{
|
||||
<span class="iconfont iconhuiyuan-"></span
|
||||
>{{ isVIP ? '恭喜,' : '很遗憾,' }}您{{
|
||||
isVIP ? '已' : '还不'
|
||||
}}是会员~
|
||||
}}是思绪会员~
|
||||
</div>
|
||||
<div class="center">
|
||||
<div class="btn" @click="vipFunctionDialogVisible = true">
|
||||
会员功能一览
|
||||
<div
|
||||
class="btn"
|
||||
@click="vipFunctionDialogVisible = true"
|
||||
style="text-decoration: underline; color: #e6a23c;"
|
||||
>
|
||||
点击查看会员功能
|
||||
</div>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
<!-- <div class="right"></div> -->
|
||||
</div>
|
||||
<div class="desc">
|
||||
<p>
|
||||
@ -354,7 +359,7 @@ export default {
|
||||
.vipBox {
|
||||
padding: 20px;
|
||||
padding-top: 0;
|
||||
height: 400px;
|
||||
height: 450px;
|
||||
overflow-y: auto;
|
||||
|
||||
.statusBox {
|
||||
@ -376,7 +381,7 @@ export default {
|
||||
}
|
||||
|
||||
span {
|
||||
margin-right: 12px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -392,6 +397,7 @@ export default {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -400,7 +406,7 @@ export default {
|
||||
padding: 12px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 12px 0;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.row {
|
||||
@ -421,11 +427,13 @@ export default {
|
||||
|
||||
a {
|
||||
color: #409eff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.emphasize {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user