Alex 9 luni în urmă
părinte
comite
64f13bfac0

+ 79 - 53
pages-mine/components/order-timeline.vue

@@ -9,24 +9,39 @@
             <u-icon name="arrow-up" size="36" color="#333333"></u-icon>
         </view>
 
-        <view class="timeline-content" :class="{ 'collapsed': !isExpanded }">
+        <view class="timeline-content" :class="{ collapsed: !isExpanded }">
             <view class="timeline-list">
                 <view class="timeline-item" v-for="(item, index) in logVoList" :key="index">
                     <view class="timeline-dot"></view>
                     <view class="timeline-info">
-                        <view class="status" v-if="!isReturn">{{ statusTextMap[item.status] }}</view>
-                        <view class="status" v-else>{{ statusTextMap2[item.status] }}</view>
+                        <view class="status">{{ item.statusName }}</view>
                         <view class="time" v-if="item.createTime">{{ item.createTime }}</view>
-                        <view class="desc" v-if="item.description">{{ item.description }}</view>
-                        <!-- 快递单号 -->
-                        <view class="express-no" v-if="item.expressNo">
-                            <text>{{ item.expressNo }}</text>
-                            <image src="../static/copy.png" style="width: 42rpx;height:42rpx;margin-left: 20rpx;"
-                                @click.stop="copyExpressNo(item.expressNo)"></image>
+                        <view class="desc" v-if="item.description">
+                            {{ item.description }}
+
+                            <image
+                                v-if="item.status == 5"
+                                src="../static/copy.png"
+                                style="width: 42rpx; height: 42rpx; margin-left: 20rpx; position: relative; top: 6rpx"
+                                @click.stop="copyExpressNo(item.description)"
+                            ></image>
                         </view>
+                        <!-- 快递单号 -->
+                        <view class="express-no" v-if="item.status == 5 && trackingVoList.length == 0"> 暂无物流信息 </view>
                         <!-- 物流信息 -->
-                        <view class="express-info" v-if="item.expressInfo">
-                            {{ item.expressInfo }}
+                        <view class="express-info" v-if="item.status == 5 && trackingVoList.length > 0">
+                            <view class="timeline-list">
+                                <view class="timeline-item" v-for="(track, index) in trackingVoList" :key="index">
+                                    <view class="timeline-dot"></view>
+                                    <view class="timeline-info">
+                                        <view class="status">{{ track.title }}</view>
+                                        <view class="time" v-if="track.time">{{ track.time }}</view>
+                                        <view class="desc" v-if="track.description">
+                                            {{ track.description }}
+                                        </view>
+                                    </view>
+                                </view>
+                            </view>
                         </view>
                     </view>
                 </view>
@@ -37,62 +52,66 @@
 
 <script>
 export default {
-    name: 'order-timeline',
+    name: "order-timeline",
     props: {
         logVoList: {
             type: Array,
-            default: () => []
+            default: () => [],
         },
         isReturn: {
             type: Boolean,
-            default: false
-        }
+            default: false,
+        },
+        trackingVoList: {
+            type: Array,
+            default: () => [],
+        },
     },
     data() {
         return {
             isExpanded: false,
             statusTextMap: {
-                '0': '待提交',
-                '1': '已删除',
-                '2': '待初审',
-                '3': '待取件',
-                "4": '初审未通过',
-                "5": '已揽件',
-                "6": '已签收',
-                "7": '物流签收',
-                '8': '待审核',
-                '9': '审核中',
-                '10': '待到款',
-                '11': '已完成',
+                0: "待提交",
+                1: "已删除",
+                2: "待初审",
+                3: "待取件",
+                4: "初审未通过",
+                5: "已揽件",
+                6: "已签收",
+                7: "物流签收",
+                8: "待审核",
+                9: "审核中",
+                10: "待到款",
+                11: "已完成",
             },
 
             statusTextMap2: {
-                '0': '待付款',
-                '1': '待发货',
-                '2': '已推送',
-                '3': '已发货',
-                '4': '已签收',
-                "5": '已完成',
-                "6": '已取消',
-                "7": '超时取消',
-            }
-        }
+                0: "待付款",
+                1: "待发货",
+                2: "已推送",
+                3: "已发货",
+                4: "已签收",
+                5: "已完成",
+                6: "已取消",
+                7: "超时取消",
+            },
+        };
     },
-   
+
     methods: {
         toggleExpand() {
-            this.isExpanded = !this.isExpanded
+            this.isExpanded = !this.isExpanded;
         },
         copyExpressNo(no) {
             uni.setClipboardData({
                 data: no,
                 success: () => {
-                    uni.$u.toast('复制成功')
-                }
-            })
-        }
-    }
-}
+                    uni.$u.toast("复制成功");
+                },
+            });
+        },
+    },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -130,14 +149,14 @@ export default {
             overflow: hidden;
 
             &::after {
-                content: '';
+                content: "";
                 position: absolute;
                 left: -30rpx;
                 right: 0;
                 bottom: 0;
                 height: 80rpx;
                 width: calc(100% + 60rpx);
-                background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, #FFF 100%);
+                background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
                 pointer-events: none;
             }
         }
@@ -146,14 +165,14 @@ export default {
             position: relative;
 
             &::before {
-                content: '';
+                content: "";
                 position: absolute;
                 left: 6rpx;
                 top: 0;
                 bottom: 0;
                 width: 2rpx;
                 height: calc(100% - 60rpx);
-                background: #38C148;
+                background: #38c148;
             }
 
             .timeline-item {
@@ -169,7 +188,7 @@ export default {
                     width: 14rpx;
                     height: 14rpx;
                     border-radius: 50%;
-                    background: #38C148;
+                    background: #38c148;
                     margin-right: 20rpx;
                     flex-shrink: 0;
                     z-index: 1;
@@ -181,7 +200,7 @@ export default {
 
                     .status {
                         font-size: 28rpx;
-                        color: #38C148;
+                        color: #38c148;
                         margin-bottom: 8rpx;
                     }
 
@@ -199,8 +218,14 @@ export default {
                         display: flex;
                         align-items: center;
                         font-size: 26rpx;
-                        color: #666;
+                        color: #888888;
                         margin: 8rpx 0;
+                        width: 100%;
+                        height: 88rpx;
+                        line-height: 88rpx;
+                        background: #cdcdcd;
+                        border-radius: 10rpx;
+                        padding-left: 30rpx;
 
                         .u-icon {
                             margin-left: 10rpx;
@@ -213,10 +238,11 @@ export default {
                         padding: 20rpx;
                         background: #dcdcdc;
                         border-radius: 8rpx;
+                        margin-top: 12rpx;
                     }
                 }
             }
         }
     }
 }
-</style>
+</style>

+ 1 - 1
pages-mine/pages/order-detail.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="order-detail">
         <!-- 时间轴组件 -->
-        <order-timeline :logVoList="orderInfo.logVoList"></order-timeline>
+        <order-timeline :logVoList="orderInfo.logVoList" :trackingVoList="orderInfo.trackingVoList"></order-timeline>
 
         <!-- orderInfo.firstOrder == 1 &&  -->
         <return-notice :orderInfo="orderInfo" v-if="orderInfo.restTime" @close="handleReturn"></return-notice>

+ 1 - 1
pages-mine/pages/return-detail.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="order-detail">
         <!-- 时间轴组件 -->
-        <order-timeline :logVoList="orderInfo.logVoList" isReturn></order-timeline>
+        <order-timeline :logVoList="orderInfo.logVoList" isReturn :trackingVoList="orderInfo.trackingVoList"></order-timeline>
         <!-- 书籍列表组件 -->
         <book-list :books="bookList" :totalNum="orderInfo.totalNum" isReturn></book-list>
 

+ 10 - 5
pages/home/index.vue

@@ -25,7 +25,7 @@
             </view>
 
             <view class="flex-a flex-j-b pad-20" style="padding-top: 0" v-if="bookList.length">
-                <view class="left-info" style="min-width: 194px;">
+                <view class="left-info" style="min-width: 194px">
                     <view class="flex-a common-text">
                         共<text class="color-red">{{ totalBooks }}</text
                         >件 预估回收价 <text class="color-red">¥{{ totalPrice || 0 }}</text>
@@ -203,6 +203,11 @@ export default {
                     } else {
                         this.handleBookCode(res.data.code);
                     }
+                } else {
+                    uni.showToast({
+                        title: res.msg,
+                        icon: "none",
+                    });
                 }
             });
         },
@@ -256,9 +261,9 @@ export default {
         },
         handleStartSelling() {
             // 标记已显示过温馨提示
-            uni.setStorageSync('kindReminderShown', true);
+            uni.setStorageSync("kindReminderShown", true);
         },
-        
+
         handleViewRules() {
             // 可以在这里添加额外的逻辑,如果需要的话
         },
@@ -268,9 +273,9 @@ export default {
         setTimeout(() => {
             this.getLastOrder();
         }, 300);
-        
+
         // 显示温馨提示弹窗
-        if (!uni.getStorageSync('kindReminderShown')) {
+        if (!uni.getStorageSync("kindReminderShown")) {
             this.$nextTick(() => {
                 this.$refs.kindReminder.openPopup();
             });

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mine/components/order-timeline.js.map


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mine/pages/order-detail.js.map


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mine/pages/return-detail.js.map


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/index.js.map


+ 61 - 22
unpackage/dist/dev/mp-weixin/pages-mine/components/order-timeline.js

@@ -104,6 +104,24 @@ var render = function () {
   var _vm = this
   var _h = _vm.$createElement
   var _c = _vm._self._c || _h
+  var l0 = _vm.__map(_vm.logVoList, function (item, index) {
+    var $orig = _vm.__get_orig(item)
+    var g0 = item.status == 5 && _vm.trackingVoList.length == 0
+    var g1 = item.status == 5 && _vm.trackingVoList.length > 0
+    return {
+      $orig: $orig,
+      g0: g0,
+      g1: g1,
+    }
+  })
+  _vm.$mp.data = Object.assign(
+    {},
+    {
+      $root: {
+        l0: l0,
+      },
+    }
+  )
 }
 var recyclableRender = false
 var staticRenderFns = []
@@ -180,8 +198,23 @@ exports.default = void 0;
 //
 //
 //
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
 var _default2 = {
-  name: 'order-timeline',
+  name: "order-timeline",
   props: {
     logVoList: {
       type: Array,
@@ -192,34 +225,40 @@ var _default2 = {
     isReturn: {
       type: Boolean,
       default: false
+    },
+    trackingVoList: {
+      type: Array,
+      default: function _default() {
+        return [];
+      }
     }
   },
   data: function data() {
     return {
       isExpanded: false,
       statusTextMap: {
-        '0': '待提交',
-        '1': '已删除',
-        '2': '待初审',
-        '3': '待取件',
-        "4": '初审未通过',
-        "5": '已揽件',
-        "6": '已签收',
-        "7": '物流签收',
-        '8': '待审核',
-        '9': '审核中',
-        '10': '待到款',
-        '11': '已完成'
+        0: "待提交",
+        1: "已删除",
+        2: "待初审",
+        3: "待取件",
+        4: "初审未通过",
+        5: "已揽件",
+        6: "已签收",
+        7: "物流签收",
+        8: "待审核",
+        9: "审核中",
+        10: "待到款",
+        11: "已完成"
       },
       statusTextMap2: {
-        '0': '待付款',
-        '1': '待发货',
-        '2': '已推送',
-        '3': '已发货',
-        '4': '已签收',
-        "5": '已完成',
-        "6": '已取消',
-        "7": '超时取消'
+        0: "待付款",
+        1: "待发货",
+        2: "已推送",
+        3: "已发货",
+        4: "已签收",
+        5: "已完成",
+        6: "已取消",
+        7: "超时取消"
       }
     };
   },
@@ -231,7 +270,7 @@ var _default2 = {
       uni.setClipboardData({
         data: no,
         success: function success() {
-          uni.$u.toast('复制成功');
+          uni.$u.toast("复制成功");
         }
       });
     }

Fișier diff suprimat deoarece este prea mare
+ 0 - 1
unpackage/dist/dev/mp-weixin/pages-mine/components/order-timeline.wxml


+ 14 - 7
unpackage/dist/dev/mp-weixin/pages-mine/components/order-timeline.wxss

@@ -78,28 +78,28 @@
   overflow: hidden;
 }
 .timeline-section .timeline-content.collapsed.data-v-1941e5f4::after {
-  content: '';
+  content: "";
   position: absolute;
   left: -30rpx;
   right: 0;
   bottom: 0;
   height: 80rpx;
   width: calc(100% + 60rpx);
-  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFF 100%);
+  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 100%);
   pointer-events: none;
 }
 .timeline-section .timeline-content .timeline-list.data-v-1941e5f4 {
   position: relative;
 }
 .timeline-section .timeline-content .timeline-list.data-v-1941e5f4::before {
-  content: '';
+  content: "";
   position: absolute;
   left: 6rpx;
   top: 0;
   bottom: 0;
   width: 2rpx;
   height: calc(100% - 60rpx);
-  background: #38C148;
+  background: #38c148;
 }
 .timeline-section .timeline-content .timeline-list .timeline-item.data-v-1941e5f4 {
   display: flex;
@@ -113,7 +113,7 @@
   width: 14rpx;
   height: 14rpx;
   border-radius: 50%;
-  background: #38C148;
+  background: #38c148;
   margin-right: 20rpx;
   flex-shrink: 0;
   z-index: 1;
@@ -124,7 +124,7 @@
 }
 .timeline-section .timeline-content .timeline-list .timeline-item .timeline-info .status.data-v-1941e5f4 {
   font-size: 28rpx;
-  color: #38C148;
+  color: #38c148;
   margin-bottom: 8rpx;
 }
 .timeline-section .timeline-content .timeline-list .timeline-item .timeline-info .time.data-v-1941e5f4,
@@ -140,8 +140,14 @@
   display: flex;
   align-items: center;
   font-size: 26rpx;
-  color: #666;
+  color: #888888;
   margin: 8rpx 0;
+  width: 100%;
+  height: 88rpx;
+  line-height: 88rpx;
+  background: #cdcdcd;
+  border-radius: 10rpx;
+  padding-left: 30rpx;
 }
 .timeline-section .timeline-content .timeline-list .timeline-item .timeline-info .express-no .u-icon.data-v-1941e5f4 {
   margin-left: 10rpx;
@@ -152,5 +158,6 @@
   padding: 20rpx;
   background: #dcdcdc;
   border-radius: 8rpx;
+  margin-top: 12rpx;
 }
 

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages-mine/pages/order-detail.wxml


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages-mine/pages/return-detail.wxml


+ 7 - 2
unpackage/dist/dev/mp-weixin/pages/home/index.js

@@ -330,6 +330,11 @@ var _default = {
           } else {
             _this3.handleBookCode(res.data.code);
           }
+        } else {
+          uni.showToast({
+            title: res.msg,
+            icon: "none"
+          });
         }
       });
     },
@@ -374,7 +379,7 @@ var _default = {
     },
     handleStartSelling: function handleStartSelling() {
       // 标记已显示过温馨提示
-      uni.setStorageSync('kindReminderShown', true);
+      uni.setStorageSync("kindReminderShown", true);
     },
     handleViewRules: function handleViewRules() {
       // 可以在这里添加额外的逻辑,如果需要的话
@@ -388,7 +393,7 @@ var _default = {
     }, 300);
 
     // 显示温馨提示弹窗
-    if (!uni.getStorageSync('kindReminderShown')) {
+    if (!uni.getStorageSync("kindReminderShown")) {
       this.$nextTick(function () {
         _this5.$refs.kindReminder.openPopup();
       });

+ 7 - 0
unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -3,6 +3,13 @@
   "condition": {
     "miniprogram": {
       "list": [
+        {
+          "name": "pages-mine/pages/order-detail",
+          "pathName": "pages-mine/pages/order-detail",
+          "query": "orderId=10058",
+          "launchMode": "default",
+          "scene": null
+        },
         {
           "name": "pages/home/index",
           "pathName": "pages/home/index",

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff