Browse Source

订单详情

dev_des
1054425342@qq.com 2 months ago
parent
commit
96c4555066
  1. 209
      pages/index/iSoul.vue
  2. 24
      static/js/CommonFunction.js
  3. 7
      static/js/request.js
  4. 2
      subPackages/equityGoods/detail.vue
  5. 707
      subPackages/memorialAlbum/detail.vue
  6. 383
      subPackages/memorialAlbum/index.vue
  7. 2542
      subPackages/orderQy/confrim.vue
  8. 257
      subPackages/orderQy/detail.vue
  9. 131
      subPackages/orderQy/list.vue
  10. 2
      subPackages/user/collection.vue

209
pages/index/iSoul.vue

@ -153,24 +153,43 @@
<view class="divider-text">数字资产纪念册</view> <view class="divider-text">数字资产纪念册</view>
<view class="divider-line"></view> <view class="divider-line"></view>
</view> </view>
<view class="memorial-cards"> <!-- 有数据时显示 -->
<view class="memorial-card" @click="handleMemorialClick(0)"> <view class="memorial-cards" v-if="memorialItems.length > 0" :class="{'single-item': memorialItems.length === 1}">
<image :src=" <!-- 单条数据特殊展示 -->
showImg('/uploads/20250729/105755e9b2e570e46b96d54ed61abe51.png') <template v-if="memorialItems.length === 1">
" mode="aspectFill" class="memorial-img"></image> <view class="memorial-card-single" @click="handleMemorialClick(0)">
<view class="memorial-info"> <view class="single-card-wrapper">
<text class="memorial-title">世界花园凤景里的苏州</text> <image :src="showImg(memorialItems[0].goodsImg )" mode="aspectFill" class="memorial-img-single"></image>
<text class="memorial-more">MORE</text> <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>
</view> </view>
</view> </template>
<view class="memorial-card" @click="handleMemorialClick(1)"> <!-- 多条数据正常展示 -->
<image :src=" <template v-else>
showImg('/uploads/20250729/42fe2364167c2342076c4e094df3d288.png') <view class="memorial-card" v-for="(item, index) in memorialItems" :key="index" @click="handleMemorialClick(index)">
" mode="aspectFill" class="memorial-img"></image> <image :src="showImg(item.goodsImg )" mode="aspectFill" class="memorial-img"></image>
<view class="memorial-info"> <view class="memorial-info">
<text class="memorial-title">男神女神罗曼史</text> <text class="memorial-title">{{ item.goodsTitle || '数字资产纪念册' }}</text>
<text class="memorial-more">MORE</text> <text class="memorial-more">MORE</text>
</view>
</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> </view>
</view> </view>
@ -267,6 +286,7 @@
], ],
exchangeCode: "", // exchangeCode: "", //
memorialItems:[]
}; };
}, },
onLoad() { onLoad() {
@ -279,8 +299,28 @@
JSON.parse(uni.getStorageSync("userInfo"))) || JSON.parse(uni.getStorageSync("userInfo"))) ||
this.$store.state.user.userInfo || {}; this.$store.state.user.userInfo || {};
console.log(this.userInfo); console.log(this.userInfo);
if (this.userInfo && this.userInfo.token) {
this.getListIp()
}
}, },
methods: { 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() { goBack() {
uni.navigateBack(); uni.navigateBack();
@ -917,6 +957,104 @@
gap: 20rpx; 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 { .memorial-card {
flex: 1; flex: 1;
border-radius: 10rpx; border-radius: 10rpx;
@ -950,6 +1088,45 @@
color: #999; 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 { .bottom-menu {
padding: 40rpx 30rpx; padding: 40rpx 30rpx;

24
static/js/CommonFunction.js

@ -393,4 +393,26 @@ Vue.prototype.appendToStorage = (key, newData) => {
uni.setStorageSync(key, updated); uni.setStorageSync(key, updated);
} }
Vue.prototype.JDSU_IMG_URL = "https://static.ticket.sz-trip.com" 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 // 定义 API URL
// const DEV_API_URL = 'https://epic.new.js-dyyj.com'; // const DEV_API_URL = 'https://epic.new.js-dyyj.com';
const DEV_API_URL = 'https://epic.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 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 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; const NEWAPIURL_DES = process.env.NODE_ENV === 'development' ? DEV_API_URL_DES : PROD_API_URL_DES;
// 获取token
const getToken = () => { const getToken = () => {
const userInfoFromStorage = uni.getStorageSync('userInfo'); const userInfoFromStorage = uni.getStorageSync('userInfo');
if (userInfoFromStorage) { if (userInfoFromStorage) {

2
subPackages/equityGoods/detail.vue

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

707
subPackages/memorialAlbum/detail.vue

@ -1,339 +1,382 @@
<template> <template>
<view class="memorial-detail"> <view class="memorial-detail">
<!-- 主图区域 --> <!-- 轮播图区域 -->
<view class="main-image-section"> <view class="banner-content">
<image <swiper class="top-banner" :circular="true" :interval="6000" :duration="800" :indicator-dots="false"
:src="showImg(detailInfo.image)" :autoplay="true" @change="swiperChange">
mode="aspectFill" <swiper-item v-for="(item, index) in topBanner" :key="index">
class="main-image" <image class="top-banner" :src="showImg(item)" mode="aspectFill"></image>
@click="previewMainImage" </swiper-item>
/> </swiper>
</view>
<view class="dot-container">
<!-- 数字资产信息卡片 --> <view :class="['dot-line', index == swiperIndex ? 'active' : '']" v-for="(item, index) in topBanner"
<view class="asset-info-card"> :key="index"></view>
<view class="card-header"> </view>
<text class="asset-title">{{ detailInfo.title }}</text>
</view> <!-- 页码指示器 -->
<view class="page-indicator">
<view class="info-row"> <text class="page-text">{{ swiperIndex + 1 }}/{{ topBanner.length }}</text>
<text class="info-label">发行数量</text> </view>
<text class="info-value">{{ detailInfo.totalSupply }}</text> </view>
</view>
<!-- 数字资产信息卡片 -->
<view class="divider"></view> <view class="asset-info-card">
<view class="card-header">
<view class="info-row"> <text class="asset-title">{{ detailInfo.goodsName }}</text>
<text class="info-label">数字资产所有方</text> </view>
<text class="info-value">{{ detailInfo.owner }}</text>
</view> <view class="info-row">
<text class="info-label">发行数量</text>
<view class="info-row"> <text class="info-value">{{ detailInfo.publishQuantity||0 }}</text>
<text class="info-label">数字资产权利方</text> </view>
<text class="info-value">{{ detailInfo.rightHolder }}</text>
</view> <view class="divider"></view>
<view class="info-row"> <view class="info-row">
<text class="info-label">数字资产所有方</text> <text class="info-label">数字资产所有方</text>
<text class="info-value">{{ detailInfo.assetOwner }}</text> <text class="info-value">{{ detailInfo.ownPart||'-' }}</text>
</view> </view>
<!-- 收藏信息 --> <view class="info-row">
<view class="collection-info"> <text class="info-label">数字资产权利方</text>
<view class="collection-header"> 收藏信息 </view> <text class="info-value">{{ detailInfo.powerPart||'-' }}</text>
<view class="collector-info"> </view>
<text class="collector-label">收藏者</text> <view class="info-row">
<text class="collector-name">{{ detailInfo.collector }}</text> <text class="info-label">授权品牌</text>
<text class="collection-number">编号</text> <text class="info-value">{{ detailInfo.authorizeBrand||'-' }}</text>
<text class="collection-code">{{ detailInfo.collectionCode }}</text> </view>
<text class="collection-time-label">收藏时间</text> <!-- 收藏信息 -->
<text class="collection-time">{{ detailInfo.collectionTime }}</text> <view class="collection-info">
</view> <view class="collection-header"> 收藏信息 </view>
</view> <view class="collector-info">
</view> <text class="collector-label">收藏者</text>
<text class="collector-name">{{ detailInfo.nickname||'--' }}</text>
<!-- 认证信息卡片 --> <text class="collection-number">编号</text>
<view class="cert-info-card"> <text class="collection-code">{{ detailInfo.code||'--' }}</text>
<view class="cert-header"> 认证信息 </view> <text class="collection-time-label">收藏时间</text>
<text class="collection-time">{{ detailInfo.activeTime||'--' }}</text>
<view class="cert-row"> </view>
<text class="cert-label">权证码</text> </view>
<text class="cert-value">{{ detailInfo.certificateCode }}</text> </view>
</view>
<!-- 认证信息卡片 -->
<view class="cert-row"> <view class="cert-info-card">
<text class="cert-label">合约地址</text> <view class="cert-header"> 认证信息 </view>
<text class="cert-value">{{ detailInfo.contractAddress }}</text>
</view> <view class="cert-row">
<text class="cert-label">授权码</text>
<view class="cert-row"> <text class="cert-value">{{ detailInfo.activeCode||"--" }}</text>
<text class="cert-label">交易HASH</text> </view>
<text class="cert-value">{{ detailInfo.transactionHash }}</text> </view>
</view>
<!-- 藏品详情卡片 -->
<view class="cert-row"> <view class="product-detail-card">
<text class="cert-label">钱包地址</text> <view class="product-header"> 藏品详情 </view>
<text class="cert-value">{{ detailInfo.walletAddress }}</text> <view class="product-content">
</view> <view class="" v-html="detailInfo.detailUrl">
</view>
</view>
<!-- 藏品详情卡片 --> </view>
<view class="product-detail-card"> </view>
<view class="product-header"> 藏品详情 </view> </view>
<view class="product-content">
<!-- 这里可以放置藏品的详细描述内容 -->
<text class="product-description">{{ detailInfo.description }}</text>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default { export default {
name: "MemorialDetail", name: "MemorialDetail",
data() { data() {
return { return {
detailInfo: { swiperIndex: 0,
id: "", detailInfo: {
title: "这里是数字资产的名称",
totalSupply: "2000", },
owner: "XXX博物馆", topBanner: []
rightHolder: "江苏大运河公司", };
assetOwner: "江苏大运河公司", },
collector: "XXX用户", onLoad(options) {
collectionCode: "#001-0050/1000", //
collectionTime: "2025-085-04 15:20:20", if (options.id) {
certificateCode: "SUA-DA-01-20250729A123456-001-0050/1000-v1", this.loadDetailInfo(options.id);
contractAddress: "0xd4efaba236f7c110fe85fcbcde5489a7a3c71ec3", }
transactionHash: "0xd412da236f7c110fe81ewl5fcbcde5489a7a3c7", },
walletAddress: "0x8df5d733a0dd127022f7740be4f9c10ec8a23b", methods: {
image: "/uploads/20250729/42fe2364167c2342076c4e094df3d288.png", swiperChange(e) {
description: "这里是藏品的详细描述信息...", this.swiperIndex = e.detail.current;
}, },
}; //
}, async loadDetailInfo(id) {
onLoad(options) { try {
// this.Post({
if (options.id) { orderChildId: id
this.loadDetailInfo(options.id); }, `/framework/order/ipOrderDetail`, "DES").then((res) => {
} if (res.code == 200) {
}, res.data.detailUrl = this.addImgStyleToHtml(res.data.detailUrl)
methods: { this.detailInfo = res.data;
// this.topBanner = res.data.hdUrl.split(',')
async loadDetailInfo(id) {
try { } else {
// API uni.showToast({
// const response = await this.getMemorialDetail(id); title: res.msg,
// this.detailInfo = response.data; icon: "none",
});
// }
console.log("加载纪念册详情,ID:", id); });
} catch (error) { //
console.error("加载详情失败:", error); console.log("加载纪念册详情,ID:", id);
uni.showToast({ } catch (error) {
title: "加载失败", console.error("加载详情失败:", error);
icon: "none", uni.showToast({
}); title: "加载失败",
} icon: "none",
}, });
}
// },
previewMainImage() {
const imageUrl = this.showImg(this.detailInfo.image); //
uni.previewImage({ previewMainImage() {
urls: [imageUrl], const imageUrl = this.showImg(this.detailInfo.image);
current: imageUrl, uni.previewImage({
}); urls: [imageUrl],
}, current: imageUrl,
});
// },
showImg(img) {
if (!img) return ""; //
if (img.startsWith("http")) { showImg(img) {
return img; if (!img) return "";
} if (img.startsWith("http")) {
const NEWAPIURL = "https://epic.js-dyyj.com"; return img;
return `${NEWAPIURL}${img}`; }
}, const NEWAPIURL = "https://epic.js-dyyj.com";
}, return `${NEWAPIURL}${img}`;
}; },
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.memorial-detail { .memorial-detail {
min-height: 100vh; min-height: 100vh;
background: #f8f9fa; background: #f8f9fa;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
} }
// //
.main-image-section { .main-image-section {
width: 100%; width: 100%;
height: 600rpx; height: 600rpx;
background: #f0f0f0; background: #f0f0f0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.main-image { .main-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
} }
// //
.asset-info-card, .asset-info-card,
.cert-info-card, .cert-info-card,
.product-detail-card { .product-detail-card {
margin: 20rpx; margin: 20rpx;
background: white; background: white;
border-radius: 16rpx; border-radius: 16rpx;
padding: 32rpx; padding: 32rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
} }
// //
.asset-info-card { .asset-info-card {
.card-header { .card-header {
margin-bottom: 32rpx; margin-bottom: 32rpx;
.asset-title { .asset-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
line-height: 1.4; line-height: 1.4;
} }
} }
.info-row { .info-row {
display: flex; display: flex;
margin-bottom: 20rpx; margin-bottom: 20rpx;
align-items: flex-start; align-items: flex-start;
.info-label { .info-label {
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
margin-right: 16rpx; margin-right: 16rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.info-value { .info-value {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
flex: 1; flex: 1;
} }
} }
.divider { .divider {
height: 1rpx; height: 1rpx;
background: #e0e0e0; background: #e0e0e0;
margin: 24rpx 0; margin: 24rpx 0;
} }
// //
.collection-info { .collection-info {
margin-top: 40rpx; margin-top: 40rpx;
padding: 32rpx; padding: 32rpx;
background: #f8f9fa; background: #f8f9fa;
border-radius: 12rpx; border-radius: 12rpx;
border: 2rpx solid #e0e0e0; border: 2rpx solid #e0e0e0;
.collection-header { .collection-header {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
margin-bottom: 24rpx; margin-bottom: 24rpx;
font-weight: 500; font-weight: 500;
} }
.collector-info { .collector-info {
display: grid; display: grid;
grid-template-columns: auto auto; grid-template-columns: auto auto;
gap: 16rpx 24rpx; gap: 16rpx 24rpx;
text-align: center; text-align: center;
.collector-label, .collector-label,
.collection-number, .collection-number,
.collection-time-label { .collection-time-label {
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #666;
} }
.collector-name, .collector-name,
.collection-code, .collection-code,
.collection-time { .collection-time {
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
} }
.collection-code { .collection-code {
font-family: "Courier New", monospace; font-family: "Courier New", monospace;
} }
.collection-time { .collection-time {
font-family: "Courier New", monospace; font-family: "Courier New", monospace;
} }
} }
} }
} }
// //
.cert-info-card { .cert-info-card {
.cert-header { .cert-header {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
margin-bottom: 32rpx; margin-bottom: 32rpx;
font-weight: 500; font-weight: 500;
} }
.cert-row { .cert-row {
margin-bottom: 24rpx; margin-bottom: 24rpx;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1rpx solid #f0f0f0; border-bottom: 1rpx solid #f0f0f0;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 0; padding-bottom: 0;
border-bottom: none; border-bottom: none;
} }
.cert-label { .cert-label {
display: block; display: block;
font-size: 26rpx; font-size: 26rpx;
color: #666; color: #666;
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.cert-value { .cert-value {
display: block; display: block;
font-size: 24rpx; font-size: 24rpx;
color: #333; color: #333;
font-family: "Courier New", monospace; font-family: "Courier New", monospace;
word-break: break-all; word-break: break-all;
line-height: 1.5; line-height: 1.5;
} }
} }
} }
// //
.product-detail-card { .product-detail-card {
.product-header { .product-header {
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
margin-bottom: 32rpx; margin-bottom: 32rpx;
font-weight: 500; font-weight: 500;
} }
.product-content { .product-content {
.product-description { .product-description {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
line-height: 1.6; line-height: 1.6;
} }
} }
} }
</style>
.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>

383
subPackages/memorialAlbum/index.vue

@ -1,212 +1,185 @@
<template> <template>
<view class="memorial-album"> <view class="memorial-album">
<!-- 纪念册网格 --> <!-- 纪念册网格 -->
<view class="memorial-grid"> <view class="memorial-grid">
<view <view class="memorial-item" v-for="(item, index) in memorialItems" :key="index" @click="goToDetail(item)">
class="memorial-item" <view class="memorial-card">
v-for="(item, index) in memorialItems" <image :src="item.goodsImg.split(',')[0]" mode="aspectFill" class="memorial-image" />
:key="index" <view class="memorial-info">
@click="goToDetail(item)" <text class="memorial-title">{{ item.goodsTitle }}</text>
> <text class="memorial-code">{{ item.code }}</text>
<view class="memorial-card"> <text class="memorial-status">{{ item.ownPart }}</text>
<image </view>
:src="item.goodsImg.split(',')[0]" </view>
mode="aspectFill" </view>
class="memorial-image" </view>
/> </view>
<view class="memorial-info">
<text class="memorial-title">{{ item.goodsTitle }}</text>
<text class="memorial-code">{{ item.code }}</text>
<text class="memorial-status">{{ item.ownPart }}</text>
</view>
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default { export default {
name: "MemorialAlbum", name: "MemorialAlbum",
data() { data() {
return { return {
memorialItems: [ memorialItems: [
], ],
}; };
}, },
onLoad() { onLoad() {
this.getList() this.getList()
}, },
methods: { methods: {
getList(){ getList() {
this.Post( this.Post({},
{ "/framework/order/ipOrderList",
}, "DES"
"/framework/order/ipOrderList", ).then((res) => {
"DES" if (res.code == 200) {
).then((res) => { this.memorialItems = res.data
if (res.code == 200) { } else {
this.memorialItems = res.data uni.showToast({
} else { title: res.msg,
uni.showToast({ icon: "none",
title: res.msg, });
icon: "none", }
}); });
} },
}); //
}, goToDetail(item) {
// uni.navigateTo({
goToDetail(item) { url: `/subPackages/memorialAlbum/detail?id=${item.orderChildId}`,
uni.navigateTo({ });
url: `/subPackages/memorialAlbum/detail?id=${item.id}`, },
});
},
//
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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.memorial-album { .memorial-album {
min-height: 100vh; min-height: 100vh;
background: #f8f9fa; background: #f8f9fa;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
} }
// //
.nav-header { .nav-header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background: white; background: white;
border-bottom: 1rpx solid #eee; border-bottom: 1rpx solid #eee;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 100; z-index: 100;
} }
.nav-back { .nav-back {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.nav-title { .nav-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
} }
.nav-placeholder { .nav-placeholder {
width: 60rpx; width: 60rpx;
} }
// //
.memorial-grid { .memorial-grid {
padding: 30rpx; padding: 30rpx;
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 20rpx; gap: 20rpx;
} }
.memorial-item { .memorial-item {
background: white; background: white;
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
transition: transform 0.2s ease; transition: transform 0.2s ease;
&:active { &:active {
transform: scale(0.98); transform: scale(0.98);
} }
} }
.memorial-card { .memorial-card {
width: 100%; width: 100%;
} }
.memorial-image { .memorial-image {
width: 100% !important; width: 100% !important;
height: 460rpx !important; height: 460rpx !important;
background: #f5f5f5; background: #f5f5f5;
display: block; display: block;
object-fit: cover; object-fit: cover;
} }
.memorial-info { .memorial-info {
padding: 28rpx 24rpx; padding: 28rpx 24rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12rpx; gap: 12rpx;
} }
.memorial-title { .memorial-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
line-height: 1.4; line-height: 1.4;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
} }
.memorial-code { .memorial-code {
font-size: 26rpx; font-size: 26rpx;
color: #666; color: #666;
font-family: "Courier New", monospace; font-family: "Courier New", monospace;
} }
.memorial-status { .memorial-status {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
overflow: hidden; overflow: hidden;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
} }
// //
@media screen and (max-width: 400px) { @media screen and (max-width: 400px) {
.memorial-grid { .memorial-grid {
padding: 20rpx; padding: 20rpx;
gap: 15rpx; gap: 15rpx;
} }
.memorial-image { .memorial-image {
height: 460rpx !important; // 使 height: 460rpx !important; // 使
} }
.memorial-info { .memorial-info {
padding: 24rpx 20rpx; padding: 24rpx 20rpx;
} }
.memorial-title { .memorial-title {
font-size: 28rpx; font-size: 28rpx;
} }
} }
</style> </style>

2542
subPackages/orderQy/confrim.vue

File diff suppressed because it is too large

257
subPackages/orderQy/detail.vue

@ -25,6 +25,14 @@
mode="aspectFill" mode="aspectFill"
:src="showImgJdsz(goods.goodsImg.split(',')[0])" :src="showImgJdsz(goods.goodsImg.split(',')[0])"
></image> ></image>
<!-- 当商品类型为2时显示状态标签 -->
<view
v-if="goods.type === 2"
class="goods-status-badge"
:class="[getGoodsStatusClass(goods.status)]"
>
{{ getGoodsStatusText(goods.status) }}
</view>
</view> </view>
</view> </view>
<view class="goods-content"> <view class="goods-content">
@ -35,20 +43,15 @@
</view> </view>
<view class="goods-actions"> <view class="goods-actions">
<button <button
v-if="goods.status==1" v-if="goods.status == 1"
class="action-btn" class="action-btn"
@click="handleGoodsAction(goods)" @click="handleGoodsAction(goods)"
> >
{{ getGoodsActionText(goods.type) }} {{ getGoodsActionText(goods.type) }}
</button> </button>
<button <button v-else class="action-btn" @click="handleGoodsAction(goods)">
v-else {{ getGoodsActionTexted(goods.type) }}
class="action-btn" </button>
@click="handleGoodsAction(goods)"
>
{{ getGoodsActionTexted(goods.type) }}
</button>
</view> </view>
</view> </view>
</view> </view>
@ -77,10 +80,10 @@
<text class="info-label">订单编号</text> <text class="info-label">订单编号</text>
<text class="info-value">{{ orderDetail.orderId }}</text> <text class="info-value">{{ orderDetail.orderId }}</text>
</view> </view>
<view class="info-row"> <view class="info-row">
<text class="info-label">权益码</text> <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>
<!-- <view class="info-row"> <!-- <view class="info-row">
<text class="info-label">商品合计</text> <text class="info-label">商品合计</text>
<text class="info-value">{{ orderDetail.goodsAmount }}</text> <text class="info-value">{{ orderDetail.goodsAmount }}</text>
@ -183,6 +186,9 @@
<text class="popup-close" @click="closeLogisticsPopup">×</text> <text class="popup-close" @click="closeLogisticsPopup">×</text>
</view> </view>
<view class="popup-content"> <view class="popup-content">
<!-- 商品状态 -->
<!-- 收货地址 --> <!-- 收货地址 -->
<view class="logistics-section"> <view class="logistics-section">
<view class="section-title">收货地址</view> <view class="section-title">收货地址</view>
@ -204,7 +210,14 @@
</view> </view>
</view> </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="logistics-section">
<view class="section-title">预约发货时间</view> <view class="section-title">预约发货时间</view>
@ -257,13 +270,18 @@ export default {
showEquityPopup: false, showEquityPopup: false,
showLogisticsPopup: false, // showLogisticsPopup: false, //
currentLogisticsInfo: null, // currentLogisticsInfo: null, //
orderDetail: {}, orderDetail: {
orderChildVos: [],
},
}; };
}, },
computed: { computed: {
// //
hasPhysicalGoods() { hasPhysicalGoods() {
return this.orderDetail.orderChildVos.some((goods) => goods.type === 2); return (
this.orderDetail &&
this.orderDetail.orderChildVos.some((goods) => goods.type === 2)
);
}, },
// //
showBottomActions() { showBottomActions() {
@ -351,14 +369,14 @@ export default {
}; };
return textMap[type] || "去查看"; return textMap[type] || "去查看";
}, },
getGoodsActionTexted(type) { getGoodsActionTexted(type) {
const textMap = { const textMap = {
1: "去查看", 1: "去查看",
2: "查看物流", 2: "查看物流",
3: "已使用", 3: "已使用",
}; };
return textMap[type] || "去查看"; return textMap[type] || "去查看";
}, },
showImgJdsz(img) { showImgJdsz(img) {
if (!img) return; if (!img) return;
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) { if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
@ -400,6 +418,30 @@ export default {
return typeMap[type] || "未知类型"; 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() { copyOrderNo() {
uni.setClipboardData({ uni.setClipboardData({
@ -423,49 +465,53 @@ export default {
this.showEquityPopup = false; this.showEquityPopup = false;
}, },
// //
handleGoodsAction(goods) { handleGoodsAction(goods) {
switch (goods.type) { switch (goods.type) {
case 1: // IP - case 1: // IP -
this.viewDigitalAsset(goods); this.viewDigitalAsset(goods);
break; break;
case 2: // IP - case 2: // IP -
this.reserveDelivery(goods); this.reserveDelivery(goods);
break; break;
case 3: // - 使 case 3: // - 使
this.useTicket(goods); this.useTicket(goods);
break; break;
} }
}, },
// //
viewDigitalAsset(goods) { viewDigitalAsset(goods) {
// //
uni.showToast({ uni.showToast({
title: "查看数字资产", title: "查看数字资产",
icon: "none", icon: "none",
}); });
uni.navigateTo({ uni.navigateTo({
url: "/subPackages/memorialAlbum/detail", url: "/subPackages/memorialAlbum/detail?id="+goods.childId,
}); });
}, },
// //
reserveDelivery(goods) { reserveDelivery(goods) {
// //
uni.navigateTo({ if (goods.status == 1) {
url: `/subPackages/orderQy/confrim?goodsId=${goods.orderId}`, uni.navigateTo({
}); url: `/subPackages/orderQy/confrim?goodsId=${goods.goodsId}&orderChildId=${goods.childId}`,
}, });
} else {
// 使 this.showLogisticsInfo(goods);
useTicket(goods) { }
// 使 },
uni.showToast({
title: "使用门票", // 使
icon: "none", useTicket(goods) {
}); // 使
}, uni.showToast({
title: "使用门票",
icon: "none",
});
},
// //
showLogisticsInfo(goods) { showLogisticsInfo(goods) {
@ -724,6 +770,8 @@ export default {
.checkbox-icon { .checkbox-icon {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
position: relative;
image { image {
width: 100%; width: 100%;
height: 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 { .goods-content {
flex: 1; flex: 1;
display: flex; 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 { .logistics-section .section-title {
font-size: 28rpx; font-size: 28rpx;
font-weight: 600; font-weight: 600;

131
subPackages/orderQy/list.vue

@ -47,12 +47,18 @@
v-for="goods in order.orderChildVos" v-for="goods in order.orderChildVos"
:key="goods.id" :key="goods.id"
> >
<image <view class="goods-image-container">
v-if="goods.goodsImg" <image
class="goods-image" v-if="goods.goodsImg"
:src="showImgJdsz(goods.goodsImg&&goods.goodsImg.split(',')[0])" class="goods-image"
mode="aspectFill" :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"> <view class="goods-info">
<text class="goods-name">{{ goods.goodsTitle }}</text> <text class="goods-name">{{ goods.goodsTitle }}</text>
<view class="goods-meta"> <view class="goods-meta">
@ -72,14 +78,17 @@
> >
{{ getActionBtnText(goods.type) }} {{ getActionBtnText(goods.type) }}
</button> </button>
<button <template v-else>
v-else <button
class="action-btn" v-if="!(goods.type==2&&goods.status==2)"
:class="[getActionBtnClass(goods.status)]" class="action-btn"
@click.stop="handleGoodsAction(goods)" :class="[getActionBtnClass(goods.status)]"
> @click.stop="handleGoodsAction(goods)"
{{ getActionBtnTexted(goods.type) }} >
</button> {{ getActionBtnTexted(goods.type) }}
</button>
</template>
</view> </view>
</view> </view>
</view> </view>
@ -107,7 +116,7 @@
<!-- 空状态 --> <!-- 空状态 -->
<view <view
class="empty-state" class="empty-state"
v-if="(goodsList && goodsList.length == 0) || loading" v-if="(orderList && orderList.length == 0) || loading"
> >
<image <image
class="empty-image" class="empty-image"
@ -245,6 +254,7 @@ export default {
).then((res) => { ).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.orderList.push(...res.rows); this.orderList.push(...res.rows);
console.log(this.orderList)
this.hasMore = res.rows.length === this.pageSize; this.hasMore = res.rows.length === this.pageSize;
this.currentPage++; this.currentPage++;
} else { } else {
@ -313,6 +323,30 @@ export default {
return typeMap[type] || "未知类型"; 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) { getActionBtnText(type) {
const textMap = { const textMap = {
@ -364,16 +398,19 @@ export default {
icon: "none", icon: "none",
}); });
uni.navigateTo({ uni.navigateTo({
url: "/subPackages/memorialAlbum/detail", url: "/subPackages/memorialAlbum/detail?id="+goods.childId,
}); });
}, },
// //
reserveDelivery(goods) { reserveDelivery(goods) {
// //
uni.navigateTo({ if(goods.status==1){
url: `/subPackages/orderQy/confrim?goodsId=${goods.orderId}`, uni.navigateTo({
}); 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> </script>
@ -662,12 +688,53 @@ $bg-light: #f7fafc;
} }
} }
.goods-image-container {
position: relative;
margin-right: 20rpx;
flex-shrink: 0;
}
.goods-image { .goods-image {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
border-radius: 12rpx; 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 { .goods-info {

2
subPackages/user/collection.vue

@ -18,7 +18,7 @@
> >
<image <image
class="product-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" mode="aspectFill"
></image> ></image>
<view class="product-info"> <view class="product-info">

Loading…
Cancel
Save