diff --git a/web/src/assets/icon-font/iconfont.css b/web/src/assets/icon-font/iconfont.css index 71be3af5..260022ea 100644 --- a/web/src/assets/icon-font/iconfont.css +++ b/web/src/assets/icon-font/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2479351 */ - src: url('iconfont.woff2?t=1739843331607') format('woff2'), - url('iconfont.woff?t=1739843331607') format('woff'), - url('iconfont.ttf?t=1739843331607') format('truetype'); + src: url('iconfont.woff2?t=1740018646112') format('woff2'), + url('iconfont.woff?t=1740018646112') format('woff'), + url('iconfont.ttf?t=1740018646112') format('truetype'); } .iconfont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.iconhuiyuan-:before { + content: "\e615"; +} + .iconAIshengcheng:before { content: "\e6b5"; } diff --git a/web/src/assets/icon-font/iconfont.ttf b/web/src/assets/icon-font/iconfont.ttf index f8154868..33c73588 100644 Binary files a/web/src/assets/icon-font/iconfont.ttf and b/web/src/assets/icon-font/iconfont.ttf differ diff --git a/web/src/assets/icon-font/iconfont.woff b/web/src/assets/icon-font/iconfont.woff index c9ebb1e3..77b79487 100644 Binary files a/web/src/assets/icon-font/iconfont.woff and b/web/src/assets/icon-font/iconfont.woff differ diff --git a/web/src/assets/icon-font/iconfont.woff2 b/web/src/assets/icon-font/iconfont.woff2 index 16588279..32297286 100644 Binary files a/web/src/assets/icon-font/iconfont.woff2 and b/web/src/assets/icon-font/iconfont.woff2 differ diff --git a/web/src/assets/img/vip/1.png b/web/src/assets/img/vip/1.png new file mode 100644 index 00000000..4798d2a8 Binary files /dev/null and b/web/src/assets/img/vip/1.png differ diff --git a/web/src/assets/img/vip/2.jpg b/web/src/assets/img/vip/2.jpg new file mode 100644 index 00000000..c7146635 Binary files /dev/null and b/web/src/assets/img/vip/2.jpg differ diff --git a/web/src/assets/img/vip/3.jpg b/web/src/assets/img/vip/3.jpg new file mode 100644 index 00000000..2065bcea Binary files /dev/null and b/web/src/assets/img/vip/3.jpg differ diff --git a/web/src/assets/img/vip/4.png b/web/src/assets/img/vip/4.png new file mode 100644 index 00000000..fa250d0a Binary files /dev/null and b/web/src/assets/img/vip/4.png differ diff --git a/web/src/assets/img/vip/5.png b/web/src/assets/img/vip/5.png new file mode 100644 index 00000000..c3206aa2 Binary files /dev/null and b/web/src/assets/img/vip/5.png differ diff --git a/web/src/assets/img/vip/6.png b/web/src/assets/img/vip/6.png new file mode 100644 index 00000000..095ba8d1 Binary files /dev/null and b/web/src/assets/img/vip/6.png differ diff --git a/web/src/assets/img/vip/7.gif b/web/src/assets/img/vip/7.gif new file mode 100644 index 00000000..44c3878e Binary files /dev/null and b/web/src/assets/img/vip/7.gif differ diff --git a/web/src/assets/img/vip/8.gif b/web/src/assets/img/vip/8.gif new file mode 100644 index 00000000..118682a3 Binary files /dev/null and b/web/src/assets/img/vip/8.gif differ diff --git a/web/src/config/constant.js b/web/src/config/constant.js index d8b3ecd7..0eedd26e 100644 --- a/web/src/config/constant.js +++ b/web/src/config/constant.js @@ -156,3 +156,5 @@ export const rainbowLinesOptions = [ ] } ] + +export const vipFileUrl = 'https://simple-mind-map.oss-cn-beijing.aliyuncs.com/vip.json' \ No newline at end of file diff --git a/web/src/electron/otherHandle.js b/web/src/electron/otherHandle.js index ffe06437..677cf6c5 100644 --- a/web/src/electron/otherHandle.js +++ b/web/src/electron/otherHandle.js @@ -1,5 +1,6 @@ import { BrowserWindow, ipcMain, shell } from 'electron' import { saveClientConfig, getClientConfig } from './storage' +import { execSync } from 'child_process' export const bindOtherHandleEvent = () => { // 处理缩放事件 @@ -26,4 +27,61 @@ export const bindOtherHandleEvent = () => { ipcMain.handle('getClientConfig', () => { return getClientConfig() }) + + // 获取机器码 + 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(':') + } + }) + + // + ipcMain.handle('openExternal', (event, url) => { + return new Promise((resolve, reject) => { + shell + .openExternal(url) + .then(() => { + resolve() + }) + .catch(err => { + console.error('openExternal失败:', err) + reject(err) + }) + }) + }) } diff --git a/web/src/electron/preload.js b/web/src/electron/preload.js index 0fabcb38..f1f77c8c 100644 --- a/web/src/electron/preload.js +++ b/web/src/electron/preload.js @@ -40,5 +40,7 @@ contextBridge.exposeInMainWorld('electronAPI', { getIsMaximize: id => ipcRenderer.invoke('getIsMaximize', id), selectOpenFolder: () => ipcRenderer.invoke('selectOpenFolder'), getFilesInDir: (dir, ext) => ipcRenderer.invoke('getFilesInDir', dir, ext), - checkFileExist: filePath => ipcRenderer.invoke('checkFileExist', filePath) + checkFileExist: filePath => ipcRenderer.invoke('checkFileExist', filePath), + getClientUUID: () => ipcRenderer.invoke('getClientUUID'), + openExternal: url => ipcRenderer.invoke('openExternal', url), }) diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index 0e1b5f98..2646bc63 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -93,14 +93,14 @@ import Themes from 'simple-mind-map-plugin-themes' // 协同编辑插件 // import Cooperate from 'simple-mind-map/src/plugins/Cooperate.js' // 以下插件为付费插件,详情请查看开发文档。依次为:手绘风格插件、标记插件、编号插件、Freemind软件格式导入导出插件、Excel软件格式导入导出插件、待办插件、节点连线流动效果插件、动量效果插件 -// import HandDrawnLikeStyle from 'simple-mind-map-plugin-handdrawnlikestyle' -// import Notation from 'simple-mind-map-plugin-notation' -// import Numbers from 'simple-mind-map-plugin-numbers' -// import Freemind from 'simple-mind-map-plugin-freemind' -// import Excel from 'simple-mind-map-plugin-excel' -// import Checkbox from 'simple-mind-map-plugin-checkbox' -// import LineFlow from 'simple-mind-map-plugin-lineflow' -// import Momentum from 'simple-mind-map-plugin-momentum' +import HandDrawnLikeStyle from 'simple-mind-map-plugin-handdrawnlikestyle' +import Notation from 'simple-mind-map-plugin-notation' +import Numbers from 'simple-mind-map-plugin-numbers' +import Freemind from 'simple-mind-map-plugin-freemind' +import Excel from 'simple-mind-map-plugin-excel' +import Checkbox from 'simple-mind-map-plugin-checkbox' +import LineFlow from 'simple-mind-map-plugin-lineflow' +import Momentum from 'simple-mind-map-plugin-momentum' // npm link simple-mind-map-plugin-excel simple-mind-map-plugin-freemind simple-mind-map-plugin-numbers simple-mind-map-plugin-notation simple-mind-map-plugin-handdrawnlikestyle simple-mind-map-plugin-checkbox simple-mind-map simple-mind-map-plugin-themes simple-mind-map-plugin-lineflow simple-mind-map-plugin-momentum import OutlineSidebar from './OutlineSidebar' import Style from './Style' @@ -147,6 +147,8 @@ import AssociativeLineStyle from './AssociativeLineStyle.vue' import NodeImgPlacementToolbar from './NodeImgPlacementToolbar.vue' import AiCreate from './AiCreate.vue' import AiChat from './AiChat.vue' +import { vipFileUrl } from '@/config/constant' +import axios from 'axios' // 注册插件 MindMap.usePlugin(MiniMap) @@ -235,7 +237,8 @@ export default { extraTextOnExport: state => state.extraTextOnExport, isDragOutlineTreeNode: state => state.isDragOutlineTreeNode, isDark: state => state.localConfig.isDark, - enableAi: state => state.localConfig.enableAi + enableAi: state => state.localConfig.enableAi, + isVIP: state => state.isVIP }) }, watch: { @@ -269,6 +272,7 @@ export default { } }, async mounted() { + await this.getVipInfo() showLoading() // this.showNewFeatureInfo() await this.getData() @@ -305,7 +309,20 @@ export default { this.mindMap.destroy() }, methods: { - ...mapMutations(['setFileName', 'setIsUnSave']), + ...mapMutations(['setFileName', 'setIsUnSave', 'setIsVIP']), + + // 获取会员信息 + async getVipInfo() { + try { + const clientUUID = await window.electronAPI.getClientUUID() + const { data } = await axios.get(vipFileUrl, { + responseType: 'json' + }) + this.setIsVIP(data.includes(clientUUID)) + } catch (error) { + console.log(error) + } + }, handleStartTextEdit() { this.mindMap.renderer.startTextEdit() @@ -735,39 +752,41 @@ export default { loadPlugins() { if (this.openNodeRichText) this.addRichTextPlugin() if (this.isShowScrollbar) this.addScrollbarPlugin() - if (typeof HandDrawnLikeStyle !== 'undefined') { - this.$store.commit('setSupportHandDrawnLikeStyle', true) - if (this.isUseHandDrawnLikeStyle) this.addHandDrawnLikeStylePlugin() - } - if (typeof Momentum !== 'undefined') { - this.$store.commit('setSupportMomentum', true) - if (this.isUseMomentum) this.addMomentumPlugin() - } - if (typeof Notation !== 'undefined') { - this.mindMap.addPlugin(Notation) - this.$store.commit('setSupportMark', true) - } - if (typeof Numbers !== 'undefined') { - this.mindMap.addPlugin(Numbers) - this.$store.commit('setSupportNumbers', true) - } - if (typeof Freemind !== 'undefined') { - this.mindMap.addPlugin(Freemind) - this.$store.commit('setSupportFreemind', true) - Vue.prototype.Freemind = Freemind - } - if (typeof Excel !== 'undefined') { - this.mindMap.addPlugin(Excel) - this.$store.commit('setSupportExcel', true) - Vue.prototype.Excel = Excel - } - if (typeof Checkbox !== 'undefined') { - this.mindMap.addPlugin(Checkbox) - this.$store.commit('setSupportCheckbox', true) - } - if (typeof LineFlow !== 'undefined') { - this.mindMap.addPlugin(LineFlow) - this.$store.commit('setSupportLineFlow', true) + if (this.isVIP) { + if (typeof HandDrawnLikeStyle !== 'undefined') { + this.$store.commit('setSupportHandDrawnLikeStyle', true) + if (this.isUseHandDrawnLikeStyle) this.addHandDrawnLikeStylePlugin() + } + if (typeof Momentum !== 'undefined') { + this.$store.commit('setSupportMomentum', true) + if (this.isUseMomentum) this.addMomentumPlugin() + } + if (typeof Notation !== 'undefined') { + this.mindMap.addPlugin(Notation) + this.$store.commit('setSupportMark', true) + } + if (typeof Numbers !== 'undefined') { + this.mindMap.addPlugin(Numbers) + this.$store.commit('setSupportNumbers', true) + } + if (typeof Freemind !== 'undefined') { + this.mindMap.addPlugin(Freemind) + this.$store.commit('setSupportFreemind', true) + Vue.prototype.Freemind = Freemind + } + if (typeof Excel !== 'undefined') { + this.mindMap.addPlugin(Excel) + this.$store.commit('setSupportExcel', true) + Vue.prototype.Excel = Excel + } + if (typeof Checkbox !== 'undefined') { + this.mindMap.addPlugin(Checkbox) + this.$store.commit('setSupportCheckbox', true) + } + if (typeof LineFlow !== 'undefined') { + this.mindMap.addPlugin(LineFlow) + this.$store.commit('setSupportLineFlow', true) + } } }, diff --git a/web/src/pages/Workbenche/Index.vue b/web/src/pages/Workbenche/Index.vue index c2cadaf9..adf67540 100644 --- a/web/src/pages/Workbenche/Index.vue +++ b/web/src/pages/Workbenche/Index.vue @@ -5,10 +5,39 @@ diff --git a/web/src/pages/Workbenche/components/AboutDialog.vue b/web/src/pages/Workbenche/components/AboutDialog.vue index e01f42dc..322eb2b1 100644 --- a/web/src/pages/Workbenche/components/AboutDialog.vue +++ b/web/src/pages/Workbenche/components/AboutDialog.vue @@ -21,9 +21,9 @@
下载最新版本: 百度云 - releases + Github
-如需进微信交流群参与讨论,可微信添加:wanglinguanfang。备注:客户端
+如需进微信交流群参与讨论,可微信添加:wanglinguanfang。备注:客户端
diff --git a/web/src/pages/Workbenche/components/VipDialog.vue b/web/src/pages/Workbenche/components/VipDialog.vue new file mode 100644 index 00000000..b4c2eb92 --- /dev/null +++ b/web/src/pages/Workbenche/components/VipDialog.vue @@ -0,0 +1,437 @@ + +
+
+