fix:根据免押分验收条件跳转页面效果

This commit is contained in:
2025-07-16 16:57:36 +08:00
parent bc45124a42
commit 5725dda5df
12 changed files with 41 additions and 40 deletions
+2 -2
View File
@@ -6988,9 +6988,9 @@ function isConsoleWritable() {
return isWritable;
}
function initRuntimeSocketService() {
const hosts = "192.168.10.59,127.0.0.1";
const hosts = "192.168.10.45,127.0.0.1";
const port = "8090";
const id = "mp-weixin_eQjgTz";
const id = "mp-weixin_wcnPdk";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();
+1 -1
View File
@@ -1,5 +1,5 @@
"use strict";
const URL = "https://unifans.gxfs123.com/api";
const URL = "http://192.168.10.44:8080";
const appid = "wx2165f0be356ae7a9";
exports.URL = URL;
exports.appid = appid;
+21 -21
View File
@@ -21,7 +21,7 @@ const _sfc_main = {
common_vendor.onLoad((options) => {
deviceId.value = options.deviceNo;
checkOrderStatus();
common_vendor.index.__f__("log", "at pages/device/detail.vue:198", options.deviceNo);
common_vendor.index.__f__("log", "at pages/device/detail.vue:199", options.deviceNo);
fetchDeviceInfo();
});
common_vendor.onMounted(() => {
@@ -30,18 +30,18 @@ const _sfc_main = {
const checkUserPhone = async () => {
try {
const userInfoRes = await util_index.getUserInfo();
common_vendor.index.__f__("log", "at pages/device/detail.vue:209", userInfoRes.data.phone, "getUserInfoPhone");
common_vendor.index.__f__("log", "at pages/device/detail.vue:210", userInfoRes.data.phone, "getUserInfoPhone");
if (userInfoRes.code == 200 && userInfoRes.data && userInfoRes.data.phone) {
phoneNumber.value = userInfoRes.data.phone;
} else {
showPhoneAuthPopup.value = true;
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/device/detail.vue:218", "获取用户信息失败:", error);
common_vendor.index.__f__("error", "at pages/device/detail.vue:219", "获取用户信息失败:", error);
}
};
const onGetPhoneNumber = (e) => {
common_vendor.index.__f__("log", "at pages/device/detail.vue:224", "getPhoneNumber event:", e.detail);
common_vendor.index.__f__("log", "at pages/device/detail.vue:225", "getPhoneNumber event:", e.detail);
if (e.detail.errMsg && e.detail.errMsg.includes("deny")) {
common_vendor.index.showToast({
title: "需要授权手机号才能使用设备",
@@ -53,13 +53,13 @@ const _sfc_main = {
common_vendor.index.showLoading({
title: "获取中..."
});
common_vendor.index.__f__("log", "at pages/device/detail.vue:241", "获取到的授权code:", e.detail.code);
common_vendor.index.__f__("log", "at pages/device/detail.vue:242", "获取到的授权code:", e.detail.code);
try {
util_index.getUserPhoneNumber(e.detail.code).then((res) => {
common_vendor.index.__f__("log", "at pages/device/detail.vue:247", "获取手机号API响应原始数据:", JSON.stringify(res));
common_vendor.index.__f__("log", "at pages/device/detail.vue:248", "获取手机号API响应原始数据:", JSON.stringify(res));
common_vendor.index.hideLoading();
if (!res) {
common_vendor.index.__f__("error", "at pages/device/detail.vue:252", "API返回数据为空");
common_vendor.index.__f__("error", "at pages/device/detail.vue:253", "API返回数据为空");
common_vendor.index.showModal({
title: "数据异常",
content: "API返回为空",
@@ -67,8 +67,8 @@ const _sfc_main = {
});
return;
}
common_vendor.index.__f__("log", "at pages/device/detail.vue:262", "响应code:", res.code, "响应类型:", typeof res.code);
common_vendor.index.__f__("log", "at pages/device/detail.vue:263", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone);
common_vendor.index.__f__("log", "at pages/device/detail.vue:263", "响应code:", res.code, "响应类型:", typeof res.code);
common_vendor.index.__f__("log", "at pages/device/detail.vue:264", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone);
if (res.code == 200 && res.data && res.data.phoneNumber) {
phoneNumber.value = res.data.phoneNumber;
showPhoneAuthPopup.value = false;
@@ -77,7 +77,7 @@ const _sfc_main = {
icon: "success"
});
} else {
common_vendor.index.__f__("warn", "at pages/device/detail.vue:275", "获取手机号响应异常:", res.msg || "未知错误");
common_vendor.index.__f__("warn", "at pages/device/detail.vue:276", "获取手机号响应异常:", res.msg || "未知错误");
common_vendor.index.showModal({
title: "获取手机号异常",
content: `状态码: ${res.code}, 消息: ${res.msg || "无"}`,
@@ -86,7 +86,7 @@ const _sfc_main = {
}
}).catch((err) => {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/device/detail.vue:285", "获取手机号码失败(catch):", err);
common_vendor.index.__f__("error", "at pages/device/detail.vue:286", "获取手机号码失败(catch):", err);
let errMsg = err.message || err.toString();
common_vendor.index.showModal({
title: "获取手机号失败",
@@ -96,7 +96,7 @@ const _sfc_main = {
});
} catch (outerError) {
common_vendor.index.hideLoading();
common_vendor.index.__f__("error", "at pages/device/detail.vue:297", "获取手机号外部错误:", outerError);
common_vendor.index.__f__("error", "at pages/device/detail.vue:298", "获取手机号外部错误:", outerError);
common_vendor.index.showModal({
title: "意外错误",
content: "处理过程发生异常: " + (outerError.message || outerError),
@@ -195,7 +195,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:427", res);
common_vendor.index.__f__("log", "at pages/device/detail.vue:428", res);
try {
let packageTimeMinutes = 0;
if (selectedPkg.time.includes("小时")) {
@@ -211,12 +211,12 @@ const _sfc_main = {
packagePrice: parseFloat(selectedPkg.price)
});
if (updateRes.code !== 200) {
common_vendor.index.__f__("warn", "at pages/device/detail.vue:444", "更新订单套餐信息失败:", updateRes.msg);
common_vendor.index.__f__("warn", "at pages/device/detail.vue:445", "更新订单套餐信息失败:", updateRes.msg);
} else {
common_vendor.index.__f__("log", "at pages/device/detail.vue:447", "订单套餐信息已提前更新");
common_vendor.index.__f__("log", "at pages/device/detail.vue:448", "订单套餐信息已提前更新");
}
} catch (updateError) {
common_vendor.index.__f__("error", "at pages/device/detail.vue:450", "更新订单套餐信息时出错:", updateError);
common_vendor.index.__f__("error", "at pages/device/detail.vue:451", "更新订单套餐信息时出错:", updateError);
}
const deposit = parseFloat(deviceInfo.value.depositAmount);
const packagePrice = parseFloat(selectedPkg.price);
@@ -234,7 +234,7 @@ 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.__f__("log", "at pages/device/detail.vue:480", res2.data.orderStatus);
common_vendor.index.__f__("log", "at pages/device/detail.vue:481", res2.data.orderStatus);
if (res2.data.orderStatus == "in_used") {
common_vendor.index.showToast({
title: "设备租借成功",
@@ -291,10 +291,10 @@ const _sfc_main = {
f: common_assets._imports_1$2,
g: batteryLevel.value < 20 ? 1 : "",
h: common_vendor.t(batteryLevel.value),
i: common_assets._imports_0$2,
j: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押金租借"),
k: hasActiveOrder.value ? 1 : "",
l: common_vendor.o(($event) => handleRent("wx-score-pay")),
i: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押租借"),
j: hasActiveOrder.value ? 1 : "",
k: common_vendor.o(($event) => handleRent("wx-score-pay")),
l: common_assets._imports_0$2,
m: common_vendor.o(($event) => handleRent("wx-pay")),
n: showPhoneAuthPopup.value
}, showPhoneAuthPopup.value ? {
+1 -1
View File
@@ -1 +1 @@
<view class="container data-v-d65de3a7"><view class="device-header data-v-d65de3a7"><view class="{{['device-status-card', 'data-v-d65de3a7', b]}}"><view class="status-indicator data-v-d65de3a7"></view><text class="status-text data-v-d65de3a7">{{a}}</text></view><view class="device-title data-v-d65de3a7"><text class="name data-v-d65de3a7">共享风扇</text><view class="device-meta data-v-d65de3a7"><text class="id-label data-v-d65de3a7">设备号:</text><text class="id-value data-v-d65de3a7">{{c}}</text></view></view></view><view class="card device-info-card data-v-d65de3a7"><view class="card-row data-v-d65de3a7"><view class="card-item data-v-d65de3a7"><view class="item-icon location-icon data-v-d65de3a7"><image class="data-v-d65de3a7" src="{{d}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-d65de3a7"><text class="item-label data-v-d65de3a7">当前位置</text><text class="item-value data-v-d65de3a7">{{e}}</text></view></view><view class="card-item data-v-d65de3a7"><view class="{{['item-icon', 'battery-icon', 'data-v-d65de3a7', g && 'battery-low']}}"><image class="data-v-d65de3a7" src="{{f}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-d65de3a7"><text class="item-label data-v-d65de3a7">电池电量</text><text class="item-value data-v-d65de3a7">{{h}}%</text></view></view></view></view><view class="card pricing-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">计费规则</text></view><view class="pricing-banner data-v-d65de3a7"><view class="pricing-main data-v-d65de3a7"><text class="price data-v-d65de3a7">¥5.00</text><text class="unit data-v-d65de3a7">/小时</text></view><text class="cap-price data-v-d65de3a7">封顶 ¥99</text></view><view class="pricing-rules data-v-d65de3a7"><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">前15分钟内归还<text class="highlight data-v-d65de3a7">免费</text></text></view><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">不足60分钟按60分钟计费</text></view><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">持续计费至99元视为买断</text></view></view></view><view class="card notice-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">使用须知</text></view><view class="notice-items data-v-d65de3a7"><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在指定区域内使用设备</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">归还时请确保设备完好,避免损坏</text></view></view></view><view class="footer data-v-d65de3a7"><view class="wechat-credit data-v-d65de3a7"><image src="{{i}}" mode="aspectFit" class="wx-icon data-v-d65de3a7"></image><view class="credit-text data-v-d65de3a7"><text class="data-v-d65de3a7">微信支付分</text><text class="credit-divider data-v-d65de3a7">|</text><text class="credit-score data-v-d65de3a7">支付分200分及以上优享</text></view></view><button class="{{['rent-button', 'data-v-d65de3a7', k && 'return-button']}}" bindtap="{{l}}"><text class="data-v-d65de3a7">{{j}}</text></button><view class=" data-v-d65de3a7" style="align-items:center;align-content:center;text-align:center;line-height:50rpx" bindtap="{{m}}"> 无法免押点这里></view></view><view wx:if="{{n}}" class="phone-auth-popup data-v-d65de3a7"><view class="popup-mask data-v-d65de3a7" catchtap="{{o}}"></view><view class="popup-content data-v-d65de3a7"><view class="popup-header data-v-d65de3a7"><text class="popup-title data-v-d65de3a7">授权获取手机号</text></view><view class="popup-body data-v-d65de3a7"><view class="auth-desc data-v-d65de3a7"><text class="data-v-d65de3a7">为了提供更好的服务,需要授权获取您的手机号</text></view><button class="auth-btn data-v-d65de3a7" open-type="getPhoneNumber" bindgetphonenumber="{{p}}"> 一键获取手机号 </button><view class="auth-cancel data-v-d65de3a7" bindtap="{{q}}"><text class="data-v-d65de3a7">暂不授权</text></view></view></view></view></view>
<view class="container data-v-d65de3a7"><view class="device-header data-v-d65de3a7"><view class="{{['device-status-card', 'data-v-d65de3a7', b]}}"><view class="status-indicator data-v-d65de3a7"></view><text class="status-text data-v-d65de3a7">{{a}}</text></view><view class="device-title data-v-d65de3a7"><text class="name data-v-d65de3a7">共享风扇</text><view class="device-meta data-v-d65de3a7"><text class="id-label data-v-d65de3a7">设备号:</text><text class="id-value data-v-d65de3a7">{{c}}</text></view></view></view><view class="card device-info-card data-v-d65de3a7"><view class="card-row data-v-d65de3a7"><view class="card-item data-v-d65de3a7"><view class="item-icon location-icon data-v-d65de3a7"><image class="data-v-d65de3a7" src="{{d}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-d65de3a7"><text class="item-label data-v-d65de3a7">当前位置</text><text class="item-value data-v-d65de3a7">{{e}}</text></view></view><view class="card-item data-v-d65de3a7"><view class="{{['item-icon', 'battery-icon', 'data-v-d65de3a7', g && 'battery-low']}}"><image class="data-v-d65de3a7" src="{{f}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-d65de3a7"><text class="item-label data-v-d65de3a7">电池电量</text><text class="item-value data-v-d65de3a7">{{h}}%</text></view></view></view></view><view class="card pricing-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">计费规则</text></view><view class="pricing-banner data-v-d65de3a7"><view class="pricing-main data-v-d65de3a7"><text class="price data-v-d65de3a7">¥5.00</text><text class="unit data-v-d65de3a7">/小时</text></view><text class="cap-price data-v-d65de3a7">封顶 ¥99</text></view><view class="pricing-rules data-v-d65de3a7"><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">前15分钟内归还<text class="highlight data-v-d65de3a7">免费</text></text></view><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">不足60分钟按60分钟计费</text></view><view class="rule-item data-v-d65de3a7"><view class="rule-dot data-v-d65de3a7"></view><text class="rule-text data-v-d65de3a7">持续计费至99元视为买断</text></view></view></view><view class="card notice-card data-v-d65de3a7"><view class="card-header data-v-d65de3a7"><text class="card-title data-v-d65de3a7">使用须知</text></view><view class="notice-items data-v-d65de3a7"><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">请在指定区域内使用设备</text></view><view class="notice-item data-v-d65de3a7"><view class="notice-dot data-v-d65de3a7"></view><text class="notice-text data-v-d65de3a7">归还时请确保设备完好,避免损坏</text></view></view></view><view class="footer data-v-d65de3a7"><button class="{{['rent-button', 'data-v-d65de3a7', j && 'return-button']}}" bindtap="{{k}}"><text class="data-v-d65de3a7">{{i}}</text></button><view class="wechat-credit data-v-d65de3a7"><image src="{{l}}" mode="aspectFit" class="wx-icon data-v-d65de3a7"></image><view class="credit-text data-v-d65de3a7"><text class="data-v-d65de3a7">微信支付分</text><text class="credit-divider data-v-d65de3a7">|</text><text class="credit-score data-v-d65de3a7">200分及以上优享</text></view></view><view class=" data-v-d65de3a7" style="align-items:center;align-content:center;text-align:center;line-height:50rpx" bindtap="{{m}}"> 无法免押点这里></view></view><view wx:if="{{n}}" class="phone-auth-popup data-v-d65de3a7"><view class="popup-mask data-v-d65de3a7" catchtap="{{o}}"></view><view class="popup-content data-v-d65de3a7"><view class="popup-header data-v-d65de3a7"><text class="popup-title data-v-d65de3a7">授权获取手机号</text></view><view class="popup-body data-v-d65de3a7"><view class="auth-desc data-v-d65de3a7"><text class="data-v-d65de3a7">为了提供更好的服务,需要授权获取您的手机号</text></view><button class="auth-btn data-v-d65de3a7" open-type="getPhoneNumber" bindgetphonenumber="{{p}}"> 一键获取手机号 </button><view class="auth-cancel data-v-d65de3a7" bindtap="{{q}}"><text class="data-v-d65de3a7">暂不授权</text></view></view></view></view></view>
+1 -1
View File
@@ -263,7 +263,7 @@
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
margin-top: 10rpx;
}
.footer .wechat-credit .wx-icon.data-v-d65de3a7 {
width: 50rpx;