fix:替换appID为7a9,修复支付分调用失败订单无法正确取消的问题
This commit is contained in:
Vendored
+1
-2
@@ -33,9 +33,8 @@ const _sfc_main = {
|
||||
async autoLogin() {
|
||||
try {
|
||||
const loginResult = await util_index.wxLogin();
|
||||
common_vendor.index.__f__("log", "at App.vue:28", "自动登录成功:", loginResult);
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at App.vue:31", "自动登录失败:", error);
|
||||
common_vendor.index.__f__("error", "at App.vue:30", "自动登录失败:", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -6990,7 +6990,7 @@ function isConsoleWritable() {
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "192.168.10.59,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_yxJg9-";
|
||||
const id = "mp-weixin_f_V2rb";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
+3
-5
@@ -3,7 +3,6 @@ const common_vendor = require("../common/vendor.js");
|
||||
const config_url = require("./url.js");
|
||||
const request = (option) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.__f__("log", "at config/http.js:9", `发起请求: ${option.method} ${config_url.URL + option.url}`, option.data);
|
||||
if (!option.hideLoading) {
|
||||
common_vendor.index.showLoading({
|
||||
title: option.loadingText || "加载中...",
|
||||
@@ -22,9 +21,8 @@ const request = (option) => {
|
||||
"Clientid": common_vendor.index.getStorageSync("client_id")
|
||||
},
|
||||
success(res) {
|
||||
common_vendor.index.__f__("log", "at config/http.js:32", `请求响应: ${option.url}`, res);
|
||||
if (res.statusCode !== 200) {
|
||||
common_vendor.index.__f__("error", "at config/http.js:36", `HTTP状态码错误: ${res.statusCode}`, res.data);
|
||||
common_vendor.index.__f__("error", "at config/http.js:33", `HTTP状态码错误: ${res.statusCode}`, res.data);
|
||||
if (res.data) {
|
||||
resolve(res.data);
|
||||
return;
|
||||
@@ -33,7 +31,7 @@ const request = (option) => {
|
||||
return;
|
||||
}
|
||||
if (res.data && res.data.code !== 200) {
|
||||
common_vendor.index.__f__("warn", "at config/http.js:50", `业务状态码错误: ${res.data.code}`, res.data);
|
||||
common_vendor.index.__f__("warn", "at config/http.js:47", `业务状态码错误: ${res.data.code}`, res.data);
|
||||
if (option.ignoreEmptyError && (res.data.code === 500 && res.data.msg && (res.data.msg.includes("未找到") || res.data.msg.includes("不存在")))) {
|
||||
resolve({
|
||||
code: 200,
|
||||
@@ -48,7 +46,7 @@ const request = (option) => {
|
||||
resolve(res.data);
|
||||
},
|
||||
fail(err) {
|
||||
common_vendor.index.__f__("error", "at config/http.js:74", `请求失败: ${option.url}`, err);
|
||||
common_vendor.index.__f__("error", "at config/http.js:71", `请求失败: ${option.url}`, err);
|
||||
reject(err);
|
||||
},
|
||||
complete() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
const URL = "https://unifans.gxfs123.com/api";
|
||||
const appid = "wxe752f45e7f7aa271";
|
||||
const appid = "wx2165f0be356ae7a9";
|
||||
exports.URL = URL;
|
||||
exports.appid = appid;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/config/url.js.map
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@ const queryById = (id) => {
|
||||
};
|
||||
const cancelOrder = (data) => {
|
||||
return config_http.request({
|
||||
url: "/orderInfo/cancelOrder",
|
||||
url: `/device/order/clear/${data.orderId}`,
|
||||
method: "get",
|
||||
data
|
||||
});
|
||||
@@ -74,7 +74,7 @@ const confirmPaymentAndRent = (orderId) => {
|
||||
common_vendor.index.__f__("log", "at config/user.js:120", `确认支付并弹出风扇, orderId: ${orderId}`);
|
||||
return config_http.request({
|
||||
url: `/app/device/confirmPaymentAndRent?orderId=${orderId}`,
|
||||
method: "post"
|
||||
method: "GET"
|
||||
});
|
||||
};
|
||||
const getOrderByOrderNo = (orderNo) => {
|
||||
|
||||
+30
-14
@@ -20,7 +20,7 @@ const _sfc_main = {
|
||||
common_vendor.onLoad((options) => {
|
||||
deviceId.value = options.deviceNo;
|
||||
checkOrderStatus();
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:173", options.deviceNo);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:174", options.deviceNo);
|
||||
fetchDeviceInfo();
|
||||
});
|
||||
const fetchDeviceInfo = async () => {
|
||||
@@ -104,7 +104,7 @@ const _sfc_main = {
|
||||
if (payWay == "wx-pay") {
|
||||
common_vendor.index.hideLoading();
|
||||
const res = await config_user.getOrderByOrderNo(order.orderNo);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:286", res);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:287", res);
|
||||
try {
|
||||
let packageTimeMinutes = 0;
|
||||
if (selectedPkg.time.includes("小时")) {
|
||||
@@ -120,12 +120,12 @@ const _sfc_main = {
|
||||
packagePrice: parseFloat(selectedPkg.price)
|
||||
});
|
||||
if (updateRes.code !== 200) {
|
||||
common_vendor.index.__f__("warn", "at pages/device/detail.vue:303", "更新订单套餐信息失败:", updateRes.msg);
|
||||
common_vendor.index.__f__("warn", "at pages/device/detail.vue:304", "更新订单套餐信息失败:", updateRes.msg);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:306", "订单套餐信息已提前更新");
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:307", "订单套餐信息已提前更新");
|
||||
}
|
||||
} catch (updateError) {
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:309", "更新订单套餐信息时出错:", updateError);
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:310", "更新订单套餐信息时出错:", updateError);
|
||||
}
|
||||
const deposit = parseFloat(deviceInfo.value.depositAmount);
|
||||
const packagePrice = parseFloat(selectedPkg.price);
|
||||
@@ -134,7 +134,7 @@ const _sfc_main = {
|
||||
common_vendor.index.redirectTo({
|
||||
url: `/pages/order/payment?orderId=${order.orderId}&packageTimeHours=${selectedPkg.time.replace("小时", "")}&packagePrice=${selectedPkg.price}&totalAmount=${totalAmount}&depositAmount=${depositAmount.value}${deviceInfo.value && deviceInfo.value.feeConfig ? "&feeConfig=" + encodeURIComponent(deviceInfo.value.feeConfig) : ""}`
|
||||
});
|
||||
} else if ("wx-score-pay") {
|
||||
} else if (payWay == "wx-score-pay") {
|
||||
common_vendor.index.hideLoading();
|
||||
const res = await config_user.getOrderByOrderNoScore(order.orderNo);
|
||||
common_vendor.index.hideLoading();
|
||||
@@ -143,15 +143,31 @@ const _sfc_main = {
|
||||
const payResult = await util_index.initiateWeChatScorePayment(res);
|
||||
if (payResult.errCode == "0") {
|
||||
const res2 = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
|
||||
common_vendor.index.showToast({
|
||||
title: "设备租借成功",
|
||||
icon: "success"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/order/index"
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:340", res2.data.orderStatus);
|
||||
if (res2.data.orderStatus == "in_used") {
|
||||
common_vendor.index.showToast({
|
||||
title: "设备租借成功",
|
||||
icon: "success"
|
||||
});
|
||||
}, 1500);
|
||||
setTimeout(() => {
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/order/index"
|
||||
});
|
||||
}, 1500);
|
||||
} else if (res2.data.orderStatus == "waiting_for_payment") {
|
||||
common_vendor.index.showToast({
|
||||
title: "设备租借失败,订单已取消",
|
||||
icon: "error"
|
||||
});
|
||||
await config_user.cancelOrder({
|
||||
orderId: order.orderNo
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.switchTab({
|
||||
url: "/pages/index/index"
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
} catch (payError) {
|
||||
common_vendor.index.showToast({
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@
|
||||
.container.data-v-d65de3a7 {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f7fa;
|
||||
padding: 30rpx 30rpx 240rpx;
|
||||
padding: 30rpx 30rpx 300rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.device-header.data-v-d65de3a7 {
|
||||
@@ -176,7 +176,7 @@
|
||||
.pricing-card .pricing-rules .rule-item.data-v-d65de3a7 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.pricing-card .pricing-rules .rule-item.data-v-d65de3a7:last-child {
|
||||
margin-bottom: 0;
|
||||
@@ -227,7 +227,7 @@
|
||||
.notice-card .notice-items .notice-item.data-v-d65de3a7 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.notice-card .notice-items .notice-item.data-v-d65de3a7:last-child {
|
||||
margin-bottom: 0;
|
||||
|
||||
+14
-14
@@ -14,10 +14,10 @@ const _sfc_main = {
|
||||
fail: reject
|
||||
});
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:125", scanResult.path);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:131", scanResult.path);
|
||||
let deviceNo = util_index.getQueryString(scanResult.path, "deviceNo");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:128", "扫码路径:", scanResult.path);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:129", "解析到的设备号:", deviceNo);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:134", "扫码路径:", scanResult.path);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:135", "解析到的设备号:", deviceNo);
|
||||
if (!deviceNo) {
|
||||
common_vendor.index.showToast({
|
||||
title: "无效的设备二维码",
|
||||
@@ -36,14 +36,14 @@ const _sfc_main = {
|
||||
"Clientid": common_vendor.index.getStorageSync("client_id")
|
||||
}
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:154", "使用中订单检查结果:", JSON.stringify(inUseRes));
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:160", "使用中订单检查结果:", JSON.stringify(inUseRes));
|
||||
if (inUseRes.statusCode == 200 && inUseRes.data.code == 200 && inUseRes.data.data) {
|
||||
const inUseOrder = inUseRes.data.data;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:159", "检测到使用中订单,准备跳转:", inUseOrder);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:165", "检测到使用中订单,准备跳转:", inUseOrder);
|
||||
common_vendor.index.reLaunch({
|
||||
url: `/pages/return/index?orderId=${inUseOrder.orderId}&deviceId=${deviceNo || inUseOrder.deviceNo}`
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:165", "已发起页面跳转");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:171", "已发起页面跳转");
|
||||
return;
|
||||
}
|
||||
const orderRes = await common_vendor.index.request({
|
||||
@@ -54,28 +54,28 @@ const _sfc_main = {
|
||||
"Clientid": common_vendor.index.getStorageSync("client_id")
|
||||
}
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:179", "待支付订单检查结果:", JSON.stringify(orderRes));
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:185", "待支付订单检查结果:", JSON.stringify(orderRes));
|
||||
if (orderRes.statusCode == 200 && orderRes.data.code == 200 && orderRes.data.data) {
|
||||
const unpaidOrder = orderRes.data.data;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:184", "检测到待支付订单,准备跳转:", unpaidOrder);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:190", "检测到待支付订单,准备跳转:", unpaidOrder);
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/order/payment?orderId=${unpaidOrder.orderId}`
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:190", "无待支付订单,获取设备信息, deviceNo:", deviceNo);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:196", "无待支付订单,获取设备信息, deviceNo:", deviceNo);
|
||||
try {
|
||||
const deviceInfoRes = await config_user.getDeviceInfo(deviceNo);
|
||||
if (deviceInfoRes.code == 200 && deviceInfoRes.data && deviceInfoRes.data.device) {
|
||||
const deviceInfo = deviceInfoRes.data.device;
|
||||
if (deviceInfo.feeConfig) {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:201", "获取到设备feeConfig信息:", deviceInfo.feeConfig);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:207", "获取到设备feeConfig信息:", deviceInfo.feeConfig);
|
||||
try {
|
||||
const feeConfig = JSON.parse(deviceInfo.feeConfig);
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/device/detail?deviceNo=${deviceNo}&feeConfig=${encodeURIComponent(deviceInfo.feeConfig)}`
|
||||
});
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:212", "解析feeConfig失败:", e);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:218", "解析feeConfig失败:", e);
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/device/detail?deviceNo=${deviceNo}`
|
||||
});
|
||||
@@ -86,7 +86,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:226", "获取设备信息失败:", deviceInfoRes.msg || "未知错误");
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:232", "获取设备信息失败:", deviceInfoRes.msg || "未知错误");
|
||||
common_vendor.index.showToast({
|
||||
title: "获取设备信息失败",
|
||||
icon: "none"
|
||||
@@ -96,7 +96,7 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:238", "获取设备信息异常:", error);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:244", "获取设备信息异常:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "获取设备信息失败",
|
||||
icon: "none"
|
||||
@@ -107,7 +107,7 @@ const _sfc_main = {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:251", "扫码处理失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/index/index.vue:257", "扫码处理失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "扫码失败",
|
||||
icon: "none"
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="container data-v-1cf27b2a"><view class="header data-v-1cf27b2a"><view class="header-bg data-v-1cf27b2a"><view class="circle-decoration circle-1 data-v-1cf27b2a"></view><view class="circle-decoration circle-2 data-v-1cf27b2a"></view><view class="wave-decoration data-v-1cf27b2a"></view></view><view class="header-content data-v-1cf27b2a"><view class="brand-area data-v-1cf27b2a"><image class="brand-logo data-v-1cf27b2a" src="{{a}}" mode="aspectFit"></image><view class="brand-text data-v-1cf27b2a"><text class="title data-v-1cf27b2a">共享风扇</text><text class="subtitle data-v-1cf27b2a">随时随地,享受清凉</text></view></view><view class="header-info data-v-1cf27b2a"><view class="service-tag data-v-1cf27b2a"><text class="data-v-1cf27b2a">便捷租赁</text><text class="dot data-v-1cf27b2a">·</text><text class="data-v-1cf27b2a">品质保障</text></view></view></view></view><view class="scan-section data-v-1cf27b2a"><view class="scan-card data-v-1cf27b2a"><view class="scan-btn data-v-1cf27b2a" bindtap="{{c}}"><image class="scan-icon data-v-1cf27b2a" src="{{b}}" mode="aspectFit"/><text class="scan-text data-v-1cf27b2a">扫码使用</text></view><view class="scan-desc data-v-1cf27b2a"><text class="data-v-1cf27b2a">扫描设备二维码即可使用或归还</text></view></view></view><view class="price-card data-v-1cf27b2a"><view class="card-header data-v-1cf27b2a"><text class="card-title data-v-1cf27b2a">收费规则</text></view><view class="price-rules data-v-1cf27b2a"><view class="price-item data-v-1cf27b2a"><view class="price-tag data-v-1cf27b2a">5.0<text class="unit data-v-1cf27b2a">元/小时</text></view></view><view class="divider data-v-1cf27b2a"></view><view class="rule-list data-v-1cf27b2a"><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">15分钟内归还免费</text></view><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">不足1小时按1小时计费</text></view><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">封顶99元,计费达99元视为买断</text></view></view></view></view><view class="usage-steps data-v-1cf27b2a"><view class="steps-header data-v-1cf27b2a"><text class="steps-title data-v-1cf27b2a">使用流程</text></view><view class="steps-container data-v-1cf27b2a"><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">1</text></view><text class="step-text data-v-1cf27b2a">扫码开锁</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">2</text></view><text class="step-text data-v-1cf27b2a">使用风扇</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">3</text></view><text class="step-text data-v-1cf27b2a">归还结算</text></view></view></view></view>
|
||||
<view class="container data-v-1cf27b2a"><view class="header data-v-1cf27b2a"><view class="header-bg data-v-1cf27b2a"><view class="circle-decoration circle-1 data-v-1cf27b2a"></view><view class="circle-decoration circle-2 data-v-1cf27b2a"></view><view class="wave-decoration data-v-1cf27b2a"></view></view><view class="header-content data-v-1cf27b2a"><view class="brand-area data-v-1cf27b2a"><image class="brand-logo data-v-1cf27b2a" src="{{a}}" mode="aspectFit"></image><view class="brand-text data-v-1cf27b2a"><text class="title data-v-1cf27b2a">共享风扇</text><text class="subtitle data-v-1cf27b2a">随时随地,享受清凉</text></view></view><view class="header-info data-v-1cf27b2a"><view class="service-tag data-v-1cf27b2a"><text class="data-v-1cf27b2a">便捷租赁</text><text class="dot data-v-1cf27b2a">·</text><text class="data-v-1cf27b2a">品质保障</text></view></view></view></view><view class="scan-section data-v-1cf27b2a"><view class="scan-card data-v-1cf27b2a"><view class="scan-btn data-v-1cf27b2a" bindtap="{{c}}"><image class="scan-icon data-v-1cf27b2a" src="{{b}}" mode="aspectFit"/><text class="scan-text data-v-1cf27b2a">扫码使用</text></view><view class="scan-desc data-v-1cf27b2a"><text class="data-v-1cf27b2a">扫描设备二维码即可使用或归还</text></view></view></view><view class="price-card data-v-1cf27b2a"><view class="card-header data-v-1cf27b2a"><text class="card-title data-v-1cf27b2a">收费规则</text></view><view class="price-rules data-v-1cf27b2a"><view class="price-item data-v-1cf27b2a"><view class="price-tag data-v-1cf27b2a">5.0<text class="unit data-v-1cf27b2a">元/小时</text></view></view><view class="divider data-v-1cf27b2a"></view><view class="rule-list data-v-1cf27b2a"><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">15分钟内归还免费</text></view><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">不足1小时按1小时计费</text></view><view class="rule-item data-v-1cf27b2a"><view class="rule-dot data-v-1cf27b2a"></view><text class="data-v-1cf27b2a">封顶99元,计费达99元视为买断</text></view></view></view></view><view class="usage-steps data-v-1cf27b2a"><view class="steps-header data-v-1cf27b2a"><text class="steps-title data-v-1cf27b2a">使用流程</text></view><view class="steps-container data-v-1cf27b2a"><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">1</text></view><text class="step-text data-v-1cf27b2a">扫码弹出</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">2</text></view><text class="step-text data-v-1cf27b2a">使用风扇</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">3</text></view><text class="step-text data-v-1cf27b2a">插入归还</text></view><view class="step-arrow data-v-1cf27b2a"></view><view class="step-item data-v-1cf27b2a"><view class="step-icon data-v-1cf27b2a"><text class="step-number data-v-1cf27b2a">4</text></view><text class="step-text data-v-1cf27b2a">结束订单</text></view></view></view></view>
|
||||
@@ -129,7 +129,6 @@
|
||||
/* 扫码区域 */
|
||||
.scan-section.data-v-1cf27b2a {
|
||||
padding: 0 30rpx;
|
||||
margin-top: -60rpx;
|
||||
}
|
||||
.scan-section .scan-card.data-v-1cf27b2a {
|
||||
background: #ffffff;
|
||||
|
||||
+5
-26
@@ -129,23 +129,6 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
};
|
||||
const getOrderStatus = async (order) => {
|
||||
try {
|
||||
const res = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "状态同步成功",
|
||||
icon: "success"
|
||||
});
|
||||
await loadOrderList(orderStatusTabs[currentTab.value].status);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.showToast({
|
||||
title: "同步状态失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
};
|
||||
const navigateToReturn = (deviceId, orderId) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:295", orderId);
|
||||
common_vendor.index.navigateTo({
|
||||
@@ -162,7 +145,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showLoading({
|
||||
title: "处理中"
|
||||
});
|
||||
const res = await config_user.confirmPaymentAndRent(order.orderId);
|
||||
const res = await config_user.confirmPaymentAndRent(order.orderNo);
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
@@ -192,15 +175,15 @@ const _sfc_main = {
|
||||
title: "处理中"
|
||||
});
|
||||
const result = await config_user.cancelOrder({
|
||||
orderId: order.orderId
|
||||
orderId: order.orderNo
|
||||
});
|
||||
if (result.code === 200) {
|
||||
if (result) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
title: "订单已取消",
|
||||
icon: "success"
|
||||
});
|
||||
await loadOrderList(orderStatusTabs[currentTab.value].status);
|
||||
await loadOrderList();
|
||||
} else {
|
||||
throw new Error(result.msg || "取消订单失败");
|
||||
}
|
||||
@@ -254,11 +237,7 @@ const _sfc_main = {
|
||||
o: common_vendor.o(($event) => navigateToReturn(order.deviceId, order.orderId), index)
|
||||
} : {}, {
|
||||
p: common_vendor.o(($event) => navigateToDetails(order), index),
|
||||
q: order.status === "waiting_for_payment" || order.orderStatus === "waiting_for_payment"
|
||||
}, order.status === "waiting_for_payment" || order.orderStatus === "waiting_for_payment" ? {
|
||||
r: common_vendor.o(($event) => getOrderStatus(order), index)
|
||||
} : {}, {
|
||||
s: index
|
||||
q: index
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="order-container data-v-17a44f9d"><view class="status-tabs data-v-17a44f9d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-17a44f9d', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-17a44f9d"><view wx:if="{{b}}" class="empty-state data-v-17a44f9d"><view class="empty-icon data-v-17a44f9d"></view><text class="empty-text data-v-17a44f9d">暂无订单记录</text></view><view wx:for="{{c}}" wx:for-item="order" wx:key="s" class="order-item data-v-17a44f9d"><view class="order-header data-v-17a44f9d"><view class="order-id data-v-17a44f9d"><text class="data-v-17a44f9d">订单号:{{order.a}}</text></view><view class="{{['order-status', 'data-v-17a44f9d', order.c]}}">{{order.b}}</view></view><view class="order-body data-v-17a44f9d"><view class="device-info data-v-17a44f9d"><view class="device-left data-v-17a44f9d"><view class="device-name data-v-17a44f9d">共享风扇</view><view class="device-id data-v-17a44f9d">设备号:{{order.d}}</view></view><view class="device-right data-v-17a44f9d"><view wx:if="{{order.e}}" class="payment-badge wx-score data-v-17a44f9d"><image src="{{order.f}}" mode="aspectFit" class="badge-icon data-v-17a44f9d"></image><view class="badge-text data-v-17a44f9d"><text class="data-v-17a44f9d">微信支付分</text><text class="divider data-v-17a44f9d">|</text><text class="highlight data-v-17a44f9d">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-17a44f9d"><text class="badge-text data-v-17a44f9d">押金租借</text></view></view></view><view class="order-times data-v-17a44f9d"><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">开始时间:</text><text class="time-value data-v-17a44f9d">{{order.g}}</text></view><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">结束时间:</text><text class="time-value data-v-17a44f9d">{{order.h}}</text></view></view></view><view class="order-footer data-v-17a44f9d"><view class="price data-v-17a44f9d">¥{{order.i}}</view><view class="actions data-v-17a44f9d"><view wx:if="{{order.j}}" class="action-item primary data-v-17a44f9d" bindtap="{{order.k}}"> 立即支付 </view><view wx:if="{{order.l}}" class="action-item secondary data-v-17a44f9d" bindtap="{{order.m}}"> 取消订单 </view><view wx:if="{{order.n}}" class="action-item primary data-v-17a44f9d" bindtap="{{order.o}}"> 归还设备 </view><view class="action-item secondary data-v-17a44f9d" bindtap="{{order.p}}"> 查看详情 </view><view wx:if="{{order.q}}" class="action-item secondary data-v-17a44f9d" bindtap="{{order.r}}"> 同步状态 </view></view></view></view></view></view>
|
||||
<view class="order-container data-v-17a44f9d"><view class="status-tabs data-v-17a44f9d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-17a44f9d', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-17a44f9d"><view wx:if="{{b}}" class="empty-state data-v-17a44f9d"><view class="empty-icon data-v-17a44f9d"></view><text class="empty-text data-v-17a44f9d">暂无订单记录</text></view><view wx:for="{{c}}" wx:for-item="order" wx:key="q" class="order-item data-v-17a44f9d"><view class="order-header data-v-17a44f9d"><view class="order-id data-v-17a44f9d"><text class="data-v-17a44f9d">订单号:{{order.a}}</text></view><view class="{{['order-status', 'data-v-17a44f9d', order.c]}}">{{order.b}}</view></view><view class="order-body data-v-17a44f9d"><view class="device-info data-v-17a44f9d"><view class="device-left data-v-17a44f9d"><view class="device-name data-v-17a44f9d">共享风扇</view><view class="device-id data-v-17a44f9d">设备号:{{order.d}}</view></view><view class="device-right data-v-17a44f9d"><view wx:if="{{order.e}}" class="payment-badge wx-score data-v-17a44f9d"><image src="{{order.f}}" mode="aspectFit" class="badge-icon data-v-17a44f9d"></image><view class="badge-text data-v-17a44f9d"><text class="data-v-17a44f9d">微信支付分</text><text class="divider data-v-17a44f9d">|</text><text class="highlight data-v-17a44f9d">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-17a44f9d"><text class="badge-text data-v-17a44f9d">押金租借</text></view></view></view><view class="order-times data-v-17a44f9d"><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">开始时间:</text><text class="time-value data-v-17a44f9d">{{order.g}}</text></view><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">结束时间:</text><text class="time-value data-v-17a44f9d">{{order.h}}</text></view></view></view><view class="order-footer data-v-17a44f9d"><view class="price data-v-17a44f9d">¥{{order.i}}</view><view class="actions data-v-17a44f9d"><view wx:if="{{order.j}}" class="action-item primary data-v-17a44f9d" bindtap="{{order.k}}"> 立即支付 </view><view wx:if="{{order.l}}" class="action-item secondary data-v-17a44f9d" bindtap="{{order.m}}"> 取消订单 </view><view wx:if="{{order.n}}" class="action-item primary data-v-17a44f9d" bindtap="{{order.o}}"> 归还设备 </view><view class="action-item secondary data-v-17a44f9d" bindtap="{{order.p}}"> 查看详情 </view></view></view></view></view></view>
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "",
|
||||
"appid": "wxe752f45e7f7aa271",
|
||||
"appid": "wx2165f0be356ae7a9",
|
||||
"projectname": "uni-fans-score",
|
||||
"condition": {
|
||||
"search": {
|
||||
|
||||
+2
-3
@@ -10,7 +10,7 @@ const wxLogin = () => {
|
||||
if (loginRes.code) {
|
||||
const result = await config_user.login({
|
||||
code: loginRes.code,
|
||||
appid: "wxe752f45e7f7aa271"
|
||||
appid: "wx2165f0be356ae7a9"
|
||||
});
|
||||
if (result.code === 200) {
|
||||
common_vendor.index.setStorageSync("token", result.data.LoginWxVo.access_token);
|
||||
@@ -61,7 +61,6 @@ const initiateWeChatScorePayment = (paymentData) => {
|
||||
package: paymentData.data.package
|
||||
},
|
||||
success: (businessRes) => {
|
||||
common_vendor.index.__f__("log", "at util/index.js:92", "微信支付分小程序调用成功", businessRes);
|
||||
if (businessRes.errMsg === "openBusinessView:ok") {
|
||||
resolve(businessRes);
|
||||
} else {
|
||||
@@ -69,7 +68,7 @@ const initiateWeChatScorePayment = (paymentData) => {
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
common_vendor.index.__f__("error", "at util/index.js:101", "微信支付分小程序调用失败", error);
|
||||
common_vendor.index.__f__("error", "at util/index.js:100", "微信支付分小程序调用失败", error);
|
||||
common_vendor.index.showToast({
|
||||
title: error.errMsg || "支付分接口调用失败",
|
||||
icon: "none"
|
||||
|
||||
@@ -97,11 +97,9 @@ class OrderMonitor {
|
||||
if (this.currentPage === "return" || this.currentPage === null) {
|
||||
await this.checkOrderStatus(orderId);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at utils/orderMonitor.js:122", `跳过订单状态检查: ${orderId}, 当前不在归还页面`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at utils/orderMonitor.js:126", `检查订单状态失败: ${orderId}`, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user