开关门状态显示页样式调整
This commit is contained in:
@@ -1,229 +0,0 @@
|
||||
<template>
|
||||
<view class="door-page">
|
||||
<!-- 顶部状态区域 -->
|
||||
<view class="status-section">
|
||||
<view class="status-icon closed">
|
||||
<view class="icon-lock">
|
||||
<view class="lock-body"></view>
|
||||
<view class="lock-hole"></view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="status-title">柜门已关闭</text>
|
||||
<text class="status-desc">订单处理中,请稍候...</text>
|
||||
</view>
|
||||
|
||||
<!-- 设备信息 -->
|
||||
<view class="info-card">
|
||||
<view class="info-row">
|
||||
<text class="info-label">设备编号</text>
|
||||
<text class="info-value">{{ deviceId }}</text>
|
||||
</view>
|
||||
<view class="info-row" v-if="flowId">
|
||||
<text class="info-label">流水号</text>
|
||||
<text class="info-value">{{ flowId }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<view class="tips-card">
|
||||
<view class="tips-title">温馨提示</view>
|
||||
<view class="tips-list">
|
||||
<text class="tips-item">• 系统正在处理您的订单</text>
|
||||
<text class="tips-item">• 请在"我的订单"中查看订单状态</text>
|
||||
<text class="tips-item">• 如有问题请联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-actions">
|
||||
<view class="btn-outline" @click="handleViewOrder">查看订单</view>
|
||||
<view class="btn-primary" @click="handleBack">返回首页</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deviceId: '',
|
||||
flowId: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.deviceId = options.device_id || '';
|
||||
this.flowId = options.flow_id || '';
|
||||
},
|
||||
methods: {
|
||||
handleViewOrder() {
|
||||
uni.navigateTo({ url: '/pages/order/order' });
|
||||
},
|
||||
handleBack() {
|
||||
uni.navigateBack({ delta: 10 });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.door-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
/* 状态区域 */
|
||||
.status-section {
|
||||
background: linear-gradient(135deg, #faad14, #d48806);
|
||||
padding: 80rpx 40rpx 60rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.status-icon {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.icon-lock {
|
||||
position: relative;
|
||||
width: 48rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
|
||||
.lock-body {
|
||||
width: 48rpx;
|
||||
height: 36rpx;
|
||||
background: #fff;
|
||||
border-radius: 6rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.lock-hole {
|
||||
width: 28rpx;
|
||||
height: 24rpx;
|
||||
border: 5rpx solid #fff;
|
||||
border-radius: 14rpx 14rpx 0 0;
|
||||
border-bottom: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.status-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.status-desc {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
/* 信息卡片 */
|
||||
.info-card {
|
||||
background: #fff;
|
||||
margin: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 28rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.info-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 提示卡片 */
|
||||
.tips-card {
|
||||
background: #fff;
|
||||
margin: 0 30rpx 30rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.tips-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tips-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.tips-item {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 底部按钮 */
|
||||
.bottom-actions {
|
||||
margin-top: auto;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
color: #2979ff;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 28rpx;
|
||||
border-radius: 48rpx;
|
||||
border: 2rpx solid #2979ff;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
flex: 1;
|
||||
background: linear-gradient(135deg, #2979ff, #1e60e0);
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 28rpx;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,305 +0,0 @@
|
||||
<template>
|
||||
<view class="door-page">
|
||||
<!-- 顶部状态区域 -->
|
||||
<view class="status-section">
|
||||
<view class="status-icon success">
|
||||
<view class="icon-check"></view>
|
||||
</view>
|
||||
<text class="status-title">订单已完成</text>
|
||||
<text class="status-desc">感谢您的购买</text>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息 -->
|
||||
<view class="order-card">
|
||||
<view class="card-title">订单信息</view>
|
||||
<view v-if="orderLoading" class="loading-tip">
|
||||
<text>加载中...</text>
|
||||
</view>
|
||||
<view v-else-if="orderInfo">
|
||||
<view class="info-row">
|
||||
<text class="info-label">订单编号</text>
|
||||
<text class="info-value">{{ orderInfo.order_no }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">下单时间</text>
|
||||
<text class="info-value">{{ orderInfo.created_at }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">商品数量</text>
|
||||
<text class="info-value">{{ orderInfo.product_count || '-' }} 件</text>
|
||||
</view>
|
||||
<view class="info-row total">
|
||||
<text class="info-label">订单金额</text>
|
||||
<text class="info-value price">¥{{ orderInfo.total_amount || '0.00' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty-tip">
|
||||
<text>暂无订单信息</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品明细 -->
|
||||
<view v-if="orderInfo && orderInfo.items && orderInfo.items.length" class="products-card">
|
||||
<view class="card-title">商品明细</view>
|
||||
<view class="product-item" v-for="(item, idx) in orderInfo.items" :key="idx">
|
||||
<view class="product-info">
|
||||
<text class="product-name">{{ item.name }}</text>
|
||||
<text class="product-spec">{{ item.spec || '' }}</text>
|
||||
</view>
|
||||
<view class="product-right">
|
||||
<text class="product-price">¥{{ item.price }}</text>
|
||||
<text class="product-qty">x{{ item.quantity }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-actions">
|
||||
<view class="btn-outline" @click="handleViewOrder">查看全部订单</view>
|
||||
<view class="btn-primary" @click="handleBack">返回首页</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { get } from '@/utils/request.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deviceId: '',
|
||||
flowId: '',
|
||||
orderInfo: null,
|
||||
orderLoading: false
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.deviceId = options.device_id || '';
|
||||
this.flowId = options.flow_id || '';
|
||||
this.fetchOrderInfo();
|
||||
},
|
||||
methods: {
|
||||
async fetchOrderInfo() {
|
||||
if (!this.flowId) return;
|
||||
|
||||
this.orderLoading = true;
|
||||
try {
|
||||
// 通过 flow_id 查询订单信息
|
||||
const res = await get('/order/getByFlowId', {
|
||||
flow_id: this.flowId
|
||||
});
|
||||
|
||||
const ret = res.data || {};
|
||||
if (ret.code === 0 && ret.data) {
|
||||
this.orderInfo = ret.data;
|
||||
} else {
|
||||
console.warn('[complete] 获取订单信息失败:', ret.message);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('[complete] 获取订单信息异常:', e);
|
||||
} finally {
|
||||
this.orderLoading = false;
|
||||
}
|
||||
},
|
||||
handleViewOrder() {
|
||||
uni.navigateTo({ url: '/pages/order/order' });
|
||||
},
|
||||
handleBack() {
|
||||
uni.navigateBack({ delta: 10 });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.door-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
/* 状态区域 */
|
||||
.status-section {
|
||||
background: linear-gradient(135deg, #52c41a, #389e0d);
|
||||
padding: 80rpx 40rpx 60rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.status-icon {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.status-icon.success .icon-check {
|
||||
width: 50rpx;
|
||||
height: 28rpx;
|
||||
border-left: 6rpx solid #fff;
|
||||
border-bottom: 6rpx solid #fff;
|
||||
transform: rotate(-45deg);
|
||||
margin-top: -10rpx;
|
||||
}
|
||||
|
||||
.status-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.status-desc {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
/* 通用卡片 */
|
||||
.order-card,
|
||||
.products-card {
|
||||
background: #fff;
|
||||
margin: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
/* 订单信息行 */
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.info-row.total {
|
||||
padding-top: 24rpx;
|
||||
margin-top: 12rpx;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.info-value.price {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #e4393c;
|
||||
}
|
||||
|
||||
/* 商品明细 */
|
||||
.product-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
.product-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.product-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.product-name {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.product-spec {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.product-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.product-price {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.product-qty {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 加载/空状态 */
|
||||
.loading-tip,
|
||||
.empty-tip {
|
||||
text-align: center;
|
||||
padding: 40rpx;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
/* 底部按钮 */
|
||||
.bottom-actions {
|
||||
margin-top: auto;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
flex: 1;
|
||||
background: #fff;
|
||||
color: #2979ff;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 28rpx;
|
||||
border-radius: 48rpx;
|
||||
border: 2rpx solid #2979ff;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
flex: 1;
|
||||
background: linear-gradient(135deg, #2979ff, #1e60e0);
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 28rpx;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,189 +0,0 @@
|
||||
<template>
|
||||
<view class="door-page">
|
||||
<!-- 顶部状态区域 -->
|
||||
<view class="status-section">
|
||||
<view class="status-icon success">
|
||||
<view class="icon-check"></view>
|
||||
</view>
|
||||
<text class="status-title">柜门已打开</text>
|
||||
<text class="status-desc">请取走商品后关闭柜门</text>
|
||||
</view>
|
||||
|
||||
<!-- 设备信息 -->
|
||||
<view class="info-card">
|
||||
<view class="info-row">
|
||||
<text class="info-label">设备编号</text>
|
||||
<text class="info-value">{{ deviceId }}</text>
|
||||
</view>
|
||||
<view class="info-row" v-if="flowId">
|
||||
<text class="info-label">流水号</text>
|
||||
<text class="info-value">{{ flowId }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<view class="tips-card">
|
||||
<view class="tips-title">温馨提示</view>
|
||||
<view class="tips-list">
|
||||
<text class="tips-item">• 取走商品后请随手关门</text>
|
||||
<text class="tips-item">• 关门后系统将自动完成订单</text>
|
||||
<text class="tips-item">• 如有问题请联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-actions">
|
||||
<view class="btn-primary" @click="handleBack">返回首页</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deviceId: '',
|
||||
flowId: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.deviceId = options.device_id || '';
|
||||
this.flowId = options.flow_id || '';
|
||||
},
|
||||
methods: {
|
||||
handleBack() {
|
||||
uni.navigateBack({ delta: 10 });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.door-page {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
/* 状态区域 */
|
||||
.status-section {
|
||||
background: linear-gradient(135deg, #52c41a, #389e0d);
|
||||
padding: 80rpx 40rpx 60rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.status-icon {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.status-icon.success .icon-check {
|
||||
width: 50rpx;
|
||||
height: 28rpx;
|
||||
border-left: 6rpx solid #fff;
|
||||
border-bottom: 6rpx solid #fff;
|
||||
transform: rotate(-45deg);
|
||||
margin-top: -10rpx;
|
||||
}
|
||||
|
||||
.status-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.status-desc {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
/* 信息卡片 */
|
||||
.info-card {
|
||||
background: #fff;
|
||||
margin: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 28rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.info-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 提示卡片 */
|
||||
.tips-card {
|
||||
background: #fff;
|
||||
margin: 0 30rpx 30rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.tips-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tips-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.tips-item {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 底部按钮 */
|
||||
.bottom-actions {
|
||||
margin-top: auto;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, #2979ff, #1e60e0);
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 28rpx;
|
||||
border-radius: 48rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user