fix: 修复微信小程序appid及URL配置错误

修复了微信小程序的appid配置错误,将appid从"wxabe9cc4db1005fcb"更新为"wx3ae63fb09936b379"。同时,将URL从生产环境切换为本地开发环境,修改为"http://127.0.0.1:8080"。此外,优化了http请求的错误处理逻辑,增加了对响应状态码和业务状态码的检查,确保请求失败时能够正确捕获并处理错误。
This commit is contained in:
fuck
2025-04-07 17:18:09 +08:00
parent 60bb924d5c
commit 40f523595b
207 changed files with 2896 additions and 47650 deletions
+11
View File
@@ -15,7 +15,18 @@ const request = (option) => {
"Clientid": common_vendor.index.getStorageSync("client_id")
},
success(res) {
if (res.statusCode !== 200) {
reject({ msg: `请求失败,状态码:${res.statusCode}` });
return;
}
if (res.data.code !== 200) {
reject(res.data);
return;
}
resolve(res.data);
},
fail(err) {
reject(err);
}
});
});
+2 -2
View File
@@ -1,6 +1,6 @@
"use strict";
const URL = "https://notify.gxfs123.com";
const appid = "wxabe9cc4db1005fcb";
const URL = "http://127.0.0.1:8080";
const appid = "wx3ae63fb09936b379";
exports.URL = URL;
exports.appid = appid;
//# sourceMappingURL=../../.sourcemap/mp-weixin/config/url.js.map
+22
View File
@@ -34,9 +34,31 @@ const getDeviceInfo = (deviceNo) => {
method: "get"
});
};
const queryById = (id) => {
return config_http.request({
url: `/app/order/${id}`,
method: "get"
});
};
const overOrderById = (data) => {
return config_http.request({
url: `/app/order/close/${data}`,
method: "get"
});
};
const rentPowerBank = (deviceNo, phone) => {
return config_http.request({
url: "/app/device/rentPowerBank",
method: "post",
data: { deviceNo, phone }
});
};
exports.getDeviceInfo = getDeviceInfo;
exports.getMyIndexInfo = getMyIndexInfo;
exports.getOrderList = getOrderList;
exports.login = login;
exports.overOrderById = overOrderById;
exports.queryById = queryById;
exports.queryHasOrder = queryHasOrder;
exports.rentPowerBank = rentPowerBank;
//# sourceMappingURL=../../.sourcemap/mp-weixin/config/user.js.map