|
@@ -1,17 +1,16 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="client-shouye-page">
|
|
<view class="client-shouye-page">
|
|
|
<customNavbarVue title="首页"></customNavbarVue>
|
|
<customNavbarVue title="首页"></customNavbarVue>
|
|
|
-
|
|
|
|
|
<template v-if="data.hetongList.length">
|
|
<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>
|
|
</template>
|
|
|
<view class="default-img-box" v-else>
|
|
<view class="default-img-box" v-else>
|
|
|
<icon :style="{ backgroundImage: 'url(' + data.defaultIndexImg + ')' }"></icon>
|
|
<icon :style="{ backgroundImage: 'url(' + data.defaultIndexImg + ')' }"></icon>
|
|
|
<text>没有可培训的内容...</text>
|
|
<text>没有可培训的内容...</text>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 底部区域 -->
|
|
<!-- 底部区域 -->
|
|
|
- <customTabbarKehu :currentTab="0"></customTabbarKehu>
|
|
|
|
|
|
|
+ <customTabbarKehu :currentTab="1"></customTabbarKehu>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -21,30 +20,30 @@
|
|
|
import customTabbarKehu from "@/components/custom-tabbar/custom-tabbar-kehu.vue"
|
|
import customTabbarKehu from "@/components/custom-tabbar/custom-tabbar-kehu.vue"
|
|
|
|
|
|
|
|
import * as httpApi from "@/api/khShouye.js"
|
|
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'
|
|
import cacheManager from '@/utils/cacheManager.js'
|
|
|
|
|
|
|
|
const data = reactive({
|
|
const data = reactive({
|
|
|
- hetongList: [],
|
|
|
|
|
realName: '',
|
|
realName: '',
|
|
|
defaultIndexImg: '',
|
|
defaultIndexImg: '',
|
|
|
|
|
+ hetongList: [],
|
|
|
iconsArr: {
|
|
iconsArr: {
|
|
|
- jzIcon: '',
|
|
|
|
|
- keIcon: '',
|
|
|
|
|
- timeIcon: '',
|
|
|
|
|
- hzIcon: '',
|
|
|
|
|
|
|
+ jzgsIcon: '',
|
|
|
|
|
+ htJzIcon: '',
|
|
|
|
|
+ htKhIcon: '',
|
|
|
|
|
+ htTimeIcon: '',
|
|
|
|
|
+ htZtIcon: '',
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
function initPage() {
|
|
function initPage() {
|
|
|
httpApi.getKehuIndex().then(res => {
|
|
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');
|
|
const auth = cacheManager.get('auth');
|
|
|
data.realName = auth.realName;
|
|
data.realName = auth.realName;
|
|
|
data.defaultIndexImg = cacheManager.get('projectImg').index_default_img;
|
|
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(() => {
|
|
onShow(() => {
|