Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2978ac25f7 | |||
| a08afd0cfd |
@@ -39,9 +39,11 @@
|
|||||||
<text class="step-text">完成订单</text>
|
<text class="step-text">完成订单</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="door-btn-area">
|
||||||
<view class="door-btn-close" @click="handleClose">返回首页</view>
|
<view class="door-btn-close" @click="handleClose">返回首页</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 已关门 -->
|
<!-- 已关门 -->
|
||||||
<view v-if="step === 'closed'" class="door-state-bg">
|
<view v-if="step === 'closed'" class="door-state-bg">
|
||||||
@@ -74,9 +76,11 @@
|
|||||||
<text class="step-text">完成订单</text>
|
<text class="step-text">完成订单</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="door-btn-area">
|
||||||
<view class="door-btn-close" @click="handleClose">返回首页</view>
|
<view class="door-btn-close" @click="handleClose">返回首页</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 订单完成 -->
|
<!-- 订单完成 -->
|
||||||
<view v-if="step === 'complete'" class="door-state-bg">
|
<view v-if="step === 'complete'" class="door-state-bg">
|
||||||
@@ -109,11 +113,13 @@
|
|||||||
<text class="door-order-loading">加载订单信息...</text>
|
<text class="door-order-loading">加载订单信息...</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="door-btn-detail" @click="goOrderDetail" v-if="orderInfo">查看订单详情</view>
|
<view class="door-btn-area">
|
||||||
|
<view class="door-btn-detail" @click="goOrderDetail">查看订单详情</view>
|
||||||
<view class="door-btn-close" @click="handleClose">返回首页</view>
|
<view class="door-btn-close" @click="handleClose">返回首页</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -235,8 +241,14 @@ export default {
|
|||||||
|
|
||||||
// 跳转订单详情
|
// 跳转订单详情
|
||||||
goOrderDetail() {
|
goOrderDetail() {
|
||||||
|
if (this.orderInfo) {
|
||||||
const orderId = this.orderInfo.order_id || this.orderInfo.order_no;
|
const orderId = this.orderInfo.order_id || this.orderInfo.order_no;
|
||||||
uni.navigateTo({ url: `/pages/order/detail?order_id=${orderId}` });
|
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;
|
padding: 16rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ====== 按钮区域 ====== */
|
||||||
|
.door-btn-area {
|
||||||
|
margin-top: 64rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
/* ====== 查看订单详情按钮 ====== */
|
/* ====== 查看订单详情按钮 ====== */
|
||||||
.door-btn-detail {
|
.door-btn-detail {
|
||||||
margin-top: 32rpx;
|
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 24rpx 80rpx;
|
padding: 24rpx 80rpx;
|
||||||
@@ -555,7 +575,6 @@ export default {
|
|||||||
|
|
||||||
/* ====== 关闭按钮 ====== */
|
/* ====== 关闭按钮 ====== */
|
||||||
.door-btn-close {
|
.door-btn-close {
|
||||||
margin-top: 24rpx;
|
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(255, 255, 255, 0.85);
|
color: rgba(255, 255, 255, 0.85);
|
||||||
padding: 24rpx 100rpx;
|
padding: 24rpx 100rpx;
|
||||||
|
|||||||
@@ -500,6 +500,7 @@ export default {
|
|||||||
uni.clearStorageSync();
|
uni.clearStorageSync();
|
||||||
uni.showToast({ title: '已退出登录', icon: 'success' });
|
uni.showToast({ title: '已退出登录', icon: 'success' });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
uni.setStorageSync('__logout_flag', true);
|
||||||
uni.reLaunch({ url: '/pages/index/scan' });
|
uni.reLaunch({ url: '/pages/index/scan' });
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
// 退出登录后跳转过来,清除标记,停留在扫码页
|
||||||
|
if (uni.getStorageSync('__logout_flag')) {
|
||||||
|
uni.removeStorageSync('__logout_flag');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 1. 检查 JWT(App.vue 已处理首次跳转,这里兜底)
|
// 1. 检查 JWT(App.vue 已处理首次跳转,这里兜底)
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
if (!token) {
|
if (!token) {
|
||||||
|
|||||||
Reference in New Issue
Block a user