feat:我的订单部分页面
This commit is contained in:
parent
dcde470cc5
commit
1852c98463
@ -49,6 +49,7 @@ page {
|
||||
.order-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #a3a3a3;
|
||||
@ -60,6 +61,26 @@ page {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
border: 1rpx solid #f83d19;
|
||||
display: flex;
|
||||
padding: 10rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.status2 img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
color: #949494;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@ -90,7 +111,7 @@ page {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.order-footer-text text{
|
||||
.order-footer-text text {
|
||||
color: #ff3710;
|
||||
margin-left: 10rpx;
|
||||
font-weight: bold;
|
||||
@ -110,6 +131,17 @@ page {
|
||||
border: 1rpx solid #ddd;
|
||||
border-radius: 30rpx;
|
||||
font-size: 24rpx;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.yfd-btn {
|
||||
width: 160rpx;
|
||||
height: 60rpx;
|
||||
background: #ffebcb;
|
||||
color: #802002;
|
||||
border: none;
|
||||
border-radius: 30rpx;
|
||||
font-size: 24rpx;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
@ -15,15 +15,26 @@
|
||||
<view v-for="(category, catIndex) in categoryList" :key="catIndex">
|
||||
<view v-if="selectedTab === catIndex">
|
||||
<view v-for="(item, index) in orderData" :key="index">
|
||||
<view class="contentList" @click="toDetails">
|
||||
<view class="contentList">
|
||||
<!-- 订单头部信息 -->
|
||||
<view class="order-header">
|
||||
<view class="order-header" @click="toDetails(item.status)">
|
||||
<text>提交订单:{{ item.createTime }}</text>
|
||||
<text class="status">{{ item.status }}</text>
|
||||
<view
|
||||
v-if="item.status == '已取消' || item.status == '已完成'"
|
||||
class="status3"
|
||||
>{{ item.status }}</view
|
||||
>
|
||||
<view v-else-if="item.status == '退款中'" class="status2">
|
||||
<img
|
||||
src="http://localhost:8080/refund.png"
|
||||
/>
|
||||
{{ item.status }}
|
||||
</view>
|
||||
<view v-else class="status">{{ item.status }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品列表 -->
|
||||
<view class="goods-list">
|
||||
<view class="goods-list" @click="toDetails(item.status)">
|
||||
<view
|
||||
v-for="(goods, goodsIndex) in item.goodsList"
|
||||
:key="goodsIndex"
|
||||
@ -35,15 +46,50 @@
|
||||
|
||||
<!-- 订单底部信息 -->
|
||||
<view class="order-footer">
|
||||
<view class="order-footer-text"
|
||||
<view class="order-footer-text" @click="toDetails(item.status)"
|
||||
>共{{ item.totalCount }}件商品,共计
|
||||
<text> {{ item.totalPrice }}</text>
|
||||
</view>
|
||||
<view class="btn-group">
|
||||
<button class="cancel-btn" @click="cancelOrder">
|
||||
取消订单
|
||||
</button>
|
||||
<button class="pay-btn" @click="goToPay">立即支付</button>
|
||||
<view>
|
||||
<view class="btn-group" v-if="item.status === '待付款'">
|
||||
<button class="cancel-btn" @click="cancelOrder">
|
||||
取消订单
|
||||
</button>
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="pay-btn" @click="goToPay">立即支付</button>
|
||||
</view>
|
||||
<view class="btn-group" v-if="item.status === '待发货'">
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
</view>
|
||||
<view class="btn-group" v-if="item.status === '已取消'">
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="pay-btn" @click="cancelOrder">
|
||||
再来一单
|
||||
</button>
|
||||
</view>
|
||||
<view class="btn-group" v-if="item.status === '配送中'">
|
||||
<button class="cancel-btn" @click="checkLogistics">
|
||||
查看物流
|
||||
</button>
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="pay-btn" @click="cancelOrder">
|
||||
再来一单
|
||||
</button>
|
||||
</view>
|
||||
<view class="btn-group" v-if="item.status === '已完成'">
|
||||
<button class="cancel-btn" @click="cancelOrder">
|
||||
服务评价
|
||||
</button>
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="pay-btn" @click="cancelOrder">
|
||||
再来一单
|
||||
</button>
|
||||
</view>
|
||||
<view class="btn-group" v-if="item.status === '退款中'">
|
||||
<button class="pay-btn" @click="cancelOrder">
|
||||
再来一单
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -54,7 +100,7 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { picUrl, NavgateTo } from '../../../utils';
|
||||
import { picUrl, NavgateTo } from "../../../utils";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -107,6 +153,45 @@ export default {
|
||||
totalCount: 3,
|
||||
totalPrice: "¥4704.00",
|
||||
},
|
||||
{
|
||||
createTime: "2025-07-15 23:23:23",
|
||||
status: "配送中",
|
||||
goodsList: [
|
||||
{ image: "http://localhost:8080/order_index1.png" },
|
||||
{ image: "http://localhost:8080/order_index2.png" },
|
||||
{ image: "http://localhost:8080/order_index3.png" },
|
||||
{ image: "http://localhost:8080/order_index4.png" },
|
||||
{ image: "http://localhost:8080/order_index5.png" },
|
||||
],
|
||||
totalCount: 2,
|
||||
totalPrice: "¥4704.00",
|
||||
},
|
||||
{
|
||||
createTime: "2025-07-15 23:23:23",
|
||||
status: "已完成",
|
||||
goodsList: [
|
||||
{ image: "http://localhost:8080/order_index1.png" },
|
||||
{ image: "http://localhost:8080/order_index2.png" },
|
||||
{ image: "http://localhost:8080/order_index3.png" },
|
||||
{ image: "http://localhost:8080/order_index4.png" },
|
||||
{ image: "http://localhost:8080/order_index5.png" },
|
||||
],
|
||||
totalCount: 3,
|
||||
totalPrice: "¥4704.00",
|
||||
},
|
||||
{
|
||||
createTime: "2025-07-15 23:23:23",
|
||||
status: "退款中",
|
||||
goodsList: [
|
||||
{ image: "http://localhost:8080/order_index1.png" },
|
||||
{ image: "http://localhost:8080/order_index2.png" },
|
||||
{ image: "http://localhost:8080/order_index3.png" },
|
||||
{ image: "http://localhost:8080/order_index4.png" },
|
||||
{ image: "http://localhost:8080/order_index5.png" },
|
||||
],
|
||||
totalCount: 3,
|
||||
totalPrice: "¥4704.00",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -129,8 +214,12 @@ export default {
|
||||
goToPay() {
|
||||
console.log("🚀 ~ goToPay ~ goToPay:", "去支付...");
|
||||
},
|
||||
toDetails() {
|
||||
NavgateTo("/packages/myOrders/orderDetails/index");
|
||||
toDetails(status) {
|
||||
NavgateTo(`/packages/myOrders/orderDetails/index?status=${status}`);
|
||||
},
|
||||
|
||||
checkLogistics() {
|
||||
NavgateTo(`/packages/myOrders/logistics/index`);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
215
packages/myOrders/logistics/index.css
Normal file
215
packages/myOrders/logistics/index.css
Normal file
@ -0,0 +1,215 @@
|
||||
/* 全局样式 */
|
||||
page {
|
||||
background-color: #f5f7fa;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 10rpx 40rpx;
|
||||
}
|
||||
|
||||
/* 地图容器 */
|
||||
.map-container {
|
||||
height: 110vh;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
margin: 30rpx 20rpx;
|
||||
position: relative;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
/* 卡片通用样式 */
|
||||
.address-card,
|
||||
.info-card {
|
||||
background: white;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin: 0 20rpx 30rpx;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||
position: absolute;
|
||||
top: 500rpx;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
}
|
||||
|
||||
/* 信息卡片 */
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.info-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
min-width: 120rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
/* flex: 1; */
|
||||
}
|
||||
|
||||
.info-value text{
|
||||
font-size: 28rpx;
|
||||
color: #f25233;
|
||||
font-weight: 500;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
float: right;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
/* 时间轴样式 */
|
||||
.timeline {
|
||||
position: relative;
|
||||
background: white;
|
||||
border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin: 0 20rpx;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||
position: absolute;
|
||||
top: 820rpx;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
}
|
||||
|
||||
.timeline-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 30rpx;
|
||||
padding-left: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.timeline-title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 8rpx;
|
||||
height: 36rpx;
|
||||
background: #f25233;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.timeline-item {
|
||||
position: relative;
|
||||
padding-left: 60rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.timeline-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.timeline-dot {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
top: 8rpx;
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 50%;
|
||||
background: #f25233;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.timeline-item.active .timeline-dot {
|
||||
background: #ffffff;
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
left: 22rpx;
|
||||
top: 6rpx;
|
||||
box-shadow: 0 0 0 6rpx #f25233;
|
||||
}
|
||||
|
||||
.timeline-line {
|
||||
position: absolute;
|
||||
left: 29rpx;
|
||||
top: 28rpx;
|
||||
bottom: -40rpx;
|
||||
width: 2rpx;
|
||||
background: #f25233;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.timeline-item:last-child .timeline-line {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.timeline-status {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.timeline-item.active .timeline-status {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.timeline-desc {
|
||||
font-size: 28rpx;
|
||||
color: #a3a3a3;
|
||||
margin-bottom: 10rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.driver-details {
|
||||
background: #f9f9f9;
|
||||
border-radius: 10rpx;
|
||||
padding: 15rpx;
|
||||
margin: 15rpx 0;
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #555;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.detail-item-phone {
|
||||
font-size: 28rpx;
|
||||
color: #f25233;
|
||||
margin-bottom: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.detail-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.detail-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.timeline-time {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
169
packages/myOrders/logistics/index.vue
Normal file
169
packages/myOrders/logistics/index.vue
Normal file
@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 地图区域 -->
|
||||
<view class="map-container">
|
||||
<map
|
||||
id="deliveryMap"
|
||||
:latitude="latitude"
|
||||
:longitude="longitude"
|
||||
:markers="markers"
|
||||
:polyline="polyline"
|
||||
:include-points="points"
|
||||
style="width: 100%; height: 110%"
|
||||
>
|
||||
</map>
|
||||
</view>
|
||||
|
||||
<!-- 物流信息 -->
|
||||
<view class="info-card">
|
||||
<view class="info-row">
|
||||
<text class="info-label">运单号</text>
|
||||
<view>
|
||||
<text class="info-value">YD999999</text>
|
||||
<img
|
||||
class="copy-btn"
|
||||
@click="copyNumber"
|
||||
src="http://localhost:8080/copy.png"
|
||||
alt="复制"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">收件人</text>
|
||||
<text class="info-value">
|
||||
小王
|
||||
<text>1388888888</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">车牌号</text>
|
||||
<text class="info-value">京ALN233</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 物流时间轴 -->
|
||||
<view class="timeline">
|
||||
<!-- 已签收 -->
|
||||
<view class="timeline-item active">
|
||||
<view class="timeline-dot"></view>
|
||||
<view class="timeline-line"></view>
|
||||
<view class="timeline-content">
|
||||
<view class="timeline-status">已签收</view>
|
||||
<view class="timeline-desc">您的订单已被签收,感谢您的支持</view>
|
||||
<view class="timeline-time">2021-04-16 20:30:24</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 派送中 -->
|
||||
<view class="timeline-item">
|
||||
<view class="timeline-dot"></view>
|
||||
<view class="timeline-line"></view>
|
||||
<view class="timeline-content">
|
||||
<view class="timeline-status">派送中</view>
|
||||
<view class="timeline-desc">您的订单正在派送中</view>
|
||||
<view class="timeline-desc">
|
||||
<view
|
||||
>配送司机:小王
|
||||
<text class="detail-item-phone">1388888888</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="timeline-desc">
|
||||
<text>车牌号:京ALN233</text>
|
||||
</view>
|
||||
<view class="timeline-time">2021-04-16 20:06:24</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 仓库处理 -->
|
||||
<view class="timeline-item">
|
||||
<view class="timeline-dot"></view>
|
||||
<view class="timeline-line"></view>
|
||||
<view class="timeline-content">
|
||||
<view class="timeline-status">仓库处理中</view>
|
||||
<view class="timeline-desc">拣货完成</view>
|
||||
<view class="timeline-time">2021-04-16 20:30:24</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已下单 -->
|
||||
<view class="timeline-item">
|
||||
<view class="timeline-dot"></view>
|
||||
<view class="timeline-line"></view>
|
||||
<view class="timeline-content">
|
||||
<view class="timeline-status">已下单</view>
|
||||
<view class="timeline-desc">您提交了订单,预计2020-04-29送达</view>
|
||||
<view class="timeline-time">2021-04-16 20:30:24</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 坐标
|
||||
latitude: 39.90469,
|
||||
longitude: 116.40717,
|
||||
|
||||
// 地图标记点
|
||||
markers: [
|
||||
{
|
||||
id: 1,
|
||||
latitude: 39.90469,
|
||||
longitude: 116.40717,
|
||||
title: "目的地",
|
||||
iconPath: "/static/destination.png",
|
||||
width: 36,
|
||||
height: 36,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
latitude: 39.915,
|
||||
longitude: 116.42,
|
||||
title: "当前位置",
|
||||
iconPath: "/static/current.png",
|
||||
width: 40,
|
||||
height: 40,
|
||||
},
|
||||
],
|
||||
|
||||
// 配送路线
|
||||
polyline: [
|
||||
{
|
||||
points: [
|
||||
{ latitude: 39.915, longitude: 116.42 },
|
||||
{ latitude: 39.91, longitude: 116.415 },
|
||||
{ latitude: 39.907, longitude: 116.41 },
|
||||
{ latitude: 39.90469, longitude: 116.40717 },
|
||||
],
|
||||
color: "#07C160",
|
||||
width: 6,
|
||||
dottedLine: false,
|
||||
},
|
||||
],
|
||||
|
||||
// 地图显示区域
|
||||
points: [
|
||||
{ latitude: 39.915, longitude: 116.42 },
|
||||
{ latitude: 39.90469, longitude: 116.40717 },
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
copyNumber() {
|
||||
uni.setClipboardData({
|
||||
data: "YD999999",
|
||||
success: () => {
|
||||
uni.showToast({ title: "运单号已复制", icon: "success" });
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
@ -25,6 +25,14 @@ page {
|
||||
.tips {
|
||||
font-size: 24rpx;
|
||||
opacity: 0.9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.phone {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
|
||||
/* 订单金额 */
|
||||
@ -67,11 +75,27 @@ page {
|
||||
}
|
||||
|
||||
.goods-item {
|
||||
/* display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top: 20rpx; */
|
||||
}
|
||||
|
||||
.goods-content {
|
||||
display: flex;
|
||||
margin-bottom: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.goods-info-tk{
|
||||
width: 150rpx;
|
||||
height: 35rpx;
|
||||
position: relative;
|
||||
left: 550rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #fe380c;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
@ -159,7 +183,7 @@ page {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.info-value text{
|
||||
.info-value text {
|
||||
color: #f64927;
|
||||
font-size: 26rpx;
|
||||
margin-left: 10rpx;
|
||||
@ -188,7 +212,17 @@ page {
|
||||
height: 80rpx;
|
||||
background: #d9d9d9;
|
||||
color: #333;
|
||||
border: 1rpx solid #ddd;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
font-size: 30rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
|
||||
.yfd-btn {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
background: #ffebcb;
|
||||
color: #802002;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
@ -1,36 +1,69 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 顶部状态栏 -->
|
||||
<view class="status-bar">
|
||||
<view class="status-bar" v-if="status === '待付款'">
|
||||
<view class="status">待付款</view>
|
||||
<view class="countdown">剩余支付时间: {{ countdown }}</view>
|
||||
<view class="tips">10分钟内未支付订单自动取消</view>
|
||||
</view>
|
||||
<view class="status-bar" v-if="status === '待发货'">
|
||||
<view class="status">待发货</view>
|
||||
<view class="countdown">预计到货时间: 2025-09-09 9:59:59</view>
|
||||
<view class="tips">商家正在加急打包中了,请耐心等候</view>
|
||||
</view>
|
||||
<view class="status-bar" v-if="status === '配送中'">
|
||||
<view class="status">待配送</view>
|
||||
<view class="countdown">预计到货时间: 2025-09-09 9:59:59</view>
|
||||
<view class="tips">
|
||||
配送司机:15901518415
|
||||
<img class="phone" src="http://localhost:8080/phone.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="status-bar" v-if="status === '已完成' || status === '退款中'">
|
||||
<view class="status">已完成</view>
|
||||
<view class="countdown">预计到货时间: 2025-09-09 9:59:59</view>
|
||||
<view class="tips">感谢对我们的信任,期待下次光临</view>
|
||||
</view>
|
||||
<view class="status-bar" v-if="status === '已取消'">
|
||||
<view class="status">已取消</view>
|
||||
<view class="countdown">订单已取消</view>
|
||||
<view class="tips">您的订单已取消,再来一单吧</view>
|
||||
</view>
|
||||
<!-- <view class="status-bar" v-if="status === '退款中'">
|
||||
<view class="status">已完成</view>
|
||||
<view class="countdown">预计到货时间: 2025-09-09 9:59:59</view>
|
||||
<view class="tips">感谢对我们的信任,期待下次光临</view>
|
||||
</view> -->
|
||||
|
||||
<view class="content">
|
||||
<!-- 订单金额 -->
|
||||
<view class="amount-section">
|
||||
<view class="total-amount">¥{{ orderInfo.totalAmount }}</view>
|
||||
<view class="original-price"
|
||||
>商品下单应付
|
||||
<text> ¥{{ orderInfo.originalPrice }}</text>
|
||||
<view v-if="status !== '退款中'">
|
||||
<view class="total-amount">¥{{ orderInfo.totalAmount }}</view>
|
||||
<view class="original-price"
|
||||
>商品下单应付
|
||||
<text> ¥{{ orderInfo.originalPrice }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="goods-item"
|
||||
v-for="(item, index) in orderInfo.goodsList"
|
||||
:key="index"
|
||||
>
|
||||
<image :src="item.image" class="goods-img"></image>
|
||||
<view class="goods-info">
|
||||
<view>
|
||||
<view class="goods-name">{{ item.name }}</view>
|
||||
<view class="goods-desc">{{ item.desc }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="goods-price">¥{{ item.price }}</view>
|
||||
<view class="goods-info-right"> x{{ item.quantity }}</view>
|
||||
<view class="goods-content">
|
||||
<image :src="item.image" class="goods-img"></image>
|
||||
<view class="goods-info">
|
||||
<view>
|
||||
<view class="goods-name">{{ item.name }}</view>
|
||||
<view class="goods-desc">{{ item.desc }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="goods-price">¥{{ item.price }}</view>
|
||||
<view class="goods-info-right"> x{{ item.quantity }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="status === '退款中'" class="goods-info-tk">退款已完成</view>
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="info-item">
|
||||
@ -49,69 +82,95 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 配送信息 -->
|
||||
<view class="delivery-info">
|
||||
<view class="section-title">配送信息</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">配送方式</view>
|
||||
<view class="info-value">{{ orderInfo.deliveryType }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">预计配送时间</view>
|
||||
<view class="info-value">{{ orderInfo.deliveryTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收货信息 -->
|
||||
<view class="recipient-info">
|
||||
<view class="section-title">收货信息</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">收货人</view>
|
||||
<view class="info-value"
|
||||
>{{ orderInfo.recipientName }}
|
||||
<text> {{ orderInfo.recipientPhone }}</text>
|
||||
<view v-if="status !== '退款中'">
|
||||
<!-- 配送信息 -->
|
||||
<view class="delivery-info">
|
||||
<view class="section-title">配送信息</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">配送方式</view>
|
||||
<view class="info-value">{{ orderInfo.deliveryType }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">预计配送时间</view>
|
||||
<view class="info-value">{{ orderInfo.deliveryTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">收货地址</view>
|
||||
<view class="info-value">{{ orderInfo.recipientAddress }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息详情 -->
|
||||
<view class="order-detail-info">
|
||||
<view class="section-title">订单信息</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">订单编号</view>
|
||||
<view class="info-value">{{ orderInfo.orderNumber }}</view>
|
||||
<!-- 收货信息 -->
|
||||
<view class="recipient-info">
|
||||
<view class="section-title">收货信息</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">收货人</view>
|
||||
<view class="info-value"
|
||||
>{{ orderInfo.recipientName }}
|
||||
<text> {{ orderInfo.recipientPhone }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">收货地址</view>
|
||||
<view class="info-value">{{ orderInfo.recipientAddress }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">支付方式</view>
|
||||
<view class="info-value">{{ orderInfo.paymentMethod }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">下单时间</view>
|
||||
<view class="info-value">{{ orderInfo.orderTime }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">备注</view>
|
||||
<view class="info-value">{{ orderInfo.remark }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<view class="bottom-buttons">
|
||||
<button class="cancel-btn" @click="cancelOrder">取消订单</button>
|
||||
<button class="pay-btn" @click="gotoPayment">立即支付</button>
|
||||
<!-- 订单信息详情 -->
|
||||
<view class="order-detail-info">
|
||||
<view class="section-title">订单信息</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">订单编号</view>
|
||||
<view class="info-value">{{ orderInfo.orderNumber }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">支付方式</view>
|
||||
<view class="info-value">{{ orderInfo.paymentMethod }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">下单时间</view>
|
||||
<view class="info-value">{{ orderInfo.orderTime }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-label">备注</view>
|
||||
<view class="info-value">{{ orderInfo.remark }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<view class="bottom-buttons" v-if="status === '待付款'">
|
||||
<button class="cancel-btn" @click="cancelOrder">取消订单</button>
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="pay-btn" @click="gotoPayment">立即支付</button>
|
||||
</view>
|
||||
<view class="bottom-buttons" v-if="status === '待发货'">
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="cancel-btn" @click="cancelOrder">取消订单</button>
|
||||
<!-- <button class="pay-btn" @click="gotoPayment">立即支付</button> -->
|
||||
</view>
|
||||
<view class="bottom-buttons" v-if="status === '配送中'">
|
||||
<button class="cancel-btn" @click="checkLogistics">查看物流</button>
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="pay-btn" @click="gotoPayment">立即支付</button>
|
||||
</view>
|
||||
<view class="bottom-buttons" v-if="status === '已完成'">
|
||||
<button class="cancel-btn" @click="cancelOrder">服务评价</button>
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<button class="pay-btn" @click="gotoPayment">立即支付</button>
|
||||
</view>
|
||||
<view class="bottom-buttons" v-if="status === '已取消'">
|
||||
<button class="yfd-btn" @click="cancelOrder">运费单</button>
|
||||
<!-- <button class="cancel-btn" @click="cancelOrder">服务评价</button> -->
|
||||
<button class="pay-btn" @click="gotoPayment">再来一单</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { picUrl, NavgateTo } from "../../../utils";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
status: "",
|
||||
countdown: "9:59:59",
|
||||
orderInfo: {
|
||||
totalAmount: "4704.00",
|
||||
@ -155,9 +214,10 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
// 启动倒计时
|
||||
this.startCountdown();
|
||||
options?.status === "待付款" ? this.startCountdown() : "";
|
||||
this.status = options?.status;
|
||||
},
|
||||
methods: {
|
||||
startCountdown() {
|
||||
@ -194,10 +254,14 @@ export default {
|
||||
});
|
||||
},
|
||||
gotoPayment() {
|
||||
console.log("🚀 ~ gotoPayment ~ 去支付:");
|
||||
// 跳转到支付页面
|
||||
uni.navigateTo({
|
||||
url: "/kitchen/pay/index",
|
||||
});
|
||||
// uni.navigateTo({
|
||||
// url: "/kitchen/pay/index",
|
||||
// });
|
||||
},
|
||||
checkLogistics() {
|
||||
NavgateTo(`/packages/myOrders/logistics/index`);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@ -755,6 +755,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "logistics/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "物流跟踪"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user