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 @@
>
-
+