Browse Source

商家订单

liude 1 year ago
parent
commit
7d7ceac40d
2 changed files with 33 additions and 7 deletions
  1. 18 0
      src/api/merchant/order.js
  2. 15 7
      src/pages/merchant/tabBar/order/index.vue

+ 18 - 0
src/api/merchant/order.js

@@ -0,0 +1,18 @@
+import { request } from '@/utils/request';
+
+/**
+ * 获取商家订单列表
+ * 
+ */
+
+export function getOrderListApi(params){
+    return request({
+        url: "/maintain/order/merchantPaging",
+        data:params,
+        method: "GET",
+        header: {
+            'Content-Type': 'application/x-www-form-urlencoded',
+          },
+    })
+}
+

+ 15 - 7
src/pages/merchant/tabBar/order/index.vue

@@ -1,8 +1,3 @@
-<!--
- * @Author: yizhiyang
- * @Date: 2023-11-30 09:40:24
- * @Description:
--->
 <template>
   <view>
     <view class="order">
@@ -29,7 +24,7 @@
         ></u-tabs>
       </view>
 
-      <orderItem :typeStyle.sync='typeStyle'></orderItem>
+      <orderItem :typeStyle.sync='typeStyle' :list="orderList"></orderItem>
 
     </view>
 	<tabbar currentTab="merchantOrder" />
@@ -38,6 +33,7 @@
 
 <script>
   import orderItem from "@/pages/merchant/tabBar/order/components/orderItem.vue"
+  import {getOrderListApi } from "@/api/merchant/order"
 export default {
   data() {
     return {
@@ -48,7 +44,12 @@ export default {
         { id: '4', name: '退款' },
         { id: '5', name: '已完成' },
       ],
-      typeStyle:0
+      typeStyle:0,
+      orderList: [],
+      params: {
+        pageNum: 1,
+        pageSize: 10,
+      },
     };
   },
   components:{orderItem},
@@ -56,7 +57,14 @@ export default {
     // 点击切换顶部导航栏
     handlerChangeItem(item){
       this.typeStyle = item.index
+    },
+    async getOrderList(){
+      let res = await getOrderListApi()
+      console.log(res);
     }
+  },
+  mounted() {
+    this.getOrderList()
   }
 };
 </script>