From 26f5beb6608ae7ddebff4547a9bb37e9c85369fc Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Mon, 17 Nov 2025 10:30:14 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E5=B1=95=E7=A4=BA=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D=EF=BC=8C=E6=9C=AC=E5=9C=B0=E5=BC=80?=
=?UTF-8?q?=E5=8F=91=E5=B7=A5=E5=85=B7=E5=A2=9E=E5=8A=A0=E7=8E=AF=E5=A2=83?=
=?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/config.js | 54 ++++++++++++++++++++++++++
components/devetools.vue | 61 ++++++++++++++++++++++++++----
user/components/registermember.vue | 14 ++++---
user/vip/buy-vip.vue | 2 +-
4 files changed, 117 insertions(+), 14 deletions(-)
create mode 100644 common/config.js
diff --git a/common/config.js b/common/config.js
new file mode 100644
index 0000000..4b0f316
--- /dev/null
+++ b/common/config.js
@@ -0,0 +1,54 @@
+// const debug = process.env.NODE_ENV == 'development' ? true : false;
+const debug = false;
+// #ifdef H5
+const proxyApi = "/api";
+// #endif
+
+// #ifdef MP-WEIXIN || APP || MP-ALIPAY
+const proxyApi = "http://192.168.1.42"; // 调试地址
+const proxyApiwws = "ws://192.168.1.42:2348"; // 调试地址
+// #endif
+
+// #ifdef H5
+const baseUrl = debug ? proxyApi : "http://192.168.1.42";
+const baseUrlwws = "ws://192.168.1.42:2348";
+// #endif
+
+// #ifdef APP || MP-WEIXIN || MP-ALIPAY
+const baseUrl = debug ? proxyApi : "https://cashier.sxczgkj.com"; // 线上
+const baseUrlwws = debug ? proxyApiwws : "wss://czgeatws.sxczgkj.com/wss"; // 线上
+// #endif
+
+const version = "100";
+const autoRemoveCache = {
+ count: 100000,
+ size: 100000,
+};
+ uni.conf = {
+ debug,
+ baseUrl,
+ version,
+ autoRemoveCache,
+ baseUrlwws,
+};
+
+export const changeEnv = (env) => {
+ if (env === "test") {
+ uni.conf = {
+ debug: true,
+ baseUrl: "http://192.168.1.42",
+ version: 100,
+ autoRemoveCache,
+ baseUrlwws: "ws://192.168.1.42:2348",
+ };
+ }
+ if (env === "prod") {
+ uni.conf = {
+ debug: false,
+ baseUrl: "https://cashier.sxczgkj.com",
+ version: 100,
+ autoRemoveCache,
+ baseUrlwws: "wss://czgeatws.sxczgkj.com/wss",
+ };
+ }
+};
diff --git a/components/devetools.vue b/components/devetools.vue
index c1afafb..2e8b22d 100644
--- a/components/devetools.vue
+++ b/components/devetools.vue
@@ -34,6 +34,14 @@
>
-
+