ZhouFeng 3 éve
szülő
commit
bb165ffb84
2 módosított fájl, 25 hozzáadás és 6 törlés
  1. 24 6
      src/components/Home.vue
  2. 1 0
      src/components/orderComponents/orderTrack.vue

+ 24 - 6
src/components/Home.vue

@@ -28,8 +28,12 @@
       </el-col>
       <el-col :span="6">
         <div class="order_detail">
-          <div class="detail_title">订单详情</div>
-          <order-detail :tabNum='tab_ac'></order-detail>
+          <div class="detail_title">
+            <div class="detail_txt" @click="orderDetailStutus=0" :class="{'detail_txt_ac':orderDetailStutus==0?true:false}">订单跟踪</div>
+            <div class="detail_txt" @click="orderDetailStutus=1" :class="{'detail_txt_ac':orderDetailStutus==1?true:false}">订单详情</div>
+          </div>
+          <order-detail :tabNum='tab_ac' v-if="orderDetailStutus==1"></order-detail>
+          <order-track :tabNum='tab_ac' v-if="orderDetailStutus==0"></order-track>
         </div>
       </el-col>
     </el-row>
@@ -40,9 +44,9 @@
 <script>
   import sendOrderPopup from './orderComponents/sendOrderPopup.vue';
   import OrderDetail from './orderComponents/orderDetail.vue';
-  import orderList from './orderComponents/orderList'
-import OrderList from './orderComponents/orderList.vue';
   import orderMap from './orderComponents/orderAMap.vue';
+  import OrderList from './orderComponents/orderList.vue';
+  import orderTrack from './orderComponents/orderTrack'
   export default {
     data() {
       return {
@@ -56,6 +60,7 @@ import OrderList from './orderComponents/orderList.vue';
           {name:'已取消',num:0}
         ],
         tab_ac:0,
+        orderDetailStutus:0,
         input:''
       }
     },
@@ -63,7 +68,8 @@ import OrderList from './orderComponents/orderList.vue';
       sendOrderPopup,
         OrderDetail,
         OrderList,
-        orderMap
+        orderMap,
+        orderTrack
     },
     methods: {
       sendOrder() {
@@ -200,7 +206,19 @@ import OrderList from './orderComponents/orderList.vue';
         align-items: center;
         font-size: 12px;
         font-weight: 600;
-        color: #B1B1B1;
+        display: flex;
+        align-items: flex-end;
+        .detail_txt{
+          color: #B1B1B1;
+          padding-bottom: 13px;
+          border-bottom:  2px solid #FAFAFA;
+          margin-right: 28px;
+          cursor: pointer;
+        }
+        .detail_txt_ac{
+          color: #00152A;
+          border-color: #00152A;
+        }
       }
       .detail_cont{
         width: 100%;

+ 1 - 0
src/components/orderComponents/orderTrack.vue

@@ -105,6 +105,7 @@
 
 <script>
   export default {
+     name: 'orderTrack',
     data() {
       return {