From 47d1c5ab6f7729ba7fb749626cbef31c3ff66851 Mon Sep 17 00:00:00 2001 From: duanshuwen Date: Thu, 13 Nov 2025 21:22:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=8D=E5=8A=A1=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.config.json | 2 +- src/constant/base.js | 2 +- src/manifest.json | 2 +- src/request/api/config.js | 10 +++++----- src/request/base/request.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/project.config.json b/project.config.json index b241ab1..d102f1b 100644 --- a/project.config.json +++ b/project.config.json @@ -1,5 +1,5 @@ { - "appid": "wx23f86d809ae80259", + "appid": "wx5e79df5996572539", "compileType": "miniprogram", "libVersion": "3.8.10", "packOptions": { diff --git a/src/constant/base.js b/src/constant/base.js index 1140fe7..5da6ec7 100644 --- a/src/constant/base.js +++ b/src/constant/base.js @@ -12,7 +12,7 @@ import rawConfigs from '../../client-configs.json' with { type: 'json' }; export const CLIENT_CONFIGS = rawConfigs; // 获取当前用户端配置 -export const getCurrentConfig = () => CLIENT_CONFIGS.duohua; +export const getCurrentConfig = () => CLIENT_CONFIGS.zhinian; export const clientId = getCurrentConfig().clientId; export const appId = getCurrentConfig().appId; diff --git a/src/manifest.json b/src/manifest.json index 263a004..4a7d719 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -60,7 +60,7 @@ 朵花:wx23f86d809ae80259 */ "mp-weixin": { - "appid": "wx23f86d809ae80259", + "appid": "wx5e79df5996572539", "setting": { "urlCheck": false, "minified": true diff --git a/src/request/api/config.js b/src/request/api/config.js index 87e0f93..7512b37 100644 --- a/src/request/api/config.js +++ b/src/request/api/config.js @@ -6,11 +6,11 @@ import { useAppStore } from "@/store"; const getEvnUrl = (args) => { if (isProd) { const appStore = useAppStore(); - - request.post("/hotelBiz/mainScene/getServiceUrl", args).then(({ data }) => { - console.log("🚀 ~ getEvnUrl ~ data:", data); - appStore.setServerConfig(data); - }); + request + .post("https://biz.nianxx.cn/hotelBiz/mainScene/getServiceUrl", args) + .then(({ data }) => { + appStore.setServerConfig(data); + }); } }; diff --git a/src/request/base/request.js b/src/request/base/request.js index 766400d..379aafc 100644 --- a/src/request/base/request.js +++ b/src/request/base/request.js @@ -16,7 +16,7 @@ function request(url, args = {}, method = "POST", customConfig = {}) { const appStore = useAppStore(); // 判断 url 是否以 http 开头 if (!/^http/.test(url)) { - url = appStore.serverConfig.baseUrl + url; + url = appStore.serverConfig?.baseUrl + url; } // 动态获取 token const token = uni.getStorageSync("token");