tanxue před 2 měsíci
rodič
revize
6b90271b12
2 změnil soubory, kde provedl 34 přidání a 3 odebrání
  1. 12 0
      api/shouye.js
  2. 22 3
      pages/admin/ShouYe/shouye.vue

+ 12 - 0
api/shouye.js

@@ -46,4 +46,16 @@ export function getAppNoticeWait(data = {}) {
     data,
     timeout: 20000
   })
+}
+
+export function getGlIndexInfo(data = {}) {
+  return request({
+    'url': '/app/guanliyuan/index/info',
+    headers: {
+      isToken: true
+    },
+    method: 'post',
+    data,
+    timeout: 20000
+  })
 }

+ 22 - 3
pages/admin/ShouYe/shouye.vue

@@ -1,11 +1,11 @@
 <template>
   <view class="admin-shouye-page">
-	  <view class="shouye-head-box">家政公司名称</view>
+	  <view class="shouye-head-box">{{indexInfoData.jzName}}</view>
 	  <view class="index-tj-box">
 		  <view class="tj-btn-box">
 			  <text :class="{active: tjBtn == 1}" @click="tjBtnClick(1)">本周</text>
 			  <text :class="{active: tjBtn == 2}" @click="tjBtnClick(2)">本月</text>
-			  <text :class="{active: tjBtn == 3}" @click="tjBtnClick(3)">全部</text>
+			  <text :class="{active: tjBtn == 0}" @click="tjBtnClick(0)">全部</text>
 		  </view>
 		  <view class="tj-num-box">0/0</view>
 		  <view class="tj-tip-box">考证人员/家政人员</view>
@@ -54,11 +54,18 @@
 import {onLoad,onShow} from '@dcloudio/uni-app';
 import {reactive,ref} from "vue";
 import customTabbarAdminVue from "@/components/custom-tabbar/custom-tabbar-admin.vue";
-import {getAppNoticeList,getAppNoticeWait} from '@/api/shouye.js'
+import {getAppNoticeList,getAppNoticeWait,getGlIndexInfo} from '@/api/shouye.js'
 
 const tjBtn = ref(1);
 const tzNum = ref(0);
 const tzContent = ref('');
+const searchType = ref('');
+let indexInfoData = reactive({
+		searchType:1,
+		bzCount: 0,
+		jzCount: 0,
+		jzName: '',
+	});
 
 onLoad((options) => {
 		initPage();
@@ -67,6 +74,7 @@ onLoad((options) => {
 function initPage() {
 	getTzNum();
 	getTzlist();
+	getIndexInfo();
 }	
 
 function getTzNum(){
@@ -74,6 +82,15 @@ function getTzNum(){
 		tzNum.value = res.data;
 	})
 }
+
+function getIndexInfo(){
+	getGlIndexInfo({searchType:indexInfoData.searchType}).then(res => {
+		indexInfoData.bzCount = res.data.bzCount;
+		indexInfoData.jzCount = res.data.jzCount;
+		indexInfoData.jzName = res.data.jzName;
+	})
+}
+
 function getTzlist(){
 	const opt = {
 		page: 1,
@@ -87,6 +104,8 @@ function getTzlist(){
 // 按钮切换
 function tjBtnClick(data){
 	tjBtn.value = data;
+	indexInfoData.searchType = data;
+	getIndexInfo();
 }
 // 获取用户头像
 	function goToPage(data){