Browse Source

订单

dev_des
1054425342@qq.com 2 months ago
parent
commit
fcb33a7163
  1. 1
      common/index.js
  2. 2
      components/DynamicIsland.vue
  3. 2
      static/js/CommonFunction.js
  4. 63
      subPackages/memorialAlbum/index.vue
  5. 554
      subPackages/orderQy/detail.vue
  6. 219
      subPackages/orderQy/list.vue

1
common/index.js

@ -24,7 +24,6 @@ async function getLocationInfo() {
qqmapsdk.reverseGeocoder({
location,
success(response) {
console.log(response)
let info = response.result;
let _c = info.ad_info.adcode.slice(0,3)
location.cityId = info.ad_info.city_code.slice(3);

2
components/DynamicIsland.vue

@ -329,7 +329,7 @@ export default {
uni.navigateTo({
url:
"/subPackages/webPage/webPage?url=" +
"https://www.dayunyuanjian.cn/dist/#/chat-demo",
"https://des.js-dyyj.com/dist/#/",
});
},
},

2
static/js/CommonFunction.js

@ -392,3 +392,5 @@ Vue.prototype.appendToStorage = (key, newData) => {
const updated = { ...existing, ...newData };
uni.setStorageSync(key, updated);
}
Vue.prototype.JDSU_IMG_URL = "https://static.ticket.sz-trip.com"

63
subPackages/memorialAlbum/index.vue

@ -10,14 +10,14 @@
>
<view class="memorial-card">
<image
:src="showImg(item.image)"
:src="item.goodsImg.split(',')[0]"
mode="aspectFill"
class="memorial-image"
/>
<view class="memorial-info">
<text class="memorial-title">{{ item.title }}</text>
<text class="memorial-title">{{ item.goodsTitle }}</text>
<text class="memorial-code">{{ item.code }}</text>
<text class="memorial-status">{{ item.status }}</text>
<text class="memorial-status">{{ item.ownPart }}</text>
</view>
</view>
</view>
@ -31,43 +31,31 @@ export default {
data() {
return {
memorialItems: [
{
id: 1,
title: "香在苏州|世界美食之都",
code: "#001-0050/1000",
status: "XXX博物馆",
image: "/uploads/20250729/42fe2364167c2342076c4e094df3d288.png",
},
{
id: 2,
title: "香在苏州|世界美食之都",
code: "#001-0050/1000",
status: "XXX博物馆",
image: "/uploads/20250729/105755e9b2e570e46b96d54ed61abe51.png",
},
{
id: 3,
title: "香在苏州|世界美食之都",
code: "#001-0050/1000",
status: "XXX博物馆",
image: "/uploads/20250729/105755e9b2e570e46b96d54ed61abe51.png",
},
{
id: 4,
title: "香在苏州|世界美食之都",
code: "#001-0050/1000",
status: "XXX博物馆",
image: "/uploads/20250729/42fe2364167c2342076c4e094df3d288.png",
},
],
};
},
onLoad() {
this.getList()
},
methods: {
//
goBack() {
uni.navigateBack();
getList(){
this.Post(
{
},
"/framework/order/ipOrderList",
"DES"
).then((res) => {
if (res.code == 200) {
this.memorialItems = res.data
} else {
uni.showToast({
title: res.msg,
icon: "none",
});
}
});
},
//
goToDetail(item) {
uni.navigateTo({
@ -195,6 +183,11 @@ export default {
.memorial-status {
font-size: 24rpx;
color: #999;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
//

554
subPackages/orderQy/detail.vue

@ -7,73 +7,48 @@
</view>
<view class="order-title">订单详情</view>
</view>
<!-- 收货地址信息 -->
<view class="address-section" v-if="hasPhysicalGoods">
<view class="section-label">收货地址</view>
<view class="address-card" v-if="orderDetail.address">
<view class="address-info">
<text class="address-text">{{
orderDetail.address.fullAddress
}}</text>
<view class="contact-info">
<text class="contact-name">{{ orderDetail.address.name }}</text>
<text class="contact-phone">{{ orderDetail.address.phone }}</text>
</view>
</view>
</view>
<view class="no-address" v-else>
<text>该订单无需收货地址</text>
</view>
</view>
<!-- 预约发货时间 -->
<view class="delivery-section">
<view class="info-row">
<text class="info-label">预约发货时间</text>
<text class="info-value">{{ orderDetail.deliveryDate || "--" }}</text>
</view>
<view class="info-row">
<text class="info-label">快递单号</text>
<text class="info-value">{{ orderDetail.trackingNo || "--" }}</text>
</view>
</view>
<!-- 商品标题 -->
<view class="product-title">
{{ orderDetail.packageName }}
{{ orderDetail.orderName || "--" }}
</view>
<!-- 商品列表 -->
<view class="goods-section">
<view
class="goods-item"
v-for="goods in orderDetail.goodsList"
v-for="goods in orderDetail.orderChildVos"
:key="goods.id"
>
<view class="goods-checkbox">
<view class="checkbox-icon">
<image
mode="aspectFill"
src="https://picsum.photos/200/300"
:src="showImgJdsz(goods.goodsImg.split(',')[0])"
></image>
</view>
</view>
<view class="goods-content">
<view class="goods-info">
<view class="goods-name">{{ goods.name }}</view>
<view class="goods-desc">{{
goods.description || goods.spec
}}</view>
<view class="goods-quantity">数量{{ goods.quantity || 1 }}</view>
<view class="goods-name">{{ goods.goodsTitle || "-" }}</view>
<view class="goods-desc">{{ getGoodsTypeName(goods.type) }}</view>
<view class="goods-quantity">数量{{ goods.num || 1 }}</view>
</view>
<view class="goods-actions">
<button
v-if="goods.status==1"
class="action-btn"
:class="[getGoodsActionClass(goods.type)]"
@click="handleGoodsAction(goods)"
>
{{ getGoodsActionText(goods.type) }}
</button>
<button
v-else
class="action-btn"
@click="handleGoodsAction(goods)"
>
{{ getGoodsActionTexted(goods.type) }}
</button>
</view>
</view>
</view>
@ -82,12 +57,14 @@
<view class="amount-summary">
<view class="summary-row">
<text class="summary-label">订单金额</text>
<text class="summary-value">¥{{ orderDetail.goodsAmount }}</text>
<text class="summary-value"
>¥{{ orderDetail.payMoney || "0.00" }}</text
>
</view>
<view class="summary-row">
<text class="summary-label">运费</text>
<text class="summary-value"
>¥{{ orderDetail.shippingFee || "5.00" }}</text
>¥{{ orderDetail.postMoney || "0.00" }}</text
>
</view>
</view>
@ -98,57 +75,51 @@
<view class="section-title">订单信息</view>
<view class="info-row">
<text class="info-label">订单编号</text>
<text class="info-value">{{ orderDetail.orderNo }}</text>
<text class="info-value">{{ orderDetail.orderId }}</text>
</view>
<view class="info-row">
<text class="info-label">权益码</text>
<text class="info-value">{{ orderDetail.activeCode }}</text>
</view>
<!-- <view class="info-row">
<text class="info-label">商品合计</text>
<text class="info-value">{{ orderDetail.goodsAmount }}</text>
</view>
</view> -->
<view class="info-row">
<text class="info-label">物流运费</text>
<text class="info-value">{{ orderDetail.shippingFee || "5.00" }}</text>
<text class="info-value">{{ orderDetail.postMoney || "0.00" }}</text>
</view>
<view class="info-row">
<!-- <view class="info-row">
<text class="info-label">优惠券</text>
<text class="info-value">{{
orderDetail.discountAmount > 0 ? "无" : "无"
}}</text>
</view>
</view> -->
<view class="info-row total">
<text class="info-label">合计实付</text>
<text class="info-value total-amount">{{
orderDetail.totalAmount
}}</text>
<text class="info-value total-amount">{{ orderDetail.payMoney }}</text>
</view>
<view class="info-row">
<!-- <view class="info-row">
<text class="info-label">积分</text>
<text class="info-value">{{ orderDetail.points || "已获得1分" }}</text>
</view>
<view class="info-row">
</view> -->
<!-- <view class="info-row">
<text class="info-label">支付方式</text>
<text class="info-value">{{
orderDetail.payMethod || "线上支付"
}}</text>
</view>
</view> -->
<view class="info-row">
<text class="info-label">支付时间</text>
<text class="info-value">{{
formatTime(orderDetail.payTime) || formatTime(orderDetail.createTime)
}}</text>
</view>
<view class="info-row">
<text class="info-label">预约发货时间</text>
<text class="info-value">{{
orderDetail.deliveryDate || formatTime(orderDetail.createTime)
}}</text>
<text class="info-value">{{ orderDetail.payTime }}</text>
</view>
<view class="info-row">
<!-- <view class="info-row">
<text class="info-label">实际发货时间</text>
<text class="info-value">{{
formatTime(orderDetail.shippingTime) ||
formatTime(orderDetail.createTime)
}}</text>
</view>
</view> -->
<view class="info-row">
<text class="info-label">备注</text>
<text class="info-value">{{ orderDetail.remark || "XXXX" }}</text>
@ -199,6 +170,82 @@
</view>
</view>
</view>
<!-- 物流信息弹窗 -->
<view
class="logistics-popup-mask"
v-if="showLogisticsPopup"
@click="closeLogisticsPopup"
>
<view class="logistics-popup" @click.stop>
<view class="popup-header">
<text class="popup-title">物流信息</text>
<text class="popup-close" @click="closeLogisticsPopup">×</text>
</view>
<view class="popup-content">
<!-- 收货地址 -->
<view class="logistics-section">
<view class="section-title">收货地址</view>
<view class="address-info" v-if="currentLogisticsInfo">
<view class="address-detail">
<text class="address-text">
{{ currentLogisticsInfo.province
}}{{ currentLogisticsInfo.city }}{{ currentLogisticsInfo.area
}}{{ currentLogisticsInfo.address }}
</text>
</view>
<view class="contact-info">
<text class="contact-name">{{
currentLogisticsInfo.linkName
}}</text>
<text class="contact-phone">{{
currentLogisticsInfo.phone
}}</text>
</view>
</view>
</view>
<!-- 预约发货时间 -->
<view class="logistics-section">
<view class="section-title">预约发货时间</view>
<view class="info-item">
<text class="info-value">{{
currentLogisticsInfo.bookDeliveryTime || "--"
}}</text>
</view>
</view>
<!-- 快递信息 -->
<view class="logistics-section">
<view class="section-title">快递信息</view>
<view class="info-item">
<text class="info-label">快递公司</text>
<text class="info-value">{{
currentLogisticsInfo.expressName || "--"
}}</text>
</view>
<view class="info-item">
<text class="info-label">快递单号</text>
<text class="info-value">{{
currentLogisticsInfo.expressCode || "--"
}}</text>
</view>
<view class="info-item">
<text class="info-label">实际发货时间</text>
<text class="info-value">{{
currentLogisticsInfo.deliveryTime || "--"
}}</text>
</view>
<view class="info-item">
<text class="info-label">发货人</text>
<text class="info-value">{{
currentLogisticsInfo.deliveryUserName || "--"
}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
@ -208,34 +255,15 @@ export default {
return {
orderId: "",
showEquityPopup: false,
orderDetail: {
id: "",
orderNo: "",
status: 0,
packageName: "",
goodsList: [],
totalAmount: "0.00",
goodsAmount: "0.00",
discountAmount: "0.00",
shippingFee: "5.00",
points: "",
remark: "",
deliveryDate: "",
trackingNo: "",
shippingTime: "",
createTime: "",
payTime: "",
payMethod: "",
equityCode: "",
qrcode: "",
address: null,
},
showLogisticsPopup: false, //
currentLogisticsInfo: null, //
orderDetail: {},
};
},
computed: {
//
hasPhysicalGoods() {
return this.orderDetail.goodsList.some((goods) => goods.type === 2);
return this.orderDetail.orderChildVos.some((goods) => goods.type === 2);
},
//
showBottomActions() {
@ -255,9 +283,16 @@ export default {
//
async loadOrderDetail() {
try {
uni.showLoading({ title: "加载中..." });
const res = await this.getOrderDetail(this.orderId);
this.Post({}, `/framework/order/${this.orderId}`, "DES").then((res) => {
if (res.code == 200) {
this.orderDetail = res.data;
} else {
uni.showToast({
title: res.msg,
icon: "none",
});
}
});
} catch (error) {
console.error("加载订单详情失败:", error);
uni.showToast({
@ -270,65 +305,6 @@ export default {
},
//
loadMockData() {
this.orderDetail = {
id: "mock001",
orderNo: "238232342424234423",
status: 2, //
packageName: "食在扬州|世界美食之都巡礼",
packageId: "pkg001",
totalAmount: "699.00",
goodsAmount: "699.00",
discountAmount: "0.00",
shippingFee: "0.00",
points: "已获得1分",
remark: "XXXX",
deliveryDate: "2025-08-10",
trackingNo: "SF120025020202",
shippingTime: "2025-07-15 01:46:25",
createTime: "2025-07-15 00:46:25",
payTime: "2025-07-15 00:46:25",
payMethod: "线上支付",
equityCode: "EPIC2024010112345",
qrcode: "/static/image/qrcode-sample.png",
goodsList: [
{
id: 1,
name: "IP数字资产",
type: 1,
description: "在数字资产相册中查看",
price: "99.00",
quantity: 1,
},
{
id: 2,
name: "IP文创公仔",
type: 2,
description: "这里是XXX相仿介绍介绍",
price: "150.00",
quantity: 1,
},
{
id: 3,
name: "XXX园叮门票",
type: 3,
description: "这里是XXX园叮门票的介绍介绍介绍",
price: "50.00",
quantity: 1,
},
],
address: {
name: "XX先生",
phone: "183****1234",
fullAddress: "江苏省苏州市姑苏区XXXXXX",
province_text: "江苏省",
city_text: "苏州市",
district_text: "姑苏区",
detail_addr: "XXXXXX",
is_default: 1,
},
};
},
//
getStatusIcon(status) {
@ -342,16 +318,16 @@ export default {
return iconMap[status] || "/static/icon/status-default.png";
},
//
getStatusText(status) {
const statusMap = {
0: "待使用",
1: "待收货",
0: "待激活",
1: "待使用",
2: "待收货",
3: "已完成",
4: "用户已驳回",
4: "售后/退款",
"-1": "取消",
};
return statusMap[status] || "未知状态";
return statusMap[status] || "未知";
},
//
@ -368,6 +344,14 @@ export default {
//
getGoodsActionText(type) {
const textMap = {
1: "去查看",
2: "预约发货",
3: "去使用",
};
return textMap[type] || "去查看";
},
getGoodsActionTexted(type) {
const textMap = {
1: "去查看",
2: "查看物流",
@ -375,6 +359,14 @@ export default {
};
return textMap[type] || "去查看";
},
showImgJdsz(img) {
if (!img) return;
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
return img;
} else {
return this.JDSU_IMG_URL + img;
}
},
//
getGoodsActionClass(type) {
@ -431,6 +423,79 @@ export default {
this.showEquityPopup = false;
},
//
handleGoodsAction(goods) {
switch (goods.type) {
case 1: // IP -
this.viewDigitalAsset(goods);
break;
case 2: // IP -
this.reserveDelivery(goods);
break;
case 3: // - 使
this.useTicket(goods);
break;
}
},
//
viewDigitalAsset(goods) {
//
uni.showToast({
title: "查看数字资产",
icon: "none",
});
uni.navigateTo({
url: "/subPackages/memorialAlbum/detail",
});
},
//
reserveDelivery(goods) {
//
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${goods.orderId}`,
});
},
// 使
useTicket(goods) {
// 使
uni.showToast({
title: "使用门票",
icon: "none",
});
},
//
showLogisticsInfo(goods) {
if (goods.orderExchangeVo) {
this.currentLogisticsInfo = goods.orderExchangeVo;
this.showLogisticsPopup = true;
} else {
uni.showToast({
title: "暂无物流信息",
icon: "none",
});
}
},
//
closeLogisticsPopup() {
this.showLogisticsPopup = false;
this.currentLogisticsInfo = null;
},
//
viewGoodsDetail(goods) {
//
if (goods.type === 1) {
uni.navigateTo({
url: `/subPackages/equityGoods/detail?id=${goods.goodsId}`,
});
}
},
//
copyEquityCode() {
uni.setClipboardData({
@ -510,87 +575,6 @@ export default {
).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
},
// API -
async getOrderDetail(orderId) {
// API - ID
return new Promise((resolve) => {
setTimeout(() => {
// ID
const statusMapping = {
1: 0, // 使
2: 1, //
3: 2, //
4: 3, //
5: 4, //
};
const orderStatus = statusMapping[orderId] || 1;
const mockData = {
code: 200,
data: {
id: orderId,
orderNo: "238232342424234423",
status: orderStatus,
packageName: "食在扬州|世界美食之都巡礼",
packageId: "pkg001",
totalAmount: "699.00",
goodsAmount: "699.00",
discountAmount: "0.00",
shippingFee: "0.00",
points: "已获得1分",
remark: "XXXX",
deliveryDate: "2025-08-10",
trackingNo: orderStatus >= 1 ? "SF120025020202" : "--",
shippingTime: orderStatus >= 2 ? "2025-07-15 01:46:25" : "",
createTime: "2025-07-15 00:46:25",
payTime: orderStatus >= 1 ? "2025-07-15 00:46:25" : "",
payMethod: "线上支付",
equityCode: "EPIC2024010112345",
qrcode: "/static/image/qrcode-sample.png",
goodsList: [
{
id: 1,
name: "IP数字资产",
type: 1,
description: "在数字资产相册中查看",
price: "99.00",
quantity: 1,
},
{
id: 2,
name: "IP文创公仔",
type: 2,
description: "这里是XXX相仿介绍介绍",
price: "150.00",
quantity: 1,
},
{
id: 3,
name: "XXX园叮门票",
type: 3,
description: "这里是XXX园叮门票的介绍介绍介绍",
price: "50.00",
quantity: 1,
},
],
address: {
name: "XX先生",
phone: "183****1234",
fullAddress: "江苏省苏州市姑苏区XXXXXX",
province_text: "江苏省",
city_text: "苏州市",
district_text: "姑苏区",
detail_addr: "XXXXXX",
is_default: 1,
},
},
};
resolve(mockData);
}, 500);
});
},
// API -
async cancelOrderApi(orderId) {
return new Promise((resolve) => {
@ -994,4 +978,102 @@ export default {
font-size: 24rpx;
color: #999;
}
//
.logistics-popup-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
}
.logistics-popup {
width: 650rpx;
max-height: 80vh;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
display: flex;
flex-direction: column;
}
.logistics-popup .popup-content {
padding: 30rpx;
text-align: left;
flex: 1;
overflow-y: auto;
}
.logistics-section {
margin-bottom: 30rpx;
&:last-child {
margin-bottom: 0;
}
}
.logistics-section .section-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
border-left: 4rpx solid #007aff;
padding-left: 16rpx;
}
.address-info {
background-color: #f8f9fa;
border-radius: 12rpx;
padding: 20rpx;
}
.address-detail {
margin-bottom: 12rpx;
}
.address-text {
font-size: 26rpx;
color: #333;
line-height: 1.5;
}
.contact-info {
display: flex;
gap: 20rpx;
}
.contact-name,
.contact-phone {
font-size: 24rpx;
color: #666;
}
.info-item {
display: flex;
align-items: center;
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
}
.info-label {
font-size: 26rpx;
color: #666;
min-width: 160rpx;
flex-shrink: 0;
}
.info-value {
font-size: 26rpx;
color: #333;
flex: 1;
}
</style>

219
subPackages/orderQy/list.vue

@ -35,7 +35,7 @@
<!-- 权益商品包名 -->
<view class="package-section">
<text class="package-name">{{ order.packageName }}</text>
<text class="package-name">{{ order.orderName }}</text>
<text class="status-name">{{ getStatusText(order.status) }}</text>
</view>
@ -44,33 +44,42 @@
<view class="goods-list">
<view
class="goods-item"
v-for="goods in order.goodsList"
v-for="goods in order.orderChildVos"
:key="goods.id"
>
<image
v-if="goods.goodsImg"
class="goods-image"
src="https://picsum.photos/200/200"
:src="showImgJdsz(goods.goodsImg&&goods.goodsImg.split(',')[0])"
mode="aspectFill"
/>
<view class="goods-info">
<text class="goods-name">{{ goods.name }}</text>
<text class="goods-name">{{ goods.goodsTitle }}</text>
<view class="goods-meta">
<text class="goods-type">{{
getGoodsTypeName(goods.type)
}}</text>
<text class="goods-quantity"
>数量{{ goods.quantity || 1 }}</text
>
<text class="goods-quantity">数量{{ goods.num || 1 }}</text>
</view>
</view>
<view class="goods-action">
<!-- 未使用 -->
<button
v-if="goods.status == 1"
class="action-btn"
:class="[getActionBtnClass(goods.type)]"
:class="[getActionBtnClass(goods.status)]"
@click.stop="handleGoodsAction(goods)"
>
{{ getActionBtnText(goods.type) }}
</button>
<button
v-else
class="action-btn"
:class="[getActionBtnClass(goods.status)]"
@click.stop="handleGoodsAction(goods)"
>
{{ getActionBtnTexted(goods.type) }}
</button>
</view>
</view>
</view>
@ -81,7 +90,7 @@
<view class="order-info">
<view class="order-total-section">
<text class="total-label">实付金额</text>
<text class="order-total">¥{{ order.totalAmount }}</text>
<text class="order-total">¥{{ order.payMoney || 0 }}</text>
</view>
</view>
<view class="order-actions">
@ -132,18 +141,13 @@
</view>
<view class="popup-content">
<!-- 二维码 -->
<view class="qrcode-container">
<image
class="qrcode-image"
:src="currentEquity.qrcode"
mode="aspectFit"
/>
</view>
<!-- <view class="qrcode-container">
<image class="qrcode-image" :src="currentEquity.qrcode" mode="aspectFit" />
</view> -->
<!-- 编号串码 -->
<view class="code-container">
<text class="code-label">权益码</text>
<text class="code-value" @longpress="copyCode">{{
currentEquity.code
currentEquity.activeCode
}}</text>
</view>
<text class="code-tip">长按编号可复制</text>
@ -159,11 +163,26 @@ export default {
return {
currentTab: 0,
tabs: [
{ name: "全部", status: "" },
{ name: "待使用", status: 1 },
{ name: "待收货", status: 2 },
{ name: "已完成", status: 3 },
{ name: "售后/退款", status: 4 },
{
name: "全部",
status: "",
},
{
name: "待使用",
status: 1,
},
{
name: "待收货",
status: 2,
},
{
name: "已完成",
status: 3,
},
{
name: "售后/退款",
status: 4,
},
],
orderList: [],
loading: false,
@ -179,11 +198,19 @@ export default {
},
onLoad(e) {
if (e.status) {
this.currentTab = e.status
this.currentTab = e.status;
}
this.loadOrderList();
},
methods: {
showImgJdsz(img) {
if (!img) return;
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
return img;
} else {
return this.JDSU_IMG_URL + img;
}
},
// Tab
switchTab(index) {
this.currentTab = index;
@ -205,22 +232,28 @@ export default {
this.loading = true;
try {
const params = {
page: this.currentPage,
pageNum: this.currentPage,
pageSize: this.pageSize,
status: this.tabs[this.currentTab].status,
};
// API
const res = await this.getOrderList(params);
if (this.currentPage === 1) {
this.orderList = res.data.list || [];
this.Post(
{
...params,
},
"/framework/order/list",
"DES"
).then((res) => {
if (res.code == 200) {
this.orderList.push(...res.rows);
this.hasMore = res.rows.length === this.pageSize;
this.currentPage++;
} else {
this.orderList = [...this.orderList, ...(res.data.list || [])];
uni.showToast({
title: res.msg,
icon: "none",
});
}
this.hasMore = res.data.list.length === this.pageSize;
this.currentPage++;
});
} catch (error) {
console.error("加载订单列表失败:", error);
uni.showToast({
@ -248,11 +281,12 @@ export default {
//
getStatusText(status) {
const statusMap = {
0: "待付款",
0: "待激活",
1: "待使用",
2: "待收货",
3: "已完成",
4: "售后/退款",
"-1": "取消",
};
return statusMap[status] || "未知";
},
@ -274,7 +308,7 @@ export default {
const typeMap = {
1: "IP数字资产",
2: "IP资源商品",
3: "君道苏州门票",
3: "门票",
};
return typeMap[type] || "未知类型";
},
@ -288,6 +322,14 @@ export default {
};
return textMap[type] || "操作";
},
getActionBtnTexted(type) {
const textMap = {
1: "查看",
2: "已使用",
3: "已使用",
};
return textMap[type] || "操作";
},
//
getActionBtnClass(type) {
@ -322,17 +364,15 @@ export default {
icon: "none",
});
uni.navigateTo({
url:'/subPackages/memorialAlbum/detail'
})
url: "/subPackages/memorialAlbum/detail",
});
},
//
reserveDelivery(goods) {
//
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${
goods.id
}&goodsName=${encodeURIComponent(goods.name)}`,
url: `/subPackages/orderQy/confrim?goodsId=${goods.orderId}`,
});
},
@ -348,7 +388,7 @@ export default {
//
goToOrderDetail(order) {
uni.navigateTo({
url: `/subPackages/orderQy/detail?id=${order.id}&orderNo=${order.orderNo}`,
url: `/subPackages/orderQy/detail?id=${order.orderId}`,
});
},
@ -356,7 +396,7 @@ export default {
showEquityCode(order) {
this.currentEquity = {
qrcode: order.qrcode || "/static/image/default-qrcode.png",
code: order.equityCode || "EQUITY123456789",
activeCode: order.activeCode,
};
this.$refs.equityPopup.open();
},
@ -390,90 +430,6 @@ export default {
date.getHours()
).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
},
// API -
async getOrderList(params) {
// API
return new Promise((resolve) => {
setTimeout(() => {
const mockData = {
code: 200,
data: {
list: [
{
id: 1,
orderNo: "EQ202401011234567",
packageName: "Epic Soul限定权益包",
status: 1,
totalAmount: "299.00",
createTime: "2024-01-01 12:00:00",
qrcode: "/static/image/qrcode-sample.png",
equityCode: "EPIC2024010112345",
goodsList: [
{
id: 1,
name: "数字藏品-桃子系列",
type: 1,
price: "99.00",
image: "/static/image/goods1.jpg",
},
{
id: 2,
name: "文创周边产品",
type: 2,
price: "150.00",
image: "/static/image/goods2.jpg",
},
{
id: 3,
name: "君道苏州体验门票",
type: 3,
price: "50.00",
image: "/static/image/goods3.jpg",
},
],
},
{
id: 1,
orderNo: "EQ202401011234567",
packageName: "Epic Soul限定权益包",
status: 1,
totalAmount: "299.00",
createTime: "2024-01-01 12:00:00",
qrcode: "/static/image/qrcode-sample.png",
equityCode: "EPIC2024010112345",
goodsList: [
{
id: 1,
name: "数字藏品-桃子系列",
type: 1,
price: "99.00",
image: "/static/image/goods1.jpg",
},
{
id: 2,
name: "文创周边产品",
type: 2,
price: "150.00",
image: "/static/image/goods2.jpg",
},
{
id: 3,
name: "君道苏州体验门票",
type: 3,
price: "50.00",
image: "/static/image/goods3.jpg",
},
],
},
//
],
},
};
resolve(mockData);
}, 1000);
});
},
},
};
</script>
@ -711,11 +667,12 @@ $bg-light: #f7fafc;
height: 100rpx;
border-radius: 12rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.goods-info {
flex: 1;
margin-right: 20rpx;
width: 330rpx;
}
.goods-name {
@ -760,6 +717,8 @@ $bg-light: #f7fafc;
}
.goods-action {
margin-left: auto;
.action-btn {
padding: 0rpx 20rpx;
border-radius: 10rpx;
@ -773,6 +732,7 @@ $bg-light: #f7fafc;
background-color: #77f3f9;
height: 55rpx;
line-height: 55rpx;
&:active {
transform: scale(0.95);
}
@ -850,6 +810,7 @@ $bg-light: #f7fafc;
transition: all 0.3s ease;
height: 55rpx;
line-height: 55rpx;
&:active {
transform: scale(0.95);
}

Loading…
Cancel
Save