ソースを参照

fix:今日订单和删除商家认证的选择品类

liude 1 年間 前
コミット
d1f71f8fea
3 ファイル変更49 行追加27 行削除
  1. 21 2
      src/api/merchant/order.js
  2. 4 10
      src/pages.json
  3. 24 15
      src/pages/merchant/tabBar/store/index.vue

+ 21 - 2
src/api/merchant/order.js

@@ -1,8 +1,10 @@
 import { request } from '@/utils/request';
 
+
 /**
- * 获取商家订单列表
- * 
+ * @description 获取商家订单列表
+ * @param {*} params 
+ * @returns 
  */
 
 export function getOrderListApi(params){
@@ -16,3 +18,20 @@ export function getOrderListApi(params){
     })
 }
 
+
+/**
+ * @description 订单接口 - 商家端查询订单量以及今日收入
+ * @param {*} params 
+ * @returns 
+ */
+
+export function getOrderQuantityApi(params) {
+    return request({
+      url: '/maintain/order/getOrderQuantity',
+      data: params,
+      method: 'GET',
+      header: {
+        'Content-Type': 'application/x-www-form-urlencoded',
+      },
+    });
+  }

+ 4 - 10
src/pages.json

@@ -332,24 +332,18 @@
 			    "navigationStyle": "default"
 			  }
 			},
-			{
-			  "path": "tabBar/mine/openStore/selectCategory",
-			  "style": {
-			    "navigationBarTitleText": "1/4选择品类",
-			    "navigationStyle": "default"
-			  }
-			},
+
 			{
 			  "path": "tabBar/mine/openStore/storeInformation",
 			  "style": {
-			    "navigationBarTitleText": "2/4门店信息",
+			    "navigationBarTitleText": "1/3门店信息",
 			    "navigationStyle": "default"
 			  }
 			},
 			{
 			  "path": "tabBar/mine/openStore/corporateInformation",
 			  "style": {
-			    "navigationBarTitleText": "3/4法人信息"
+			    "navigationBarTitleText": "2/3法人信息"
 			  }
 			},
 			{
@@ -367,7 +361,7 @@
 			{
 			  "path": "tabBar/mine/openStore/qualificationInformation",
 			  "style": {
-			    "navigationBarTitleText": "4/4资质信息"
+			    "navigationBarTitleText": "2/3资质信息"
 			  }
 			},
 

+ 24 - 15
src/pages/merchant/tabBar/store/index.vue

@@ -1,10 +1,6 @@
-<!--
- * @Author: yizhiyang
- * @Date: 2023-11-30 09:40:24
- * @Description:
--->
 <template>
   <view class="shop">
+    <view style="height: 85rpx" />
     <view class="shop__data">
       <view class="shop__data--left">
         <view class="text-title">店铺分</view>
@@ -18,7 +14,8 @@
         <view class="line"></view>
         <view>
           <view class="text-title">今日订单(单)</view>
-          <view class="text-num">30</view>
+          <!-- <view class="text-num">{{ orderCount }}</view> -->
+          <view class="text-num">{{ orderCount }}</view>
         </view>
       </view>
     </view>
@@ -74,6 +71,7 @@
 </template>
 
 <script>
+import { getOrderQuantityApi } from '@/api/merchant/order';
 export default {
   data() {
     return {
@@ -124,6 +122,7 @@ export default {
           title: '全部',
         },
       ],
+      orderCount: 0
     };
   },
   methods: {
@@ -133,21 +132,31 @@ export default {
       switch (index) {
         case 0:
           uni.navigateTo({
-            url:'/pages/merchant/tabBar/store/shopManage'
-          })
-        break;
+            url: '/pages/merchant/tabBar/store/shopManage',
+          });
+          break;
         case 1:
           uni.navigateTo({
-            url:'/pages/merchant/tabBar/store/evaluateManagement'
-          })
-        break;
+            url: '/pages/merchant/tabBar/store/evaluateManagement',
+          });
+          break;
         case 5:
           uni.navigateTo({
-            url:'/pages/merchant/tabBar/store/myTeam'
-          })
-        break;
+            url: '/pages/merchant/tabBar/store/myTeam',
+          });
+          break;
       }
     },
+    async getOrderQuantity() {
+      let res = await getOrderQuantityApi();
+
+      if (res.code === 200) {
+        this.orderCount = res.data.orderCount;
+      }
+    },
+  },
+  mounted() {
+    this.getOrderQuantity();
   },
 };
 </script>