tanxue před 3 dny
rodič
revize
fc2e1e52ba
2 změnil soubory, kde provedl 22 přidání a 22 odebrání
  1. 2 2
      pages/kehu/my/my.vue
  2. 20 20
      pages/kehu/shouye/shouye.vue

+ 2 - 2
pages/kehu/my/my.vue

@@ -50,7 +50,7 @@
 			</view>
 		</view>
 		<!-- 底部区域 -->
-		<customTabbarClient :currentTab="1"></customTabbarClient>
+		<customTabbarKehu :currentTab="1"></customTabbarKehu>
 		<common-dialog ref="commonDialogRef" :title="exitTitle" :content="exitContent"@confirm-btn="exitBtn"></common-dialog>
 		<shexiangDialogVue ref="shexiangRef" title="摄像头说明"></shexiangDialogVue>
 	</view>
@@ -62,7 +62,7 @@
 	import cacheManager from '@/utils/cacheManager.js';
 	import {getKehuUser,getKehuLogout} from '@/api/kehu.js'
 	import {reactive,ref} from "vue";
-	import customTabbarClient from "@/components/custom-tabbar/custom-tabbar-client.vue"
+	import customTabbarKehu from "@/components/custom-tabbar/custom-tabbar-kehu.vue"
 	import commonDialog from '@/components/dialog/commonDialog.vue';
 	import shexiangDialogVue from "@/components/dialog/shexiangDialog.vue";
 	

+ 20 - 20
pages/kehu/shouye/shouye.vue

@@ -1,17 +1,16 @@
 <template>
 	<view class="client-shouye-page">
 		<customNavbarVue title="首页"></customNavbarVue>
-	
 		<template v-if="data.hetongList.length">
 			<!-- 合同 -->
-			<hetongCardVue v-if="data.hetongList!={}" :data="{ count: data.kaoshiCount, ...data.kaoshiList[0],iconsArr:data.iconsArr}"></hetongCardVue>
+			<hetongCardVue v-if="data.hetongList.length" :data="{...data.hetongList[0],iconsArr:data.iconsArr}"></hetongCardVue>
 		</template>
 		<view class="default-img-box" v-else>
 			<icon :style="{ backgroundImage: 'url(' + data.defaultIndexImg + ')' }"></icon>
 			<text>没有可培训的内容...</text>
 		</view>
 		<!-- 底部区域 -->
-		<customTabbarKehu :currentTab="0"></customTabbarKehu>
+		<customTabbarKehu :currentTab="1"></customTabbarKehu>
 	</view>
 </template>
 
@@ -21,30 +20,30 @@
 	import customTabbarKehu from "@/components/custom-tabbar/custom-tabbar-kehu.vue"
 
 	import * as httpApi from "@/api/khShouye.js"
-	import {
-		onLoad, onShow
-	} from "@dcloudio/uni-app"
-	import {
-		reactive
-	} from "vue"
+	import {onLoad, onShow} from "@dcloudio/uni-app"
+	import {reactive} from "vue"
 	import cacheManager from '@/utils/cacheManager.js'
 
 	const data = reactive({
-		hetongList: [],
 		realName: '',
 		defaultIndexImg: '',
+		hetongList: [],
 		iconsArr: {
-			jzIcon: '',
-			keIcon: '',
-			timeIcon: '',
-			hzIcon: '',
+			jzgsIcon: '',
+			htJzIcon: '',
+			htKhIcon: '',
+			htTimeIcon: '',
+			htZtIcon: '',
 		},
 	})
 
 	function initPage() {
 		httpApi.getKehuIndex().then(res => {
-			const {hetong} = res.data;
-			data.hetongList = hetong || [];
+			const {
+				hetong
+			} = res.data;
+			
+			data.hetongList = hetong ? [hetong] : [];
 		})
 	}
 
@@ -53,10 +52,11 @@
 		const auth = cacheManager.get('auth');
 		data.realName = auth.realName;
 		data.defaultIndexImg = cacheManager.get('projectImg').index_default_img;
-		data.iconsArr.jzIcon = cacheManager.get('projectImg').index_content_icon2;
-		data.iconsArr.keIcon = cacheManager.get('projectImg').index_content_icon3;
-		data.iconsArr.timeIcon = cacheManager.get('projectImg').index_content_icon1;
-		data.iconsArr.hzIcon = cacheManager.get('projectImg').index_content_icon4;
+		data.iconsArr.jzgsIcon = cacheManager.get('projectImg').jzgs_icon;
+		data.iconsArr.htJzIcon = cacheManager.get('projectImg').user_green_icon;
+		data.iconsArr.htKhIcon = cacheManager.get('projectImg').zymc_icon;
+		data.iconsArr.htTimeIcon = cacheManager.get('projectImg').date_icon;
+		data.iconsArr.htZtIcon = cacheManager.get('projectImg').htzt_icon;
 	})
 	
 	onShow(() => {