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
+34 -13
View File
@@ -20,21 +20,42 @@
}
},
async onLoad(option) {
try {
uni.showLoading({
title: '加载中...'
});
if (!uni.getStorageSync('token')) {
const res = await wxLogin();
console.log(333, res);
}
if (!uni.getStorageSync('token')) {
await wxLogin();
}
const reuslt = await queryHasOrder(111)
if (reuslt.data.length != 0) {
uni.reLaunch({
url: `/pages/device/return?deviceNo=${option.deviceNo}`
})
} else {
uni.reLaunch({
url: `/pages/device/detail?deviceNo=${option.deviceNo}`
})
const result = await queryHasOrder(option.deviceNo);
uni.hideLoading();
if (!option.deviceNo) {
uni.showToast({
title: '设备编号不能为空',
icon: 'none'
});
return;
}
if (result.data.length != 0) {
uni.redirectTo({
url: `/pages/device/return?deviceNo=${option.deviceNo}`
});
} else {
uni.redirectTo({
url: `/pages/device/detail?deviceNo=${option.deviceNo}`
});
}
} catch (error) {
uni.hideLoading();
uni.showToast({
title: '页面加载失败,请重试',
icon: 'none'
});
console.error('bagCheck onLoad error:', error);
}
},
methods: {