Compare commits

..

2 Commits

Author SHA1 Message Date
kk 2978ac25f7 调整开门状态样式
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 48s
2026-07-11 16:56:15 +08:00
kk a08afd0cfd 退出登录跳到扫码页 2026-07-11 16:49:32 +08:00
3 changed files with 34 additions and 8 deletions
+27 -8
View File
@@ -39,7 +39,9 @@
<text class="step-text">完成订单</text>
</view>
</view>
<view class="door-btn-close" @click="handleClose">返回首页</view>
<view class="door-btn-area">
<view class="door-btn-close" @click="handleClose">返回首页</view>
</view>
</view>
</view>
@@ -74,7 +76,9 @@
<text class="step-text">完成订单</text>
</view>
</view>
<view class="door-btn-close" @click="handleClose">返回首页</view>
<view class="door-btn-area">
<view class="door-btn-close" @click="handleClose">返回首页</view>
</view>
</view>
</view>
@@ -109,8 +113,10 @@
<text class="door-order-loading">加载订单信息...</text>
</view>
<view class="door-btn-detail" @click="goOrderDetail" v-if="orderInfo">查看订单详情</view>
<view class="door-btn-close" @click="handleClose">返回首页</view>
<view class="door-btn-area">
<view class="door-btn-detail" @click="goOrderDetail">查看订单详情</view>
<view class="door-btn-close" @click="handleClose">返回首页</view>
</view>
</view>
</view>
</view>
@@ -235,8 +241,14 @@ export default {
// 跳转订单详情
goOrderDetail() {
const orderId = this.orderInfo.order_id || this.orderInfo.order_no;
uni.navigateTo({ url: `/pages/order/detail?order_id=${orderId}` });
if (this.orderInfo) {
const orderId = this.orderInfo.order_id || this.orderInfo.order_no;
uni.navigateTo({ url: `/pages/order/detail?order_id=${orderId}` });
} else if (this.flowId) {
uni.navigateTo({ url: `/pages/order/detail?flow_id=${this.flowId}` });
} else {
uni.showToast({ title: '无法获取订单信息', icon: 'none' });
}
},
// 关闭遮罩
@@ -541,9 +553,17 @@ export default {
padding: 16rpx 0;
}
/* ====== 按钮区域 ====== */
.door-btn-area {
margin-top: 64rpx;
display: flex;
flex-direction: column;
align-items: center;
gap: 24rpx;
}
/* ====== 查看订单详情按钮 ====== */
.door-btn-detail {
margin-top: 32rpx;
font-size: 30rpx;
color: #fff;
padding: 24rpx 80rpx;
@@ -555,7 +575,6 @@ export default {
/* ====== 关闭按钮 ====== */
.door-btn-close {
margin-top: 24rpx;
font-size: 30rpx;
color: rgba(255, 255, 255, 0.85);
padding: 24rpx 100rpx;
+1
View File
@@ -500,6 +500,7 @@ export default {
uni.clearStorageSync();
uni.showToast({ title: '已退出登录', icon: 'success' });
setTimeout(() => {
uni.setStorageSync('__logout_flag', true);
uni.reLaunch({ url: '/pages/index/scan' });
}, 1000);
},
+6
View File
@@ -67,6 +67,12 @@ export default {
};
},
onLoad(options) {
// 退出登录后跳转过来,清除标记,停留在扫码页
if (uni.getStorageSync('__logout_flag')) {
uni.removeStorageSync('__logout_flag');
return;
}
// 1. 检查 JWT(App.vue 已处理首次跳转,这里兜底)
const token = uni.getStorageSync('token');
if (!token) {