完成京东购物新增删除编辑查看详情

This commit is contained in:
tangxinyue 2026-04-09 18:30:33 +08:00
parent 8c3298af2a
commit 107f39efef
6 changed files with 834 additions and 545 deletions

View File

@ -286,7 +286,7 @@ const getButtons = (shopType, status, item) => {
.shop-name {
white-space: nowrap;
font-size: 26rpx;
line-height: 26rpx;
line-height: 28rpx;
color: #1A1A1A;
font-weight: 700;
overflow: hidden;
@ -699,7 +699,7 @@ const getButtons = (shopType, status, item) => {
border-radius: 8rpx;
font-size: 22rpx;
margin-left: 16rpx;
border: 1rpx solid #C7C7C7;
border: 0.5px solid #C7C7C7;
color: #1A1A1A;
background-color: #FFFFFF;

View File

@ -82,7 +82,7 @@
<auto-width-input v-model="order.fullAddress" type="textarea" fontWeight="500"
fontSize="30rpx" placeholder="收货地址" color="#1A1A1A" show-edit />
</view>
<view class="edit-btn" style="margin-left: 16rpx;">修改</view>
<!-- <view class="edit-btn" style="margin-left: 16rpx;">修改</view> -->
</view>
<view class="flex" style="margin-top: 8rpx;">
<view class="phone animate-scale flex-align-center" style="margin-right: 8rpx;">
@ -165,8 +165,9 @@
</view>
<view class="order-status-box">
<view class="status-main">
<image class="status-icon" src="/static/image/shopping/jingdong/detail/qianshou.png"
mode="aspectFit">
mode="aspectFit" @click="chooseCourierImg">
</image>
<view class="status-content">
<view class="title-row">
@ -182,8 +183,11 @@
</view>
<view class="upload-box flex1 w100">
<view class="info-box flex-1 w100">
<view class="image-box shrink-0">
<view style="background-color: #EEEEEE;" class="w100 h100 flex-center">
<view class="image-box shrink-0" @click="chooseCourierImg">
<image v-if="order.courierImg" class="w100 h100" :src="order.courierImg"
mode="aspectFit">
</image>
<view v-else style="background-color: #EEEEEE;" class="w100 h100 flex-center">
<image style="width: 30rpx;height: 30rpx;" src="/static/image/common/add.png">
</image>
</view>
@ -294,7 +298,7 @@
</view>
<view v-if="activeTab == 'dengdaifukuan' || activeTab == 'yiquxiao'" class="btn-box flex"
style="margin-top: 60rpx;">
<view class="left flex-1 flex-center " style="border-right : 1rpx solid #D8D8D8;">
<view class="left flex-1 flex-center " style="border-right : 0.5px solid #D8D8D8;">
<image class="img" src="/static/image/shopping/jingdong/detail/dianpukefu.png"></image>
<view class="name flex-column flex-align-center">
<text>店铺客服</text>
@ -355,7 +359,7 @@
<view class="wx-font-medium flex flex-align-center">
<view class="flex" style="align-items: baseline;color: #FF4444;">
<text>共减</text>
<auto-width-input class="wx-font-medium" v-model="order.totalPrice" fontSize="32rpx"
<auto-width-input class="wx-font-medium" v-model="order.discount" fontSize="32rpx"
placeholder="优惠价格" color="#F10F1A" fontWeight="500" type="number" show-edit />
</view>
</view>
@ -464,7 +468,7 @@
<script setup>
import { onLoad } from "@dcloudio/uni-app";
import { ref, computed, onMounted, nextTick } from "vue";
import { ref, computed, watch, onMounted, nextTick } from "vue";
import NavBar from "@/components/nav-bar/nav-bar.vue";
import { shoppingType, shoppingClassfiy } from "../json/order.json";
import AutoWidthInput from "@/components/common/auto-width-input.vue";
@ -479,8 +483,9 @@ const navTitle = computed(() => isEditMode.value ? "修改订单" : "新增订
const shopTypeOptions = ['自营商店', '京东商店', '其它'];
const shopTypeValues = ['self', 'jd', 'none'];
const shopTypeIndex = computed(() => {
if (!order.value || !order.value.shopType) return 2; //
const idx = shopTypeValues.indexOf(order.value.shopType);
return idx > -1 ? idx : 2; //
return idx > -1 ? idx : 2;
});
const statusBarHeight = ref(0);
@ -600,19 +605,137 @@ onLoad((options) => {
}
console.log('编辑模式已激活,数据已回填:', activeTab.value);
}
} else {
//
if (order.value) {
const now = formatTime(new Date());
//
if (order.value.orderInfo) {
order.value.orderInfo.forEach(item => {
if ((item.label === '下单时间' || item.label === '支付时间') && !item.value) {
item.value = now;
}
if (item.label === '订单编号' && !item.value) {
item.value = generateRandomOrder();
}
});
}
//
if (order.value.sendType) {
order.value.sendType.forEach(item => {
if (item.label === '期望配送时间' && (!item.value || item.value.trim() === '')) {
item.value = generateDefaultExpectedTime();
}
});
}
//
if (activeTab.value === 'dengdaifukuan' && !order.value.statusDesc) {
const h = (Math.floor(Math.random() * 23) + 1).toString().padStart(2, '0');
const m = Math.floor(Math.random() * 59).toString().padStart(2, '0');
const s = Math.floor(Math.random() * 59).toString().padStart(2, '0');
order.value.statusDesc = `${h} : ${m} : ${s}`;
}
if (activeTab.value === 'zhengzaichuku' && !order.value.trackingTime) {
const date = new Date();
date.setMinutes(date.getMinutes() + Math.floor(Math.random() * 50) + 10);
order.value.trackingTime = formatTime(date);
}
if (activeTab.value === 'yiqianshou' && !order.value.trackingTime) {
const date = new Date();
date.setDate(date.getDate() + Math.floor(Math.random() * 1) + 1);
date.setHours(date.getHours() + Math.floor(Math.random() * 12));
order.value.trackingTime = formatTime(date);
}
}
}
});
/**
* 选择图片
* 选择图片并转换为本地持久化路径 (并清理旧图)
*/
const chooseImage = () => {
//
const oldImagePath = order.value.products[0].image;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
order.value.products[0].image = res.tempFilePaths[0];
const tempFilePath = res.tempFilePaths[0];
uni.showLoading({ title: '处理图片中...' });
//
uni.saveFile({
tempFilePath: tempFilePath,
success: (saveRes) => {
// 1.
order.value.products[0].image = saveRes.savedFilePath;
// 2.
if (oldImagePath && (oldImagePath.includes('_doc') || oldImagePath.includes('store_') || oldImagePath.includes('at_'))) {
uni.removeSavedFile({
filePath: oldImagePath,
success: () => console.log('旧图片已清理:', oldImagePath),
fail: (err) => console.error('旧图片清理失败:', err)
});
}
uni.showToast({ title: '图片已更新', icon: 'success' });
},
fail: (err) => {
console.error('保存图片失败:', err);
uni.showToast({ title: '图片持久化失败', icon: 'none' });
order.value.products[0].image = tempFilePath;
},
complete: () => {
uni.hideLoading();
}
});
}
});
}
/**
* 选择快递员头像并转换为本地持久化路径 (并清理旧图)
*/
const chooseCourierImg = () => {
//
const oldImagePath = order.value.courierImg;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
const tempFilePath = res.tempFilePaths[0];
uni.showLoading({ title: '处理图片中...' });
//
uni.saveFile({
tempFilePath: tempFilePath,
success: (saveRes) => {
// 1.
order.value.courierImg = saveRes.savedFilePath;
// 2.
if (oldImagePath && (oldImagePath.includes('_doc') || oldImagePath.includes('store_') || oldImagePath.includes('at_'))) {
uni.removeSavedFile({
filePath: oldImagePath,
success: () => console.log('旧头像已清理:', oldImagePath),
fail: (err) => console.error('旧头像清理失败:', err)
});
}
},
fail: (err) => {
console.error('保存头像失败:', err);
order.value.courierImg = tempFilePath;
},
complete: () => {
uni.hideLoading();
}
});
}
});
}
@ -621,6 +744,7 @@ const chooseImage = () => {
* 点击列表项触发
*/
const onClickItemInfo = (item) => {
if (item.label === '收货信息') return; //
if (item.type == 'time') {
datePickerData.value.selectDate = item.value;
datePickerData.value.endDate = formatTime(new Date());
@ -708,17 +832,100 @@ const formatTime = (date) => {
return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')} ${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}:${second.toString().padStart(2, '0')}`;
}
/**
* 随机生成 18 位订单号
*/
const generateRandomOrder = () => {
let orderNo = '30'; //
for (let i = 0; i < 16; i++) {
orderNo += Math.floor(Math.random() * 10);
}
return orderNo;
}
/**
* 生成默认期望配送时间 (明天 09:00-21:00)
*/
const generateDefaultExpectedTime = () => {
const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
const y = tomorrow.getFullYear();
const m = (tomorrow.getMonth() + 1).toString().padStart(2, '0');
const d = tomorrow.getDate().toString().padStart(2, '0');
return `${y}-${m}-${d} 09:00-21:00`;
}
/**
* 切换tab
* @param item
*/
const switchTab = (item) => {
// tab
const oldData = JSON.parse(JSON.stringify(order.value));
activeTab.value = item.key;
order.value = shoppingClassfiy[activeTab.value];
if (order.value) {
order.value.consignee = order.value.consignee;
order.value.phone = order.value.phone;
order.value.fullAddress = order.value.fullAddress;
order.value = JSON.parse(JSON.stringify(shoppingClassfiy[activeTab.value]));
if (order.value && oldData) {
//
order.value.consignee = oldData.consignee || order.value.consignee;
order.value.phone = oldData.phone || order.value.phone;
order.value.fullAddress = oldData.fullAddress || order.value.fullAddress;
order.value.shopName = oldData.shopName || order.value.shopName;
order.value.shopType = oldData.shopType || order.value.shopType;
// orderInfo
if (order.value.orderInfo && oldData.orderInfo) {
order.value.orderInfo.forEach(newInfo => {
const target = oldData.orderInfo.find(o => o.label === newInfo.label);
if (target && target.value) {
newInfo.value = target.value;
}
});
}
//
if (!isEditMode.value && order.value) {
const now = formatTime(new Date());
//
if (order.value.orderInfo) {
order.value.orderInfo.forEach(info => {
if ((info.label === '下单时间' || info.label === '支付时间') && !info.value) {
info.value = now;
}
if (info.label === '订单编号' && !info.value) {
info.value = generateRandomOrder();
}
});
}
//
if (order.value.sendType) {
order.value.sendType.forEach(info => {
if (info.label === '期望配送时间' && (!info.value || info.value.trim() === '')) {
info.value = generateDefaultExpectedTime();
}
});
}
//
if (activeTab.value === 'dengdaifukuan' && !order.value.statusDesc) {
const h = (Math.floor(Math.random() * 23) + 1).toString().padStart(2, '0');
const m = Math.floor(Math.random() * 59).toString().padStart(2, '0');
const s = Math.floor(Math.random() * 59).toString().padStart(2, '0');
order.value.statusDesc = `${h} : ${m} : ${s}`;
}
if (activeTab.value === 'zhengzaichuku' && !order.value.trackingTime) {
const date = new Date();
date.setMinutes(date.getMinutes() + Math.floor(Math.random() * 50) + 10);
order.value.trackingTime = formatTime(date);
}
if (activeTab.value === 'yiqianshou' && !order.value.trackingTime) {
const date = new Date();
date.setDate(date.getDate() + Math.floor(Math.random() * 1) + 1);
date.setHours(date.getHours() + Math.floor(Math.random() * 12));
order.value.trackingTime = formatTime(date);
}
}
}
}
@ -778,6 +985,51 @@ const onShopTypeChange = (e) => {
order.value.shopType = shopTypeValues[idx];
}
//
watch([
() => order.value?.consignee,
() => order.value?.phone,
() => order.value?.fullAddress
], ([name, phone, fullAddr]) => {
if (!order.value) return;
// 1.
const userInfoValue = `${name || ''} ${phone || ''}`.trim();
const findAndSet = (list, label, value, onlyIfEmpty = false) => {
if (!list) return;
const target = list.find(i => i.label === label);
if (target) {
if (!onlyIfEmpty || !target.value || target.value.trim() === '') {
target.value = value;
}
}
};
findAndSet(order.value.sendType, '收货信息', userInfoValue);
findAndSet(order.value.orderInfo, '收货信息', userInfoValue);
// 2. ()
if (order.value.status === '正在出库' && fullAddr) {
findAndSet(order.value.sendType, '收货地址', fullAddr, true);
findAndSet(order.value.orderInfo, '收货地址', fullAddr, true);
}
}, { deep: true, immediate: true });
//
watch([
() => order.value?.products?.[0]?.price,
() => order.value?.discount,
() => order.value?.carriage
], ([price, discount, carriage]) => {
if (!order.value) return;
const p = parseFloat(price) || 0;
const d = parseFloat(discount) || 0;
const c = parseFloat(carriage) || 0;
// - +
const total = (p - d + c).toFixed(2);
order.value.totalPrice = total;
}, { deep: true, immediate: true });
</script>
<style lang="less" scoped>
@ -920,7 +1172,7 @@ const onShopTypeChange = (e) => {
height: 54rpx;
border-radius: 8rpx;
border: 1rpx solid #C5C5C5;
border: 0.5px solid #C5C5C5;
padding: 0 52rpx;
font-size: 26rpx;
line-height: 52rpx;
@ -981,7 +1233,7 @@ const onShopTypeChange = (e) => {
width: 116rpx;
height: 54rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 1rpx solid #C5C5C5;
border: 0.5px solid #C5C5C5;
text-align: center;
font-size: 26rpx;
line-height: 50rpx;
@ -1273,7 +1525,7 @@ const onShopTypeChange = (e) => {
text-overflow: ellipsis;
font-size: 26rpx;
color: #1A1A1A;
line-height: 26rpx;
line-height: 28rpx;
font-weight: 700;
}
}
@ -1308,7 +1560,7 @@ const onShopTypeChange = (e) => {
text-overflow: ellipsis;
font-size: 26rpx;
color: #1A1A1A;
line-height: 26rpx;
line-height: 28rpx;
font-weight: 700;
}
@ -1356,7 +1608,7 @@ const onShopTypeChange = (e) => {
height: 60rpx;
line-height: 58rpx;
border-radius: 8rpx;
border: 1rpx solid #C7C7C7;
border: 0.5px solid #C7C7C7;
color: #1A1A1A;
margin-left: 22rpx;
@ -1458,7 +1710,7 @@ const onShopTypeChange = (e) => {
.order-info {
padding-bottom: 34rpx;
border-bottom: 1rpx solid #F2F2F2;
border-bottom: 0.5px solid #F2F2F2;
}
.item {

View File

@ -10,7 +10,7 @@
"phone": "",
"fullAddress": "",
"totalPrice": "",
"carriage": "",
"carriage": "0.00",
"products": [
{
"image": "",
@ -66,7 +66,7 @@
{
"label": "收货方式",
"key": "shippingMethod",
"value": ""
"value": "送货上门"
}
],
"promoType": "text",
@ -78,14 +78,15 @@
"shopName": "",
"status": "正在出库",
"trackingTitle": "仓库处理中",
"trackingDesc": "",
"trackingDesc2": "",
"trackingDesc": "预计明天9:00-15:00送达",
"trackingDesc2": "快递运输 · 温馨提示您的订单预计x月xx日09:00- 15:00送达",
"trackingTime": "",
"consignee": "",
"phone": "",
"fullAddress": "",
"totalPrice": "",
"carriage": "",
"carriage": "0.00",
"discount": "0.00",
"products": [
{
"image": "",
@ -122,7 +123,8 @@
{
"label": "下单时间",
"key": "orderTime",
"value": ""
"value": "",
"type": "time"
}
],
"sendType": [
@ -139,7 +141,8 @@
{
"label": "收货地址",
"key": "address",
"value": ""
"value": "",
"type": "textarea"
},
{
"label": "期望配送时间",
@ -164,9 +167,12 @@
"statusColor": "gray",
"trackingTitle": "已签收",
"courier": "",
"courierImg": "",
"trackingDesc": "您的订单已签收,可对快递员的服务进行评价或打赏哦~",
"trackingDesc2": "",
"trackingDesc2": "快递运输 · 温馨提示:您的订单已签收",
"trackingTime": "",
"carriage": "0.00",
"discount": "0.00",
"products": [
{
"image": "",
@ -197,12 +203,14 @@
{
"label": "支付时间",
"key": "paymentTime",
"value": ""
"value": "",
"type": "time"
},
{
"label": "下单时间",
"key": "orderTime",
"value": ""
"value": "",
"type": "time"
}
],
"sendType": [
@ -233,6 +241,8 @@
"shopName": "",
"status": "完成",
"statusColor": "gray",
"carriage": "0.00",
"discount": "0.00",
"products": [
{
"image": "",
@ -269,7 +279,8 @@
{
"label": "下单时间",
"key": "orderTime",
"value": ""
"value": "",
"type": "time"
}
],
"sendType": [
@ -286,7 +297,8 @@
{
"label": "收货地址",
"key": "address",
"value": ""
"value": "",
"type": "textarea"
}
],
"hasMore": true
@ -297,6 +309,11 @@
"shopName": "",
"status": "已取消",
"statusColor": "gray",
"carriage": "0.00",
"discount": "0.00",
"consignee": "",
"phone": "",
"fullAddress": "",
"products": [
{
"image": "",
@ -332,7 +349,8 @@
{
"label": "下单时间",
"key": "orderTime",
"value": ""
"value": "",
"type": "time"
}
],
"sendType": [

View File

@ -173,15 +173,22 @@ const handleCardClick = (item) => {
const handleDeleteOrder = () => {
const itemToDel = actionMenuState.value.item;
// 1.
// 1. ( + )
const productImage = itemToDel?.products?.[0]?.image;
if (productImage && (productImage.includes('_doc/') || productImage.includes('_downloads/') || productImage.includes('store_'))) {
const courierImage = itemToDel?.courierImg;
const cleanupFile = (path) => {
if (path && (path.includes('_doc/') || path.includes('_downloads/') || path.includes('store_') || path.includes('at_'))) {
uni.removeSavedFile({
filePath: productImage,
success: () => console.log('图片文件删除成功:', productImage),
fail: (err) => console.error('图片文件删除失败:', err)
filePath: path,
success: () => console.log('文件删除成功:', path),
fail: (err) => console.error('文件删除失败:', err)
});
}
};
cleanupFile(productImage);
cleanupFile(courierImage);
// 2.
const realIndex = mockOrderList.value.findIndex(item => item === itemToDel);
@ -227,6 +234,8 @@ onShow(() => {
if (cachedData && Array.isArray(cachedData)) {
mockOrderList.value = cachedData;
}
console.log("mockOrderList", mockOrderList.value);
});
const currentTab = ref(0);
@ -270,25 +279,40 @@ const switchFilter = (index) => {
}
};
/**
* 提取订单的时间戳用于排序
*/
const getOrderTimestamp = (item) => {
let timeStr = "";
if (item.orderInfo) {
const target = item.orderInfo.find(i => i.label === '下单时间' || i.label === '支付时间');
if (target && target.value) timeStr = target.value;
}
if (!timeStr && item.trackingTime) {
timeStr = item.trackingTime;
}
return timeStr ? new Date(timeStr.replace(/-/g, '/')).getTime() : 0;
};
/**
* 筛选订单列表
*/
const filteredOrderList = computed(() => {
const tabName = tabList.value[currentTab.value].name;
let baseList = mockOrderList.value;
let baseList = [...mockOrderList.value];
if (tabName === '购物') {
baseList = mockOrderList.value.filter(item => item.shopType !== 'waimai');
baseList = baseList.filter(item => item.shopType !== 'waimai');
} else if (tabName === '秒送') {
baseList = mockOrderList.value.filter(item => item.shopType === 'waimai');
baseList = baseList.filter(item => item.shopType === 'waimai');
}
let result = [];
if (currentFilter.value === -1) {
return baseList;
}
result = baseList;
} else {
const filterName = filterList.value[currentFilter.value].name;
return baseList.filter(item => {
result = baseList.filter(item => {
if (filterName === '待付款') return item.status === '等待付款';
if (filterName === '待收货') return item.status === '正在出库' || item.status === '待收货' || item.status === '运输中' || item.status === '已发货' || item.status === '商家备餐中' || item.status === '骑手到店取餐中';
if (filterName === '待使用') return item.status === '待使用';
@ -297,233 +321,237 @@ const filteredOrderList = computed(() => {
if (filterName === '已取消') return item.status === '已取消';
return true;
});
}
//
return result.sort((a, b) => getOrderTimestamp(b) - getOrderTimestamp(a));
});
/**
* 模拟订单列表
*/
const mockOrderList = ref([
{
id: 123211111,
shopType: 'waimai',
shopName: '安野屋 (AARYE) 京...',
status: '等待付款',
statusDesc: '29分钟',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好一人份',
desc: '不支持7天无理由退货',
service: "",
price: '69.00',
count: 1,
}
],
promoType: 'text',
promoHighlight: '近90天600+人回购',
},
{
id: 9632554,
shopType: 'waimai',
shopName: '安野屋 (AARYE) 京...',
status: '骑手到店取餐中',
trackingTitle: '10:22-10:55',
trackingDesc: '骑手已到店,大王',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好热 少糖',
desc: '不支持7天无理由退货',
service: "",
tags: [],
price: '69.00',
count: 1,
}
]
},
{
id: 63254112,
shopType: 'waimai',
shopName: '安野屋 (AARYE) 京...',
status: '商家备餐中',
trackingTitle: '10:22-10:55',
trackingDesc: '商家已接单,商品备餐中',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好热 少糖',
desc: '不支持7天无理由退货',
service: "",
tags: [],
price: '69.00',
count: 1,
}
]
},
{
id: 78456211,
shopType: 'waimai',
shopName: '瑞幸咖啡',
status: '完成',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '多肉桃桃哈哈哈哈哈哈哈哈哈哈好和和好',
desc: '不支持7天无理由退货',
service: "",
tags: [],
price: '69.00',
count: 1,
}
],
promoType: 'coupon',
promoText: '恭喜您获得3元京东购物券',
promoAction: '去领券'
},
{
id: 56322115,
shopType: 'waimai',
shopName: '瑞幸咖啡',
status: '完成',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
},
{
image: '/static/image/shopping/jingdong/product1.png',
},
{
image: '/static/image/shopping/jingdong/product1.png',
}
],
price: '17.00',
count: 2,
},
{
id: 52322221,
shopType: 'waimai',
shopName: '瑞幸咖啡',
status: '已取消',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '多肉桃桃哈哈哈哈哈哈哈哈哈哈好和和好',
desc: '不支持7天无理由退货',
tags: [],
service: "",
price: '69.00',
count: 1,
}
]
},
{
id: 8562245551,
shopType: 'self',
shopName: '安野屋 (AARYE) 京联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
status: '等待付款',
statusDesc: '20小时11分钟',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
service: "无理由退货政策",
price: '69.00',
count: 1,
}
],
promoType: 'text',
promoHighlight: '白条支付券0.5元优惠券',
},
{
id: 5504455,
shopType: 'none',
shopName: '甜小南旗舰店',
status: '正在出库',
trackingTitle: '仓库处理中',
trackingDesc: '预计 3月12日24:00 前发货3月15日 24:00 前送达',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
service: "无理由退货政策",
price: '69.00',
count: 1,
}
],
promoType: 'plus',
promoText: '告别凑单, 享免运优惠',
},
{
id: 585552,
shopType: 'self',
shopName: '甜小南旗舰店',
status: '完成',
statusColor: 'gray',
trackingTitle: '已签收',
trackingDesc: '您的订单已签收,可对快递员的服务进行评价或打赏哦~',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
service: "无理由退货政策",
price: '69.00',
count: 1,
}
],
promoType: 'plus',
promoText: '告别凑单, 享免运优惠',
hasMore: true,
},
{
id: 4545451,
shopType: 'jd',
shopName: '甜小南旗舰店',
status: '完成',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
service: "无理由退货政策",
price: '1669.00',
count: 1,
}
],
hasMore: true,
},
{
id: 1236524,
shopType: 'self',
shopName: '甜小南旗舰店',
status: '已取消',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
service: "无理由退货政策",
price: '1669.00',
count: 1,
}
]
}
// {
// id: 123211111,
// shopType: 'waimai',
// shopName: ' (AARYE) ...',
// status: '',
// statusDesc: '29',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '7退',
// service: "",
// price: '69.00',
// count: 1,
// }
// ],
// promoType: 'text',
// promoHighlight: '90600+',
// },
// {
// id: 9632554,
// shopType: 'waimai',
// shopName: ' (AARYE) ...',
// status: '',
// trackingTitle: '10:22-10:55',
// trackingDesc: '',
// trackingTime: '2026-03-10 15:14:30',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: ' ',
// desc: '7退',
// service: "",
// tags: [],
// price: '69.00',
// count: 1,
// }
// ]
// },
// {
// id: 63254112,
// shopType: 'waimai',
// shopName: ' (AARYE) ...',
// status: '',
// trackingTitle: '10:22-10:55',
// trackingDesc: '',
// trackingTime: '2026-03-10 15:14:30',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: ' ',
// desc: '7退',
// service: "",
// tags: [],
// price: '69.00',
// count: 1,
// }
// ]
// },
// {
// id: 78456211,
// shopType: 'waimai',
// shopName: '',
// status: '',
// statusColor: 'gray',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '7退',
// service: "",
// tags: [],
// price: '69.00',
// count: 1,
// }
// ],
// promoType: 'coupon',
// promoText: '3',
// promoAction: ''
// },
// {
// id: 56322115,
// shopType: 'waimai',
// shopName: '',
// status: '',
// statusColor: 'gray',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// },
// {
// image: '/static/image/shopping/jingdong/product1.png',
// },
// {
// image: '/static/image/shopping/jingdong/product1.png',
// }
// ],
// price: '17.00',
// count: 2,
// },
// {
// id: 52322221,
// shopType: 'waimai',
// shopName: '',
// status: '',
// statusColor: 'gray',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '7退',
// tags: [],
// service: "",
// price: '69.00',
// count: 1,
// }
// ]
// },
// {
// id: 8562245551,
// shopType: 'self',
// shopName: ' (AARYE) ',
// status: '',
// statusDesc: '2011',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '',
// tags: ['退'],
// service: "退",
// price: '69.00',
// count: 1,
// }
// ],
// promoType: 'text',
// promoHighlight: '0.5',
// },
// {
// id: 5504455,
// shopType: 'none',
// shopName: '',
// status: '',
// trackingTitle: '',
// trackingDesc: ' 31224:00 315 24:00 ',
// trackingTime: '2026-03-10 15:14:30',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '',
// tags: ['退'],
// service: "退",
// price: '69.00',
// count: 1,
// }
// ],
// promoType: 'plus',
// promoText: ', ',
// },
// {
// id: 585552,
// shopType: 'self',
// shopName: '',
// status: '',
// statusColor: 'gray',
// trackingTitle: '',
// trackingDesc: '~',
// trackingTime: '2026-03-10 15:14:30',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '',
// tags: ['退'],
// service: "退",
// price: '69.00',
// count: 1,
// }
// ],
// promoType: 'plus',
// promoText: ', ',
// hasMore: true,
// },
// {
// id: 4545451,
// shopType: 'jd',
// shopName: '',
// status: '',
// statusColor: 'gray',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '',
// tags: ['退'],
// service: "退",
// price: '1669.00',
// count: 1,
// }
// ],
// hasMore: true,
// },
// {
// id: 1236524,
// shopType: 'self',
// shopName: '',
// status: '',
// statusColor: 'gray',
// products: [
// {
// image: '/static/image/shopping/jingdong/product1.png',
// title: '',
// desc: '',
// tags: ['退'],
// service: "退",
// price: '1669.00',
// count: 1,
// }
// ]
// }
]);
</script>
@ -553,7 +581,7 @@ const mockOrderList = ref([
height: 60rpx;
display: flex;
align-items: center;
border: 1rpx solid #E5E5E5;
border: 0.5px solid #E5E5E5;
.search-icon {
width: 36rpx;
@ -824,7 +852,7 @@ const mockOrderList = ref([
}
.menu-line {
height: 1rpx;
height: 0.5px;
background-color: rgba(255, 255, 255, 0.1);
margin: 0 24rpx;
}

View File

@ -33,11 +33,11 @@
<view>
<view>
<image class="location" src="/static/image/shopping/jingdong/detail/location.png"></image>
<text class="name">肖战</text>
<text class="number">152633221112</text>
<text class="name">{{ order.consignee }}</text>
<text class="number">{{ formattedPhone }}</text>
</view>
<view>
<text class="address">上海市浦东新区世纪大道123号</text>
<text class="address">{{ order.fullAddress }}</text>
</view>
</view>
<view class="edit-btn">
@ -54,18 +54,18 @@
<view class="outbound-info-content">
<view class="title-info">
<view>
<text>已下单 </text>
<text>预计明天 09:00-15:00送达</text>
<text>{{ order.status === '正在出库' ? '已下单' : order.status }} </text>
<text>{{ order.trackingDesc || '预计送达时间' }}</text>
</view>
<uni-icons type="right" size="10" color="#1A1A1A"></uni-icons>
</view>
<text class="desc">快递运输 · 温馨提示您的订单预计3月11日09:00- 15:53送达</text>
<text class="desc">{{ order.trackingDesc2 }}</text>
<view class="address-box">
<view class="top">
<text class="address">华哈哈哈哈哈哈哈哈哈2栋 22-1</text>
<text class="address">{{ order.fullAddress }}</text>
<view class="edit-btn">修改</view>
</view>
<view class="phone">肖战123****1234</view>
<view class="phone">{{ order.consignee }} {{ formattedPhone }}</view>
</view>
</view>
</view>
@ -106,8 +106,8 @@
<view class="bottom-box">
<view class="dot"></view>
<view>
<text class="desc">华哈哈哈哈哈哈哈哈哈2栋 22-1</text>
<view class="name">肖战123****1234</view>
<text class="desc">{{ order.fullAddress }}</text>
<view class="name">{{ order.consignee }} {{ formattedPhone }}</view>
</view>
</view>
</view>
@ -132,9 +132,9 @@
<view class="upload-box">
<view class="info-box">
<view class="image-box">
<image class="w100 h100" :src="order.courierImg" mode="aspectFit"></image>
</view>
<text class="name">肖战</text>
<text class="name">{{ order.courier }}</text>
</view>
<view class="btn-box">
<view class="btn grey">联系Ta</view>
@ -146,8 +146,8 @@
<view class="bottom-box">
<view class="dot"></view>
<view>
<text class="desc">华哈哈哈哈哈哈哈哈哈2栋 22-1</text>
<view class="name">肖战123****1234</view>
<text class="desc">{{ order.fullAddress }}</text>
<view class="name">{{ order.consignee }} {{ formattedPhone }}</view>
</view>
</view>
</view>
@ -157,27 +157,50 @@
<view class="product-card">
<view class="title-box">
<view class="left-box">
<image class="img" src="/static/image/shopping/jingdong/detail/ziyin.png"></image>
<text class="title">安野屋AARYE红红火火恍恍惚惚哈哈哈哈哈好</text>
<image v-if="order.shopType == 'self'" class="img"
src="/static/image/shopping/jingdong/detail/ziyin.png">
</image>
<image v-if="order.shopType == 'jd'" style="width: 32rpx;height: 32rpx;margin-right: 12rpx;"
src="/static/image/shopping/jingdong/JD.png">
</image>
<text class="title">{{ order.shopName }}</text>
</view>
<uni-icons class="right-icon" size="14" color="#1A1A1A" type="right"></uni-icons>
</view>
<view class="product-info">
<view class="image-box">
<image v-if="order.products && order.products[0]" class="w100 h100" :src="order.products[0].image">
</image>
</view>
<view class="info-box">
<view class="name">联名哈哈哈哈哈哈哈哈与哈哈哈哈哈哈梦</view>
<view class="desc">联名哈哈哈哈哈哈哈哈与哈哈哈哈哈哈梦联名哈哈哈哈哈哈哈哈与哈哈哈哈哈哈梦</view>
<view class="tag">无理由退货政策</view>
<view class="name">{{ order.products && order.products[0]?.title }}</view>
<view class="desc">{{ order.products && order.products[0]?.desc }}</view>
<view class="tag">{{ order.products && order.products[0]?.service }}</view>
</view>
<view class="price-box">
<text class="price wx-font-medium">69.9</text>
<view v-if="(order.status != '等待付款' && order.status != '已取消') && order.discount > 0"
class="flex-center" style="display: inline-block;">
<image style="width: 22rpx;height: 22rpx;margin-right: 4rpx;"
src="/static/image/shopping/jingdong/detail/help.png">
</image>
<text
style="font-size: 22rpx;height: 22rpx;color: #87868E;font-weight: 300;line-height: 22rpx;margin-right: 2rpx;">到手价</text>
</view>
<text class="price wx-font-medium">{{
order.status == '等待付款' || order.status == '已取消' ?
Number(order.products[0]?.price).toFixed(2) :
Number(order.products[0]?.price - order.discount).toFixed(2)
}}</text>
<view v-if="(order.status != '等待付款' && order.status != '已取消') && order.discount > 0"
class="wx-font-medium"
style="margin-top: 2rpx;text-align: right;color: #87868E;font-weight: 500;">
<text style="font-size: 24rpx;">{{ Number(order.products[0]?.price).toFixed(2) }}</text>
</view>
</view>
</view>
<view v-if="order.status == '等待付款' || order.status == '已取消'" class="btn-box flex"
style="margin-top: 60rpx;">
<view class="left flex-1 flex-center " style="border-right : 1rpx solid #D8D8D8;">
<view class="left flex-1 flex-center " style="border-right : 0.5px solid #D8D8D8;">
<image class="img" src="/static/image/shopping/jingdong/detail/dianpukefu.png"></image>
<view class="name flex-column flex-align-center">
<text>店铺客服</text>
@ -199,19 +222,124 @@
{{ btn }}
</view>
</view>
<!-- 订单信息 -->
<view v-if="!(order.status == '等待付款' || order.status == '已取消')" class="order-info-box product-info-box">
<view v-if="activeTab != 'dengdaifukuan' && activeTab != 'yiquxiao'" class="item flex-justify-between"
style="margin-top: 32rpx;">
<text class="label shrink-0 flex-align-center">实付款</text>
<view class="flex-1 flex-align-center"
style="justify-content: flex-end;width: 300rpx;overflow-x: auto;margin-left: 20rpx;align-items: baseline;overflow-y: hidden;">
<view v-if="order.discount > 0" class="wx-font-medium flex flex-align-center"
style="height: 32rpx;">
<view class="flex" style="align-items: baseline;color: #FF4444;">
<text>共减</text><text style="font-size: 32rpx;font-weight: 500;">{{ order.discount
}}</text>
</view>
</view>
<view class="wx-font-medium flex flex-align-center" style="margin-left: 8rpx; height: 32rpx;">
<view class="flex" style="align-items: baseline;color: #1A1A1A;">
<text>合计</text><text style="font-size: 36rpx;font-weight: 500;">{{ order.totalPrice
}}</text>
</view>
</view>
</view>
</view>
<view class="order-info">
<view class="item flex-justify-between" v-for="item in order.orderInfo"
v-show="isOrderInfoExpanded || ['订单编号', '支付方式'].includes(item.label)"
@click="onClickItemInfo(item)">
<text class="label shrink-0 flex-align-center" style="color: #87868E;font-size: 26rpx;">{{
item.label
}}</text>
<view class="flex-1 flex-align-center"
style="justify-content: flex-end;width: 300rpx;overflow-x: auto;margin-left: 20rpx;">
<text style="color: #1A1A1A;font-size: 26rpx;">{{ item.value }}</text>
<uni-icons v-if="!item.type" type="right" size="10" color="#1A1A1A"
style="margin-top: 0rpx;margin-left: 4rpx;"></uni-icons>
<view v-if="item.type == 'number'" class="flex-center"
style="color: #1A1A1A;font-size: 26rpx;">
<view style="width: 2rpx;height: 16rpx;background-color: #8D8D8D;margin: 0 8rpx;">
</view>
复制
</view>
</view>
</view>
</view>
<view class="delivery-info" v-if="isOrderInfoExpanded">
<view class="item flex-justify-between" v-for="item in order.sendType"
@click="onClickItemInfo(item)">
<text class="label shrink-0" style="color: #87868E;font-size: 26rpx;">{{ item.label }}</text>
<view class="flex-1 flex-align-center"
style="justify-content: flex-end;width: 300rpx;overflow-x: auto;margin-left: 20rpx;">
<text style="color: #1A1A1A;font-size: 26rpx;">{{ item.value }}</text>
</view>
</view>
</view>
<view class="flex-center" style="padding-top: 10rpx;"
@click="isOrderInfoExpanded = !isOrderInfoExpanded">
<text style="color: #87868E;font-size: 26rpx;">{{ isOrderInfoExpanded ? '收起' : '全部订单信息' }}</text>
<uni-icons style="margin-left: 8rpx;" :type="isOrderInfoExpanded ? 'up' : 'down'" size="9"
color="#87868E"></uni-icons>
</view>
</view>
</view>
<!-- 商品总价 -->
<view v-if="order.status == '等待付款' || order.status == '已取消'" class="product-price">
<view class="title flex-justify-between">
<text>商品总价</text>
<text class="wx-font-medium" style="font-weight: 500;">69</text>
<text class="wx-font-medium" style="font-weight: 500;">{{ order.products && order.products[0]?.price
}}</text>
</view>
<view class="item flex-justify-between">
<text class="label">运费</text>
<text class="value wx-font-medium">0</text>
<text class="value wx-font-medium">{{ order.carriage }}</text>
</view>
<view class="price">需付款 <text class="number wx-font-medium">{{ order.totalPrice }}</text></view>
</view>
<!-- 订单信息 (等待付款/已取消状态) -->
<view v-if="order.status == '等待付款' || order.status == '已取消'" class="order-info-box">
<view class="title flex-justify-between" @click="isOrderInfoExpanded = !isOrderInfoExpanded">
<text>订单信息</text>
<view style="font-size: 22rpx;margin-right: 6rpx;font-weight: 400;color: #87868E;"
class="flex-align-center">
{{ isOrderInfoExpanded ? '收起' : '展开' }}
<uni-icons :type="isOrderInfoExpanded ? 'up' : 'down'" size="9" color="#87868E"
style="margin-left: 8rpx;"></uni-icons>
</view>
</view>
<view class="order-info">
<view class="item flex-justify-between" v-for="item in order.orderInfo"
v-show="isOrderInfoExpanded || ['订单编号', '支付方式', '发票类型'].includes(item.label)"
@click="onClickItemInfo(item)">
<text class="label shrink-0" style="color: #87868E;font-size: 26rpx;">{{ item.label }}</text>
<view class="flex-1 flex-align-center"
style="justify-content: flex-end;width: 300rpx;overflow-x: auto;margin-left: 20rpx;">
<text style="color: #1A1A1A;font-size: 26rpx;">{{ item.label === '订单编号' ? item.value :
item.value
}}</text>
<uni-icons v-if="!item.type" type="right" size="10" color="#1A1A1A"
style="margin-top: 0rpx;margin-left: 4rpx;"></uni-icons>
<view v-if="item.type == 'number'" class="flex-center" style="color: #1A1A1A;font-size: 26rpx;">
<view style="width: 2rpx;height: 16rpx;background-color: #8D8D8D;margin: 0 8rpx;"></view>
复制
</view>
</view>
</view>
</view>
<view class="delivery-info" v-if="isOrderInfoExpanded">
<view class="item flex-justify-between" v-for="item in order.sendType" @click="onClickItemInfo(item)">
<text class="label shrink-0" style="color: #87868E;font-size: 26rpx;">{{ item.label }}</text>
<view class="flex-1 flex-align-center"
style="justify-content: flex-end;width: 300rpx;overflow-x: auto;margin-left: 20rpx;">
<text style="color: #1A1A1A;font-size: 26rpx;">{{ item.value }}</text>
</view>
</view>
</view>
<view class="price">需付款 <text class="number wx-font-medium">69</text></view>
</view>
<!-- 快速解决问题 -->
@ -224,7 +352,7 @@
</view>
<view class="btn-box flex" style="margin-top: 30rpx;">
<view class="left flex-1 flex-center " style="border-right : 1rpx solid #D8D8D8;">
<view class="left flex-1 flex-center " style="border-right : 0.5px solid #D8D8D8;">
<image class="img" src="/static/image/shopping/jingdong/detail/dianpukefu.png"></image>
<view class="name flex-column">
<text>店铺客服</text>
@ -317,238 +445,13 @@
<script setup>
import { ref, computed } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { util } from '@/utils/common.js';
/**
* 模拟订单列表
*/
const mockOrderList = ref([
{
id: 123211111,
shopType: 'waimai',
shopName: '安野屋 (AARYE) 京...',
status: '等待付款',
statusDesc: '29分钟',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好一人份',
desc: '不支持7天无理由退货',
tags: [],
price: '69.00',
count: 1,
}
],
orderInfo: {
'orderNo': "123652632566",
'payMethod': '在线支付',
'payTime': '2026-03-10 15:14:30',
'orderTime': '2026-03-10 15:14:30',
},
deliveryInfo: {
'method': '快递运输',
'receiptInfo': '张三 12******44444',
'address': '啦啦啦啦啦啦啦啦啦啦啦啦啊啦啦啦啦啦啦',
'deliveryTime': '2026-03-10 15:14:30',
'deliveryMethod': '送货上门',
},
promoType: 'text',
promoHighlight: '近90天600+人回购',
},
{
id: 9632554,
shopType: 'waimai',
shopName: '安野屋 (AARYE) 京...',
status: '骑手到店取餐中',
trackingTitle: '10:22-10:55',
trackingDesc: '骑手已到店,大王',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好热 少糖',
desc: '不支持7天无理由退货',
tags: [],
price: '69.00',
count: 1,
}
]
},
{
id: 63254112,
shopType: 'waimai',
shopName: '安野屋 (AARYE) 京...',
status: '商家备餐中',
trackingTitle: '10:22-10:55',
trackingDesc: '商家已接单,商品备餐中',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '超值哈哈哈哈哈哈哈哈哈哈哈哈哈哈好热 少糖',
desc: '不支持7天无理由退货',
tags: [],
price: '69.00',
count: 1,
}
]
},
{
id: 78456211,
shopType: 'waimai',
shopName: '瑞幸咖啡',
status: '完成',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '多肉桃桃哈哈哈哈哈哈哈哈哈哈好和和好',
desc: '不支持7天无理由退货',
tags: [],
price: '69.00',
count: 1,
}
],
promoType: 'coupon',
promoText: '恭喜您获得3元京东购物券',
promoAction: '去领券'
},
{
id: 56322115,
shopType: 'waimai',
shopName: '瑞幸咖啡',
status: '完成',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
},
{
image: '/static/image/shopping/jingdong/product1.png',
},
{
image: '/static/image/shopping/jingdong/product1.png',
}
],
price: '17.00',
count: 2,
},
{
id: 52322221,
shopType: 'waimai',
shopName: '瑞幸咖啡',
status: '已取消',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '多肉桃桃哈哈哈哈哈哈哈哈哈哈好和和好',
desc: '不支持7天无理由退货',
tags: [],
price: '69.00',
count: 1,
}
]
},
{
id: 8562245551,
shopType: 'self',
shopName: '安野屋 (AARYE) 京联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
status: '等待付款',
statusDesc: '20小时11分钟',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
price: '69.00',
count: 1,
}
],
promoType: 'text',
promoHighlight: '白条支付券0.5元优惠券',
},
{
id: 5504455,
shopType: 'none',
shopName: '甜小南旗舰店',
status: '正在出库',
trackingTitle: '仓库处理中',
trackingDesc: '预计 3月12日24:00 前发货3月15日 24:00 前送达',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
price: '69.00',
count: 1,
}
],
promoType: 'plus',
promoText: '告别凑单, 享免运优惠',
},
{
id: 585552,
shopType: 'self',
shopName: '甜小南旗舰店',
status: '完成',
statusColor: 'gray',
trackingTitle: '已签收',
trackingDesc: '您的订单已签收,可对快递员的服务进行评价或打赏哦~',
trackingTime: '2026-03-10 15:14:30',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
price: '69.00',
count: 1,
}
],
promoType: 'plus',
promoText: '告别凑单, 享免运优惠',
hasMore: true,
},
{
id: 4545451,
shopType: 'jd',
shopName: '甜小南旗舰店',
status: '完成',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
price: '1669.00',
count: 1,
}
],
hasMore: true,
},
{
id: 1236524,
shopType: 'self',
shopName: '甜小南旗舰店',
status: '已取消',
statusColor: 'gray',
products: [
{
image: '/static/image/shopping/jingdong/product1.png',
title: '安野哈哈哈哈哈哈哈哈哈哈哈哈好好',
desc: '联名哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈好梦',
tags: ['无理由退货政策'],
price: '1669.00',
count: 1,
}
]
}
]);
const mockOrderList = ref([]);
const bottomBtns = computed(() => {
if (order.value.status == '正在出库') {
@ -588,13 +491,52 @@ const btnList = computed(() => {
return btns
})
const order = ref(null);
const order = ref({});
onLoad((options) => {
console.log(options);
console.log('详情页参数:', options);
const id = options.id;
order.value = mockOrderList.value.find(item => item.id == id);
console.log(order.value);
if (!id) return;
// 1.
const cachedList = uni.getStorageSync('jingdongShopping') || [];
let target = cachedList.find(item => String(item.id) === String(id));
// 2. mock
if (!target) {
target = mockOrderList.value.find(item => String(item.id) === String(id));
}
if (target) {
order.value = target;
console.log('成功匹配订单数据:', order.value);
} else {
console.error('未找到指定的订单数据, ID:', id);
}
});
onShow(() => {
// #ifdef APP-PLUS
util.setAndroidSystemBarColor('#FFFFFF')
setTimeout(() => {
plus.navigator.setStatusBarStyle("dark");
}, 500);
// #endif
})
// ()
const formattedPhone = computed(() => {
const phone = order.value?.phone;
if (!phone) return "";
const p = String(phone);
// 7
if (p.length >= 7) {
return p.slice(0, 3) + '****' + p.slice(-4);
}
return p;
});
// ()
const isOrderInfoExpanded = ref(false);
</script>
<style>
@ -680,7 +622,7 @@ onLoad((options) => {
height: 54rpx;
border-radius: 8rpx;
border: 1rpx solid #C5C5C5;
border: 0.5px solid #C5C5C5;
padding: 0 52rpx;
font-size: 26rpx;
line-height: 52rpx;
@ -741,7 +683,7 @@ onLoad((options) => {
width: 116rpx;
height: 54rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 1rpx solid #C5C5C5;
border: 0.5px solid #C5C5C5;
text-align: center;
font-size: 26rpx;
line-height: 50rpx;
@ -1030,7 +972,7 @@ onLoad((options) => {
text-overflow: ellipsis;
font-size: 26rpx;
color: #1A1A1A;
line-height: 26rpx;
line-height: 28rpx;
font-weight: 700;
}
}
@ -1066,7 +1008,7 @@ onLoad((options) => {
text-overflow: ellipsis;
font-size: 26rpx;
color: #1A1A1A;
line-height: 26rpx;
line-height: 28rpx;
font-weight: 700;
}
@ -1114,7 +1056,7 @@ onLoad((options) => {
height: 60rpx;
line-height: 58rpx;
border-radius: 8rpx;
border: 1rpx solid #C7C7C7;
border: 0.5px solid #C7C7C7;
color: #1A1A1A;
margin-left: 22rpx;
@ -1385,6 +1327,7 @@ onLoad((options) => {
min-height: calc(90rpx + env(safe-area-inset-bottom));
min-height: calc(90rpx + constant(safe-area-inset-bottom));
background-color: #FFFFFF;
border-top: 0.5px solid #F2F2F2;
text {
font-size: 26rpx;
@ -1434,4 +1377,52 @@ onLoad((options) => {
}
}
}
.order-info-box {
margin: 16rpx;
background-color: #FFFFFF;
border-radius: 24rpx;
padding: 28rpx 22rpx;
&.product-info-box {
padding: 0;
margin: 0;
}
.title {
font-size: 30rpx;
color: #1A1A1A;
line-height: 30rpx;
font-weight: 700;
}
.order-info {
padding-bottom: 34rpx;
}
.delivery-info {
border-top: 0.5px solid #F2F2F2;
}
.item {
display: flex;
justify-content: space-between;
margin-top: 24rpx;
height: 38rpx;
.label {
font-size: 26rpx;
color: #87868E;
line-height: 26rpx;
}
.value {
font-size: 26rpx;
color: #1A1A1A;
line-height: 26rpx;
text-align: right;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B