From 866db6d8afa6980fd485570acda6b5fcebda4da3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 01 七月 2024 16:08:27 +0800
Subject: [PATCH] 2024-07-01

---
 src/index.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/index.js b/src/index.js
index aecaa7f..d0f3e4e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -48,6 +48,7 @@
     GLOB.nginx = config.nginx + '' === 'true'
     GLOB.WXAppID = config.WXAppID || ''
     GLOB.WXminiAppID = config.WXminiAppID || ''
+    GLOB.WXMerchID = config.WXMerchID || ''
     GLOB.WXNotice = config.WXNotice + '' === 'true'
     GLOB.execType = config.execType === 'x' ? 'x' : ''
     GLOB.accessToken = {}
@@ -59,6 +60,13 @@
     GLOB.style = 'bg_black_style_blue'
     GLOB.defLang = ''
 
+    if (config.WXApps) {
+      config.WXApps = config.WXApps.filter(app => app.appId && app.appName && ['public', 'miniProgram', 'merchant'].includes(app.appType))
+      if (config.WXApps.length) {
+        GLOB.WXApps = config.WXApps
+      }
+    }
+
     if (langs[config.defaultLang]) {
       GLOB.defLang = config.defaultLang
     }

--
Gitblit v1.8.0