Browse Source

订单详情

dev_des
1054425342@qq.com 2 months ago
parent
commit
96c4555066
  1. 203
      pages/index/iSoul.vue
  2. 22
      static/js/CommonFunction.js
  3. 7
      static/js/request.js
  4. 2
      subPackages/equityGoods/detail.vue
  5. 199
      subPackages/memorialAlbum/detail.vue
  6. 109
      subPackages/memorialAlbum/index.vue
  7. 1060
      subPackages/orderQy/confrim.vue
  8. 149
      subPackages/orderQy/detail.vue
  9. 101
      subPackages/orderQy/list.vue
  10. 2
      subPackages/user/collection.vue

203
pages/index/iSoul.vue

@ -153,25 +153,44 @@
<view class="divider-text">数字资产纪念册</view>
<view class="divider-line"></view>
</view>
<view class="memorial-cards">
<view class="memorial-card" @click="handleMemorialClick(0)">
<image :src="
showImg('/uploads/20250729/105755e9b2e570e46b96d54ed61abe51.png')
" mode="aspectFill" class="memorial-img"></image>
<view class="memorial-info">
<text class="memorial-title">世界花园凤景里的苏州</text>
<text class="memorial-more">MORE</text>
<!-- 有数据时显示 -->
<view class="memorial-cards" v-if="memorialItems.length > 0" :class="{'single-item': memorialItems.length === 1}">
<!-- 单条数据特殊展示 -->
<template v-if="memorialItems.length === 1">
<view class="memorial-card-single" @click="handleMemorialClick(0)">
<view class="single-card-wrapper">
<image :src="showImg(memorialItems[0].goodsImg )" mode="aspectFill" class="memorial-img-single"></image>
<view class="single-overlay">
<view class="single-badge">专属纪念册</view>
<view class="single-title">{{ memorialItems[0].goodsTitle || '数字资产纪念册' }}</view>
<view class="single-desc">{{memorialItems[0].code}}</view>
<view class="single-action">
<text class="action-text">立即查看</text>
<text class="action-arrow"></text>
</view>
</view>
<view class="memorial-card" @click="handleMemorialClick(1)">
<image :src="
showImg('/uploads/20250729/42fe2364167c2342076c4e094df3d288.png')
" mode="aspectFill" class="memorial-img"></image>
</view>
</view>
</template>
<!-- 多条数据正常展示 -->
<template v-else>
<view class="memorial-card" v-for="(item, index) in memorialItems" :key="index" @click="handleMemorialClick(index)">
<image :src="showImg(item.goodsImg )" mode="aspectFill" class="memorial-img"></image>
<view class="memorial-info">
<text class="memorial-title">男神女神罗曼史</text>
<text class="memorial-title">{{ item.goodsTitle || '数字资产纪念册' }}</text>
<text class="memorial-more">MORE</text>
</view>
</view>
</template>
</view>
<!-- 无数据时显示 -->
<view class="memorial-empty" v-else>
<view class="empty-content">
<view class="empty-icon">📖</view>
<text class="empty-title">暂无纪念册</text>
<text class="empty-desc">您还没有数字资产纪念册</text>
<text class="empty-tip">快去购买数字资产创建您的专属纪念册吧</text>
</view>
</view>
</view>
@ -267,6 +286,7 @@
],
exchangeCode: "", //
memorialItems:[]
};
},
onLoad() {
@ -279,8 +299,28 @@
JSON.parse(uni.getStorageSync("userInfo"))) ||
this.$store.state.user.userInfo || {};
console.log(this.userInfo);
if (this.userInfo && this.userInfo.token) {
this.getListIp()
}
},
methods: {
getListIp() {
this.Post({},
"/framework/order/ipOrderList",
"DES"
).then((res) => {
if (res.code == 200) {
if(res.data){
this.memorialItems = res.data.slice(0,2)
}
} else {
uni.showToast({
title: res.msg,
icon: "none",
});
}
});
},
//
goBack() {
uni.navigateBack();
@ -917,6 +957,104 @@
gap: 20rpx;
}
/* 单条数据特殊展示样式 */
.memorial-card-single {
width: 100%;
max-width: 100%;
margin: 0 auto;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.15);
transition: all 0.3s ease;
position: relative;
}
.memorial-card-single:active {
transform: scale(0.98);
box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.2);
}
.single-card-wrapper {
position: relative;
width: 100%;
height: 400rpx;
overflow: hidden;
}
.memorial-img-single {
width: 100%;
height: 100%;
transition: transform 0.3s ease;
}
.memorial-card-single:active .memorial-img-single {
transform: scale(1.05);
}
.single-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
padding: 60rpx 30rpx 30rpx;
color: white;
}
.single-badge {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
font-size: 22rpx;
padding: 8rpx 16rpx;
border-radius: 20rpx;
display: inline-block;
margin-bottom: 16rpx;
font-weight: 500;
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
}
.single-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 8rpx;
line-height: 1.3;
}
.single-desc {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 20rpx;
line-height: 1.4;
}
.single-action {
display: flex;
align-items: center;
justify-content: space-between;
background: rgba(255, 255, 255, 0.1);
border-radius: 25rpx;
padding: 12rpx 20rpx;
backdrop-filter: blur(10rpx);
border: 1rpx solid rgba(255, 255, 255, 0.2);
}
.action-text {
font-size: 26rpx;
font-weight: 500;
color: white;
}
.action-arrow {
font-size: 28rpx;
font-weight: bold;
color: white;
transition: transform 0.3s ease;
}
.memorial-card-single:active .action-arrow {
transform: translateX(6rpx);
}
.memorial-card {
flex: 1;
border-radius: 10rpx;
@ -950,6 +1088,45 @@
color: #999;
}
/* 无数据时的空状态样式 */
.memorial-empty {
display: flex;
justify-content: center;
align-items: center;
min-height: 280rpx;
}
.empty-content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
color: #333333;
}
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
opacity: 0.6;
}
.empty-title {
font-size: 32rpx;
color: white;
font-weight: 500;
margin-bottom: 10rpx;
}
.empty-desc {
font-size: 26rpx;
margin-bottom: 8rpx;
}
.empty-tip {
font-size: 24rpx;
line-height: 1.4;
}
/* 底部菜单 */
.bottom-menu {
padding: 40rpx 30rpx;

22
static/js/CommonFunction.js

@ -394,3 +394,25 @@ Vue.prototype.appendToStorage = (key, newData) => {
}
Vue.prototype.JDSU_IMG_URL = "https://static.ticket.sz-trip.com"
Vue.prototype.addImgStyleToHtml = (htmlStr) => {
return htmlStr.replace(/<img\b([^>]*)>/gi, (match, attrs) => {
// 检查是否已有 style 属性
if (/style\s*=/.test(attrs)) {
// 已有 style,合并 width:100%
return `<img${attrs.replace(
/style\s*=\s*(['"])(.*?)\1/,
(m, quote, styleVal) => {
// 合并 width:100% 到已有 style
let newStyle = styleVal;
if (!/width\s*:\s*100%/.test(styleVal)) {
newStyle = `width:100%;${styleVal}`;
}
return `style=${quote}${newStyle}${quote}`;
}
)}>`;
} else {
// 没有 style,直接加
return `<img${attrs} style="width:100%">`;
}
});
}

7
static/js/request.js

@ -4,12 +4,13 @@ import store from '@/store';
// 定义 API URL
// const DEV_API_URL = 'https://epic.new.js-dyyj.com';
const DEV_API_URL = 'https://epic.js-dyyj.com';
const PROD_API_URL = 'https://epic.js-dyyj.com';
// const PROD_API_URL = 'https://epic.js-dyyj.com';
const PROD_API_URL = 'https://epic.new.js-dyyj.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;
const DEV_API_URL_DES = 'http://192.168.124.118:8083/xcx';
const PROD_API_URL_DES = 'http://192.168.124.118:8083/xcx';
// const DEV_API_URL_DES = 'https://des.js-dyyj.com/xcx';
const PROD_API_URL_DES = 'https://des.js-dyyj.com/xcx';
const NEWAPIURL_DES = process.env.NODE_ENV === 'development' ? DEV_API_URL_DES : PROD_API_URL_DES;
// 获取token
const getToken = () => {
const userInfoFromStorage = uni.getStorageSync('userInfo');
if (userInfoFromStorage) {

2
subPackages/equityGoods/detail.vue

@ -243,7 +243,7 @@ export default {
res.data.goodsVos.forEach((element) => {
element.detailUrl = this.addImgStyleToHtml(element.detailUrl);
});
if(res.data.sku){
if(res.data.sku&&res.data.sku.product.scene){
this.scene = JSON.parse(res.data.sku.product.scene)
this.scene.content = this.addImgStyleToHtml(this.scene.content);
}

199
subPackages/memorialAlbum/detail.vue

@ -1,53 +1,61 @@
<template>
<view class="memorial-detail">
<!-- 主图区域 -->
<view class="main-image-section">
<image
:src="showImg(detailInfo.image)"
mode="aspectFill"
class="main-image"
@click="previewMainImage"
/>
<!-- 轮播图区域 -->
<view class="banner-content">
<swiper class="top-banner" :circular="true" :interval="6000" :duration="800" :indicator-dots="false"
:autoplay="true" @change="swiperChange">
<swiper-item v-for="(item, index) in topBanner" :key="index">
<image class="top-banner" :src="showImg(item)" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view class="dot-container">
<view :class="['dot-line', index == swiperIndex ? 'active' : '']" v-for="(item, index) in topBanner"
:key="index"></view>
</view>
<!-- 页码指示器 -->
<view class="page-indicator">
<text class="page-text">{{ swiperIndex + 1 }}/{{ topBanner.length }}</text>
</view>
</view>
<!-- 数字资产信息卡片 -->
<view class="asset-info-card">
<view class="card-header">
<text class="asset-title">{{ detailInfo.title }}</text>
<text class="asset-title">{{ detailInfo.goodsName }}</text>
</view>
<view class="info-row">
<text class="info-label">发行数量</text>
<text class="info-value">{{ detailInfo.totalSupply }}</text>
<text class="info-value">{{ detailInfo.publishQuantity||0 }}</text>
</view>
<view class="divider"></view>
<view class="info-row">
<text class="info-label">数字资产所有方</text>
<text class="info-value">{{ detailInfo.owner }}</text>
<text class="info-value">{{ detailInfo.ownPart||'-' }}</text>
</view>
<view class="info-row">
<text class="info-label">数字资产权利方</text>
<text class="info-value">{{ detailInfo.rightHolder }}</text>
<text class="info-value">{{ detailInfo.powerPart||'-' }}</text>
</view>
<view class="info-row">
<text class="info-label">数字资产所有方</text>
<text class="info-value">{{ detailInfo.assetOwner }}</text>
<text class="info-label">授权品牌</text>
<text class="info-value">{{ detailInfo.authorizeBrand||'-' }}</text>
</view>
<!-- 收藏信息 -->
<view class="collection-info">
<view class="collection-header"> 收藏信息 </view>
<view class="collector-info">
<text class="collector-label">收藏者</text>
<text class="collector-name">{{ detailInfo.collector }}</text>
<text class="collector-name">{{ detailInfo.nickname||'--' }}</text>
<text class="collection-number">编号</text>
<text class="collection-code">{{ detailInfo.collectionCode }}</text>
<text class="collection-code">{{ detailInfo.code||'--' }}</text>
<text class="collection-time-label">收藏时间</text>
<text class="collection-time">{{ detailInfo.collectionTime }}</text>
<text class="collection-time">{{ detailInfo.activeTime||'--' }}</text>
</view>
</view>
</view>
@ -57,23 +65,8 @@
<view class="cert-header"> 认证信息 </view>
<view class="cert-row">
<text class="cert-label">权证码</text>
<text class="cert-value">{{ detailInfo.certificateCode }}</text>
</view>
<view class="cert-row">
<text class="cert-label">合约地址</text>
<text class="cert-value">{{ detailInfo.contractAddress }}</text>
</view>
<view class="cert-row">
<text class="cert-label">交易HASH</text>
<text class="cert-value">{{ detailInfo.transactionHash }}</text>
</view>
<view class="cert-row">
<text class="cert-label">钱包地址</text>
<text class="cert-value">{{ detailInfo.walletAddress }}</text>
<text class="cert-label">授权码</text>
<text class="cert-value">{{ detailInfo.activeCode||"--" }}</text>
</view>
</view>
@ -81,35 +74,24 @@
<view class="product-detail-card">
<view class="product-header"> 藏品详情 </view>
<view class="product-content">
<!-- 这里可以放置藏品的详细描述内容 -->
<text class="product-description">{{ detailInfo.description }}</text>
<view class="" v-html="detailInfo.detailUrl">
</view>
</view>
</view>
</view>
</template>
<script>
export default {
export default {
name: "MemorialDetail",
data() {
return {
swiperIndex: 0,
detailInfo: {
id: "",
title: "这里是数字资产的名称",
totalSupply: "2000",
owner: "XXX博物馆",
rightHolder: "江苏大运河公司",
assetOwner: "江苏大运河公司",
collector: "XXX用户",
collectionCode: "#001-0050/1000",
collectionTime: "2025-085-04 15:20:20",
certificateCode: "SUA-DA-01-20250729A123456-001-0050/1000-v1",
contractAddress: "0xd4efaba236f7c110fe85fcbcde5489a7a3c71ec3",
transactionHash: "0xd412da236f7c110fe81ewl5fcbcde5489a7a3c7",
walletAddress: "0x8df5d733a0dd127022f7740be4f9c10ec8a23b",
image: "/uploads/20250729/42fe2364167c2342076c4e094df3d288.png",
description: "这里是藏品的详细描述信息...",
},
topBanner: []
};
},
onLoad(options) {
@ -119,13 +101,27 @@ export default {
}
},
methods: {
swiperChange(e) {
this.swiperIndex = e.detail.current;
},
//
async loadDetailInfo(id) {
try {
// API
// const response = await this.getMemorialDetail(id);
// this.detailInfo = response.data;
this.Post({
orderChildId: id
}, `/framework/order/ipOrderDetail`, "DES").then((res) => {
if (res.code == 200) {
res.data.detailUrl = this.addImgStyleToHtml(res.data.detailUrl)
this.detailInfo = res.data;
this.topBanner = res.data.hdUrl.split(',')
} else {
uni.showToast({
title: res.msg,
icon: "none",
});
}
});
//
console.log("加载纪念册详情,ID:", id);
} catch (error) {
@ -156,18 +152,18 @@ export default {
return `${NEWAPIURL}${img}`;
},
},
};
};
</script>
<style lang="scss" scoped>
.memorial-detail {
.memorial-detail {
min-height: 100vh;
background: #f8f9fa;
padding-bottom: env(safe-area-inset-bottom);
}
}
//
.main-image-section {
//
.main-image-section {
width: 100%;
height: 600rpx;
background: #f0f0f0;
@ -180,21 +176,21 @@ export default {
height: 100%;
object-fit: cover;
}
}
}
//
.asset-info-card,
.cert-info-card,
.product-detail-card {
//
.asset-info-card,
.cert-info-card,
.product-detail-card {
margin: 20rpx;
background: white;
border-radius: 16rpx;
padding: 32rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
}
}
//
.asset-info-card {
//
.asset-info-card {
.card-header {
margin-bottom: 32rpx;
@ -277,10 +273,10 @@ export default {
}
}
}
}
}
//
.cert-info-card {
//
.cert-info-card {
.cert-header {
text-align: center;
font-size: 28rpx;
@ -316,10 +312,10 @@ export default {
line-height: 1.5;
}
}
}
}
//
.product-detail-card {
//
.product-detail-card {
.product-header {
text-align: center;
font-size: 28rpx;
@ -335,5 +331,52 @@ export default {
line-height: 1.6;
}
}
}
}
.banner-content {
width: 100%;
height: 700rpx;
position: relative;
.top-banner {
width: 100%;
height: 100%;
}
.dot-container {
position: absolute;
bottom: 43rpx;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
left: 0;
.dot-line {
width: 52rpx;
height: 4rpx;
margin: 0 8rpx;
background: RGBA(189, 170, 173, 0.8);
&.active {
background: #94fafa;
}
}
}
.page-indicator {
position: absolute;
bottom: 20rpx;
right: 20rpx;
// background: rgba(0, 0, 0, 0.5);
border-radius: 10rpx;
padding: 10rpx 20rpx;
.page-text {
font-size: 24rpx;
color: #fff;
font-weight: 500;
}
}
}
</style>

109
subPackages/memorialAlbum/index.vue

@ -2,18 +2,9 @@
<view class="memorial-album">
<!-- 纪念册网格 -->
<view class="memorial-grid">
<view
class="memorial-item"
v-for="(item, index) in memorialItems"
:key="index"
@click="goToDetail(item)"
>
<view class="memorial-item" v-for="(item, index) in memorialItems" :key="index" @click="goToDetail(item)">
<view class="memorial-card">
<image
:src="item.goodsImg.split(',')[0]"
mode="aspectFill"
class="memorial-image"
/>
<image :src="item.goodsImg.split(',')[0]" mode="aspectFill" class="memorial-image" />
<view class="memorial-info">
<text class="memorial-title">{{ item.goodsTitle }}</text>
<text class="memorial-code">{{ item.code }}</text>
@ -26,7 +17,7 @@
</template>
<script>
export default {
export default {
name: "MemorialAlbum",
data() {
return {
@ -39,10 +30,8 @@ export default {
this.getList()
},
methods: {
getList(){
this.Post(
{
},
getList() {
this.Post({},
"/framework/order/ipOrderList",
"DES"
).then((res) => {
@ -55,46 +44,30 @@ getList(){
});
}
});
},
},
//
goToDetail(item) {
uni.navigateTo({
url: `/subPackages/memorialAlbum/detail?id=${item.id}`,
url: `/subPackages/memorialAlbum/detail?id=${item.orderChildId}`,
});
},
//
previewImage(imagePath) {
const imageUrl = this.showImg(imagePath);
uni.previewImage({
urls: [imageUrl],
current: imageUrl,
});
},
//
showImg(img) {
if (!img) return "";
if (img.startsWith("http")) {
return img;
}
// API
const NEWAPIURL = "https://epic.js-dyyj.com";
return `${NEWAPIURL}${img}`;
},
},
};
};
</script>
<style lang="scss" scoped>
.memorial-album {
.memorial-album {
min-height: 100vh;
background: #f8f9fa;
padding-bottom: env(safe-area-inset-bottom);
}
}
//
.nav-header {
//
.nav-header {
display: flex;
align-items: center;
justify-content: space-between;
@ -104,35 +77,35 @@ getList(){
position: sticky;
top: 0;
z-index: 100;
}
}
.nav-back {
.nav-back {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
.nav-title {
.nav-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
}
.nav-placeholder {
.nav-placeholder {
width: 60rpx;
}
}
//
.memorial-grid {
//
.memorial-grid {
padding: 30rpx;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20rpx;
}
}
.memorial-item {
.memorial-item {
background: white;
border-radius: 16rpx;
overflow: hidden;
@ -142,28 +115,28 @@ getList(){
&:active {
transform: scale(0.98);
}
}
}
.memorial-card {
.memorial-card {
width: 100%;
}
}
.memorial-image {
.memorial-image {
width: 100% !important;
height: 460rpx !important;
background: #f5f5f5;
display: block;
object-fit: cover;
}
}
.memorial-info {
.memorial-info {
padding: 28rpx 24rpx;
display: flex;
flex-direction: column;
gap: 12rpx;
}
}
.memorial-title {
.memorial-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
@ -172,15 +145,15 @@ getList(){
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
.memorial-code {
.memorial-code {
font-size: 26rpx;
color: #666;
font-family: "Courier New", monospace;
}
}
.memorial-status {
.memorial-status {
font-size: 24rpx;
color: #999;
overflow: hidden;
@ -188,10 +161,10 @@ getList(){
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
//
@media screen and (max-width: 400px) {
//
@media screen and (max-width: 400px) {
.memorial-grid {
padding: 20rpx;
gap: 15rpx;
@ -208,5 +181,5 @@ getList(){
.memorial-title {
font-size: 28rpx;
}
}
}
</style>

1060
subPackages/orderQy/confrim.vue

File diff suppressed because it is too large

149
subPackages/orderQy/detail.vue

@ -25,6 +25,14 @@
mode="aspectFill"
:src="showImgJdsz(goods.goodsImg.split(',')[0])"
></image>
<!-- 当商品类型为2时显示状态标签 -->
<view
v-if="goods.type === 2"
class="goods-status-badge"
:class="[getGoodsStatusClass(goods.status)]"
>
{{ getGoodsStatusText(goods.status) }}
</view>
</view>
</view>
<view class="goods-content">
@ -35,20 +43,15 @@
</view>
<view class="goods-actions">
<button
v-if="goods.status==1"
v-if="goods.status == 1"
class="action-btn"
@click="handleGoodsAction(goods)"
>
{{ getGoodsActionText(goods.type) }}
</button>
<button
v-else
class="action-btn"
@click="handleGoodsAction(goods)"
>
<button v-else class="action-btn" @click="handleGoodsAction(goods)">
{{ getGoodsActionTexted(goods.type) }}
</button>
</view>
</view>
</view>
@ -79,7 +82,7 @@
</view>
<view class="info-row">
<text class="info-label">权益码</text>
<text class="info-value">{{ orderDetail.activeCode }}</text>
<text class="info-value" style="font-family: Courier New;">{{ orderDetail.activeCode }}</text>
</view>
<!-- <view class="info-row">
<text class="info-label">商品合计</text>
@ -183,6 +186,9 @@
<text class="popup-close" @click="closeLogisticsPopup">×</text>
</view>
<view class="popup-content">
<!-- 商品状态 -->
<!-- 收货地址 -->
<view class="logistics-section">
<view class="section-title">收货地址</view>
@ -204,7 +210,14 @@
</view>
</view>
</view>
<view class="logistics-section">
<view class="section-title">备注</view>
<view class="info-item">
<text class="info-value">{{
currentLogisticsInfo.remark || "--"
}}</text>
</view>
</view>
<!-- 预约发货时间 -->
<view class="logistics-section">
<view class="section-title">预约发货时间</view>
@ -257,13 +270,18 @@ export default {
showEquityPopup: false,
showLogisticsPopup: false, //
currentLogisticsInfo: null, //
orderDetail: {},
orderDetail: {
orderChildVos: [],
},
};
},
computed: {
//
hasPhysicalGoods() {
return this.orderDetail.orderChildVos.some((goods) => goods.type === 2);
return (
this.orderDetail &&
this.orderDetail.orderChildVos.some((goods) => goods.type === 2)
);
},
//
showBottomActions() {
@ -400,6 +418,30 @@ export default {
return typeMap[type] || "未知类型";
},
//
getGoodsStatusText(status) {
const statusMap = {
1: "待使用",
2: "待发货",
3: "已发货",
4: "已完成",
5: "售后",
};
return statusMap[status] || "未知状态";
},
//
getGoodsStatusClass(status) {
const classMap = {
1: "goods-status-waiting",
2: "goods-status-pending",
3: "goods-status-shipping",
4: "goods-status-completed",
5: "goods-status-refund",
};
return classMap[status] || "goods-status-default";
},
//
copyOrderNo() {
uni.setClipboardData({
@ -446,16 +488,20 @@ export default {
icon: "none",
});
uni.navigateTo({
url: "/subPackages/memorialAlbum/detail",
url: "/subPackages/memorialAlbum/detail?id="+goods.childId,
});
},
//
reserveDelivery(goods) {
//
if (goods.status == 1) {
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${goods.orderId}`,
url: `/subPackages/orderQy/confrim?goodsId=${goods.goodsId}&orderChildId=${goods.childId}`,
});
} else {
this.showLogisticsInfo(goods);
}
},
// 使
@ -724,6 +770,8 @@ export default {
.checkbox-icon {
width: 100rpx;
height: 100rpx;
position: relative;
image {
width: 100%;
height: 100%;
@ -731,6 +779,43 @@ export default {
}
}
//
.goods-status-badge {
position: absolute;
top: -8rpx;
right: -8rpx;
padding: 4rpx 8rpx;
border-radius: 8rpx;
font-size: 20rpx;
color: #fff;
font-weight: 500;
z-index: 10;
&.goods-status-waiting {
background-color: #007aff;
}
&.goods-status-pending {
background-color: #ff9500;
}
&.goods-status-shipping {
background-color: #34c759;
}
&.goods-status-completed {
background-color: #666;
}
&.goods-status-refund {
background-color: #ff3b30;
}
&.goods-status-default {
background-color: #999;
}
}
.goods-content {
flex: 1;
display: flex;
@ -1018,6 +1103,44 @@ export default {
}
}
//
.status-info {
display: flex;
align-items: center;
}
.status-badge-popup {
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 24rpx;
color: #fff;
font-weight: 500;
&.goods-status-waiting {
background-color: #007aff;
}
&.goods-status-pending {
background-color: #ff9500;
}
&.goods-status-shipping {
background-color: #34c759;
}
&.goods-status-completed {
background-color: #666;
}
&.goods-status-refund {
background-color: #ff3b30;
}
&.goods-status-default {
background-color: #999;
}
}
.logistics-section .section-title {
font-size: 28rpx;
font-weight: 600;

101
subPackages/orderQy/list.vue

@ -47,12 +47,18 @@
v-for="goods in order.orderChildVos"
:key="goods.id"
>
<view class="goods-image-container">
<image
v-if="goods.goodsImg"
class="goods-image"
:src="showImgJdsz(goods.goodsImg&&goods.goodsImg.split(',')[0])"
mode="aspectFill"
/>
<!-- 当商品类型为2时显示状态标签 -->
<view v-if="goods.type === 2" class="goods-status-badge" :class="[getGoodsStatusClass(goods.status)]">
{{ getGoodsStatusText(goods.status) }}
</view>
</view>
<view class="goods-info">
<text class="goods-name">{{ goods.goodsTitle }}</text>
<view class="goods-meta">
@ -72,14 +78,17 @@
>
{{ getActionBtnText(goods.type) }}
</button>
<template v-else>
<button
v-else
v-if="!(goods.type==2&&goods.status==2)"
class="action-btn"
:class="[getActionBtnClass(goods.status)]"
@click.stop="handleGoodsAction(goods)"
>
{{ getActionBtnTexted(goods.type) }}
</button>
</template>
</view>
</view>
</view>
@ -107,7 +116,7 @@
<!-- 空状态 -->
<view
class="empty-state"
v-if="(goodsList && goodsList.length == 0) || loading"
v-if="(orderList && orderList.length == 0) || loading"
>
<image
class="empty-image"
@ -245,6 +254,7 @@ export default {
).then((res) => {
if (res.code == 200) {
this.orderList.push(...res.rows);
console.log(this.orderList)
this.hasMore = res.rows.length === this.pageSize;
this.currentPage++;
} else {
@ -313,6 +323,30 @@ export default {
return typeMap[type] || "未知类型";
},
//
getGoodsStatusText(status) {
const statusMap = {
1: "待使用",
2: "待发货",
3: "已发货",
4: "已完成",
5: "售后",
};
return statusMap[status] || "未知状态";
},
//
getGoodsStatusClass(status) {
const classMap = {
1: "goods-status-waiting",
2: "goods-status-pending",
3: "goods-status-shipping",
4: "goods-status-completed",
5: "goods-status-refund",
};
return classMap[status] || "goods-status-default";
},
//
getActionBtnText(type) {
const textMap = {
@ -364,16 +398,19 @@ export default {
icon: "none",
});
uni.navigateTo({
url: "/subPackages/memorialAlbum/detail",
url: "/subPackages/memorialAlbum/detail?id="+goods.childId,
});
},
//
reserveDelivery(goods) {
//
if(goods.status==1){
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${goods.orderId}`,
url: `/subPackages/orderQy/confrim?goodsId=${goods.goodsId}&orderChildId=${goods.childId}`,
});
}
},
// 使
@ -419,17 +456,6 @@ export default {
});
},
//
formatTime(time) {
if (!time) return "";
const date = new Date(time);
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(
2,
"0"
)}-${String(date.getDate()).padStart(2, "0")} ${String(
date.getHours()
).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
},
},
};
</script>
@ -662,12 +688,53 @@ $bg-light: #f7fafc;
}
}
.goods-image-container {
position: relative;
margin-right: 20rpx;
flex-shrink: 0;
}
.goods-image {
width: 100rpx;
height: 100rpx;
border-radius: 12rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
//
.goods-status-badge {
position: absolute;
top: -8rpx;
right: -8rpx;
padding: 4rpx 8rpx;
border-radius: 8rpx;
font-size: 20rpx;
color: #fff;
font-weight: 500;
z-index: 10;
&.goods-status-waiting {
background-color: #007aff;
}
&.goods-status-pending {
background-color: #ff9500;
}
&.goods-status-shipping {
background-color: #34c759;
}
&.goods-status-completed {
background-color: #666;
}
&.goods-status-refund {
background-color: #ff3b30;
}
&.goods-status-default {
background-color: #999;
}
}
.goods-info {

2
subPackages/user/collection.vue

@ -18,7 +18,7 @@
>
<image
class="product-image"
src="https://images.unsplash.com/photo-1578662996442-48f60103fc96?auto=format&fit=crop&w=400"
:src="item.coverUrl.split(',')[0]"
mode="aspectFill"
></image>
<view class="product-info">

Loading…
Cancel
Save