From b23f9ae518eccdb7241996bbfa5566102c2ea241 Mon Sep 17 00:00:00 2001 From: 62e00738167f7e3ed361db3c <62e00738167f7e3ed361db3c@devide> Date: Sun, 30 Oct 2022 13:53:12 +0000 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E5=85=A5=20wechat-mp-hack=20=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my-mp/package.json | 3 ++- my-mp/src/renderer/src/main.ts | 8 ++++++++ my-mp/src/renderer/src/views/my_wechat/lilili.vue | 8 +++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/my-mp/package.json b/my-mp/package.json index 3cdbfdb..4cb7ece 100644 --- a/my-mp/package.json +++ b/my-mp/package.json @@ -25,7 +25,8 @@ "electron-updater": "^4.6.5", "element-plus": "^2.2.19", "string-format": "^2.0.0", - "vue-router": "^4.1.6" + "vue-router": "^4.1.6", + "wechat-mp-hack": "^1.1.10" }, "devDependencies": { "@electron-toolkit/tsconfig": "^1.0.1", diff --git a/my-mp/src/renderer/src/main.ts b/my-mp/src/renderer/src/main.ts index 6694cc2..963b82d 100644 --- a/my-mp/src/renderer/src/main.ts +++ b/my-mp/src/renderer/src/main.ts @@ -8,3 +8,11 @@ createApp(App) .use(router) .use(ElementPlus) .mount('#app') + +// 设置全局变量 +window['my'] = { + "settings":{ + "title":"MyElectron百宝箱","showSettings":true,"tagsView":true,"fixedHeader":false,"sidebarLogo":false,"errorLog":"production","wechat_dirs":{"root_article":"D:\\_ALL\\LIFE\\Wechat\\文章发布\\"},"dirs":{"cwd":"J:\\_ALL\\CODE\\gitee\\constellations\\Gemini\\MyAndroidAssemble\\electronTools"}, + "wechat_mps":{"acg美女cosplay营地":{}} + } +} diff --git a/my-mp/src/renderer/src/views/my_wechat/lilili.vue b/my-mp/src/renderer/src/views/my_wechat/lilili.vue index e0d265f..d6e7964 100644 --- a/my-mp/src/renderer/src/views/my_wechat/lilili.vue +++ b/my-mp/src/renderer/src/views/my_wechat/lilili.vue @@ -39,7 +39,9 @@