From 08d3c6bab08a173c822dcb7f2013fba2b6f72bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Thu, 6 Nov 2025 17:47:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E8=B7=B3=E8=BD=AC=E5=95=86=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/afterSale.js | 1 + packages/myOrders/goodDetails/index.css | 661 +++++++++++++++++++++++ packages/myOrders/goodDetails/index.vue | 629 +++++++++++++++++++++ packages/myOrders/orderDetails/index.vue | 26 +- pages.json | 6 + 5 files changed, 1310 insertions(+), 13 deletions(-) create mode 100644 packages/myOrders/goodDetails/index.css create mode 100644 packages/myOrders/goodDetails/index.vue diff --git a/api/afterSale.js b/api/afterSale.js index 33e90598..6011e9b6 100644 --- a/api/afterSale.js +++ b/api/afterSale.js @@ -9,4 +9,5 @@ export const apiArr = { updateApply: "/api/v2/wechat/commodity/after-sales/update-apply", //商品订单售后修改申请 createReview: "/api/v2/wechat/commodity/review/create", //创建订单评价 orderRefund: "/api/v2/wechat/commodity/order/refund", //商品订单退款 + selectGoodsDetail: "/api/v2/wechat/commodity/goods-info/by-goods", //根据货品id查询商品货品信息 }; diff --git a/packages/myOrders/goodDetails/index.css b/packages/myOrders/goodDetails/index.css new file mode 100644 index 00000000..bb906df8 --- /dev/null +++ b/packages/myOrders/goodDetails/index.css @@ -0,0 +1,661 @@ +page { + background-color: #fff; + padding-bottom: 20rpx; + min-height: 100vh; +} + +image { + width: 100%; + height: 100%; +} + +.header { + position: absolute; + z-index: 2; + width: 750rpx; + height: 243rpx; + background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%); +} + +.searchBox { + display: flex; + align-items: center; + z-index: 2; +} + +.isDay { + background-color: orangered; + height: 35rpx; + border-radius: 5rpx; + color: white; + font-size: 22rpx; + text-align: center; + justify-content: center; + padding: 5rpx 10rpx; + display: flex; +} + +.tag { + background-color: orangered; + color: white; + font-size: 40rpx; + padding: 5rpx 10rpx; + border-radius: 5rpx; +} + +.tag-img { + position: absolute; + top: 20%; + left: 0; + z-index: 1; +} + + +.searchBox_left { + box-sizing: border-box; + padding-left: 20rpx; +} + +.swiper { + height: 750rpx; + width: 750rpx; + position: relative; +} + +.swiper swiper { + width: 100%; + height: 100%; +} + +.swiper .NumDot { + width: 100rpx; + height: 50rpx; + background: rgba(0, 0, 0, 0.5); + border-radius: 100rpx 100rpx 100rpx 100rpx; + font-size: 30rpx; + color: #FFFFFF; + display: flex; + align-items: center; + justify-content: center; + position: absolute; + right: 27rpx; + bottom: 20rpx; +} + +.Money { + display: flex; + align-items: flex-end; + margin-top: 40rpx; + font-weight: bold; + font-size: 80rpx; + color: #FF370B; + margin-left: 12rpx; +} + +.MoneyMark { + font-size: 60rpx; + padding-bottom: 6rpx; +} + +.MoneyUnit { + font-size: 40rpx; + font-weight: 400; + padding-bottom: 10rpx; +} + +.oldMoney { + font-size: 40rpx; + color: #C7C7C7; + margin-left: 30rpx; + padding-bottom: 4rpx; + text-decoration: line-through; +} + +.GGBox { + margin: 0 20rpx; + display: flex; + justify-content: space-between; + margin-top: 30rpx; +} + +.GG_rigth { + display: flex; + align-items: center; +} + +.GG_left { + display: flex; + align-items: center; + flex: 1; + flex-wrap: nowrap; + overflow: hidden; + overflow-x: auto; + margin-right: 40rpx; +} + +/* 促销信息样式 */ +.promotions-container { + padding: 15rpx; + background-color: #FFF; + border-radius: 10rpx; + margin: 15rpx 0; +} + +.promotion-item { + display: flex; + align-items: center; + margin-bottom: 20rpx; +} + +.promotion-tag { + width: 80rpx; + text-align: center; + background-color: #ffe8e5; + color: #ff5029; + padding: 5rpx 15rpx; + border-radius: 10rpx; + font-size: 26rpx; + margin-right: 30rpx; +} + +.promotion-content { + font-size: 26rpx; + color: #333; +} + +.promotion-content1 { + width: auto; + padding: 5rpx 10rpx; + text-align: center; + background-color: #ff6749; + color: white; + border-radius: 10rpx; +} + +.GG_Item { + font-size: 26rpx; + color: #999999; + background: #F6F7FB; + border-radius: 10rpx 10rpx 10rpx 10rpx; + padding: 12rpx 16rpx; + white-space: nowrap; + margin-right: 20rpx; +} + +.Tit { + font-size: 36rpx; + color: #222222; + margin: 0 20rpx; + margin-top: 20rpx; + font-weight: 700; + display: flex; +} + +.Msg { + font-size: 26rpx; + color: #999999; + margin: 0 20rpx; + margin-top: 20rpx; +} + +.GoodsMsg { + /* font-size: 30rpx; */ + color: #222222; + margin: 0 20rpx; + margin-top: 55rpx; + font-weight: 700; +} + + +.Msg_Item { + display: flex; + align-items: center; + border-bottom: 1rpx solid #EBEBEB; + ; +} + +.Msg_ItemTit { + width: 120rpx; + margin-right: 100rpx; + font-size: 26rpx; + color: #999999; + margin: 0 20rpx; + padding: 30rpx 0; +} + +.Msg_ItemCon { + font-size: 26rpx; + color: #222222; + display: flex; + align-items: center; +} + +.Msg_ItemCon image { + width: 28rpx; + height: 28rpx; + margin-left: 10rpx; +} + +.GoosMsg { + width: 100%; +} + +.GoosMsg image { + width: 100%; + height: auto; +} + +.Car { + width: 750rpx; + height: 123rpx; + background: #FFFFFF; + box-shadow: 3rpx -3rpx 15rpx 0rpx rgba(255, 27, 27, 0.05); + display: flex; + position: fixed; + left: 0; + right: 0; + bottom: 0; + box-sizing: border-box; + padding: 0 30rpx; + justify-content: space-between; +} + +.car_left { + display: flex; + align-items: center; + font-size: 24rpx; + color: #222222; +} + +.car_left image { + width: 40rpx; + height: 40rpx; +} + +.car_right { + width: 470rpx; + height: 70rpx; + background: linear-gradient(91deg, #FF7658 0%, #FF370B 100%); + border-radius: 100rpx 100rpx 100rpx 100rpx; + font-size: 36rpx; + color: #FFFFFF; + display: flex; + align-items: center; + justify-content: center; + margin-top: 26rpx; +} + +.car_right_disabled { + background: #CCCCCC; + color: #FFFFFF; +} + +.cars { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + position: relative; +} + +.share { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-right: 36rpx; +} + +.u-badge { + position: absolute; + right: 0; + top: -10rpx; +} + +.car_right .input { + font-size: 36rpx; + color: #FFFFFF; + font-weight: 700; +} + + +.shadow { + background: rgba(0, 0, 0, 0.4); + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 9; +} + +.shadowBox1 { + height: 250rpx; + width: 100%; + background-color: #fff; + position: absolute; + left: 0; + bottom: 0; + display: flex; +} + +.shadowBox1Item_btn{ + width: 150rpx; + height: 170rpx; + opacity:0; + position: absolute; + left: 100rpx; + top: 40rpx; +} + +.shadowBox1Item { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 26rpx; + color: #000000; +} + +.shadowBox1Item image { + width: 100rpx; + height: 100rpx; + margin-bottom: 26rpx; +} + +.shadowBox2 { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + width: auto; + height: auto; +} + +.shadowBox_img { + width: 600rpx; + height: 945rpx; + background: url('https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/shop_share_bg.png') no-repeat; + background-size: 100% 100%; +} + +.shadowBox_btn { + font-size: 36rpx; + color: #FFFFFF; + width: 600rpx; + height: 90rpx; + background: linear-gradient(91deg, #FF7658 0%, #FF370B 100%); + border-radius: 100rpx 100rpx 100rpx 100rpx; + display: flex; + align-items: center; + justify-content: center; + margin-top: 60rpx; +} + +.boxshadow_tit { + font-size: 32rpx; + color: #222222; + text-align: center; + padding-top: 40rpx; +} + +.boxshadow_img { + width: 450rpx; + height: 600rpx; + margin: 0 auto; + margin-top: 40rpx; +} + +.line { + margin: 0 auto; + width: 556rpx; + height: 1rpx; + border-bottom: 1rpx dashed #E9E9E9; + margin-top: 40rpx; +} + + +.shadowBoxInfo { + display: flex; + align-items: center; + margin-left: 62rpx; + margin-top: 11rpx; +} + +.shadowboxInfo_left { + width: 130rpx; + height: 130rpx; + background: #EFEFEF; + border-radius: 50%; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + margin-right: 36rpx; +} + +.shadowboxInfo_right_1 { + font-size: 32rpx; + color: #222222; + margin-bottom: 10rpx; +} + +.shadowboxInfo_right_2 { + font-size: 26rpx; + color: #999999; +} + +.active { + background: #FF370B; + color: #fff; +} + +.priceInfo { + height: 450rpx; + padding: 20rpx; +} + +.priceInfo-title { + /* font-size: 30rpx; */ + font-weight: bolder; + margin: 15rpx 0 20rpx 0; +} + +.priceInfo-content { + font-size: 26rpx; + color: #9c9c9c; + line-height: 1.7; +} + +.priceInfo-content-title { + font-size: 28rpx; + color: #333; +} + +.fenge { + width: 100%; + height: 15rpx; + background-color: #f5f7fb; +} + +/* 评价部分样式 */ +.reviews-section { + padding: 20rpx; + background-color: #fff; + margin-bottom: 20rpx; +} + +.reviews-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20rpx; +} + +.reviews-header h3 { + /* font-size: 32rpx; */ + font-weight: bold; +} + +.view-all { + color: #999; + font-size: 26rpx; + background: none; + border: none; + padding: 0; +} + +.reviews-list { + margin-top: 20rpx; +} + +.review-item { + padding: 20rpx 0; + border-bottom: 1rpx solid #f5f5f5; +} + +.review-user { + display: flex; + align-items: center; + margin-bottom: 15rpx; +} + +.user-avatar { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + margin-right: 15rpx; +} + +.user-info { + flex: 1; +} + +.user-name { + font-size: 28rpx; + font-weight: 500; +} + +.user-purchase { + font-size: 24rpx; + color: #999; + margin: 10rpx 0; +} + +.review-content { + font-size: 27rpx; + line-height: 1.5; + margin-bottom: 15rpx; +} + +.review-images { + display: flex; + flex-wrap: wrap; + gap: 10rpx; + margin-bottom: 15rpx; +} + +.review-img { + width: 140rpx; + height: 140rpx; + border-radius: 8rpx; +} + +.review-time { + font-size: 24rpx; + color: #999; + text-align: right; +} + +.popup-header { + display: flex; + width: 90%; + padding-left: 80rpx; + margin: 20rpx 0; +} + +.popup-header-h3 { + font-weight: bold; + margin: 0 auto; +} + +.popup-header-view { + font-size: 24rpx; + color: #999; + margin-right: 30rpx; +} + +.temp { + display: flex; + justify-content: space-between; + align-items: center; +} + +.temp1 { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 24rpx; + color: #959595; + margin: 20rpx 0 5rpx 0; +} + +.temp_img { + width: 35rpx; + height: 35rpx; + margin-right: 10rpx; +} + +.temp_img1 { + width: 30rpx; + height: 30rpx; + margin: 5rpx 5rpx 0 5rpx; +} + +.itemSizeBox { + margin: 30rpx; +} + +.itemSize { + font-size: 26rpx; + color: #333; + background: #F6F7FB; + border-radius: 40rpx; + padding: 10rpx 15rpx; + white-space: nowrap; +} + +.itemSize_active { + background: #FF370B; + color: #fff; +} + +.itemSize-img { + width: 100rpx; + height: 100rpx; + margin-right: 30rpx; + border-radius: 20rpx; +} + +.itemSize_top { + display: flex; + margin-left: 30rpx; +} + +.itemSize_info { + margin-top: 10rpx; +} + +.itemSize_name { + font-size: 28rpx; + font-weight: 500; + font-weight: bold; +} + +.itemSize_price { + font-size: 28rpx; + font-weight: 500; + margin-top: 10rpx; + color: red; +} \ No newline at end of file diff --git a/packages/myOrders/goodDetails/index.vue b/packages/myOrders/goodDetails/index.vue new file mode 100644 index 00000000..0d9f84fc --- /dev/null +++ b/packages/myOrders/goodDetails/index.vue @@ -0,0 +1,629 @@ + + + + + \ No newline at end of file diff --git a/packages/myOrders/orderDetails/index.vue b/packages/myOrders/orderDetails/index.vue index 238cb88d..a1787909 100644 --- a/packages/myOrders/orderDetails/index.vue +++ b/packages/myOrders/orderDetails/index.vue @@ -46,7 +46,7 @@ - + @@ -178,9 +178,9 @@ export default { this.status = JSON.stringify(item.order_status); }, methods: { - toDetail(item) { - console.log("🚀 ~ item:", item) - // NavgateTo(`/packages/myOrders/commodityDetails/index?item=${JSON.stringify(item)}`); + toDetail(orderInfo, item) { + const goodId = item.goods_id + NavgateTo(`/packages/myOrders/goodDetails/index?item=${JSON.stringify(orderInfo)} &goodId=${JSON.stringify(goodId)}`); }, startCountdown() { // 检查订单信息中是否有时效时间戳 @@ -188,23 +188,23 @@ export default { console.error('订单时效时间戳不存在'); return; } - + // 获取当前时间和订单超时时间 const now = Math.floor(new Date().getTime() / 1000); const timeoutTime = this.orderInfo.timeout_time_stamp; - + // 判断当前时间是否已超过超时时间 if (now > timeoutTime) { // 已超过超时时间,直接取消订单 this.handleOrderCancellation(); return; } - + // 计算剩余时间(秒) let remainingSeconds = timeoutTime - now; // 确保剩余时间不为负数 remainingSeconds = Math.max(0, remainingSeconds); - + // 更新倒计时显示的函数 const updateCountdownDisplay = (seconds) => { const hours = Math.floor(seconds / 3600); @@ -212,16 +212,16 @@ export default { const secs = seconds % 60; this.countdown = `${hours}:${minutes.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`; }; - + // 立即更新一次显示 updateCountdownDisplay(remainingSeconds); - + // 设置定时器,每秒更新一次倒计时 const timer = setInterval(() => { remainingSeconds--; - + updateCountdownDisplay(remainingSeconds); - + // 检查是否已经超时 if (remainingSeconds <= 0) { clearInterval(timer); @@ -230,7 +230,7 @@ export default { } }, 1000); }, - + // 处理订单取消 handleOrderCancellation() { const params = { diff --git a/pages.json b/pages.json index 2a613a0e..584046e1 100644 --- a/pages.json +++ b/pages.json @@ -957,6 +957,12 @@ "style": { "navigationBarTitleText": "换货详情" } + }, + { + "path": "goodDetails/index", + "style": { + "navigationBarTitleText": "详情" + } } ] },