|
@@ -1,23 +1,67 @@
|
|
<template>
|
|
<template>
|
|
- <view className="client-shouye-page">
|
|
|
|
- <view class="icon-title-bjcolor-navBar-box">
|
|
|
|
- <text class="nav-bar-title">用户名</text>
|
|
|
|
|
|
+ <view className="client-shouye-page">
|
|
|
|
+ <view class="icon-title-bjcolor-navBar-box">
|
|
|
|
+ <text class="nav-bar-title">用户名</text>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- 考试 -->
|
|
|
|
+ <kaoshiCardVue v-if="data.kaoshiList.length" :data="{ count: data.kaoshiCount, ...data.kaoshiList[0] }"></kaoshiCardVue>
|
|
|
|
+ <!-- 练习 -->
|
|
|
|
+ <lianxiCardVue v-if="data.lianxiList.length" :data="{ count: data.lianxiCount,...data.lianxiList[0] }"></lianxiCardVue>
|
|
|
|
+ <!-- 课程 -->
|
|
|
|
+ <kechengCardVue v-if="data.kechengList.length" :data="{ count: data.kechengCount,...data.kechengList[0] }"></kechengCardVue>
|
|
|
|
+ <!-- 底部区域 -->
|
|
|
|
+ <customTabbarClient></customTabbarClient>
|
|
</view>
|
|
</view>
|
|
- <!-- 考试 -->
|
|
|
|
- <kaoshiCardVue></kaoshiCardVue>
|
|
|
|
- <!-- 练习 -->
|
|
|
|
- <lianxiCardVue></lianxiCardVue>
|
|
|
|
- <!-- 课程 -->
|
|
|
|
- <kechengCardVue></kechengCardVue>
|
|
|
|
- <!-- 底部区域 -->
|
|
|
|
- <customTabbarClient></customTabbarClient>
|
|
|
|
- </view>
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import kaoshiCardVue from '@/components/listCard/kaoshiCard.vue';
|
|
|
|
-import kechengCardVue from '@/components/listCard/kechengCard.vue';
|
|
|
|
-import lianxiCardVue from '@/components/listCard/lianxiCard.vue';
|
|
|
|
-import customTabbarClient from "@/components/custom-tabbar/custom-tabbar-client.vue"
|
|
|
|
-</script>
|
|
|
|
|
|
+ import kaoshiCardVue from '@/components/listCard/kaoshiCard.vue';
|
|
|
|
+ import kechengCardVue from '@/components/listCard/kechengCard.vue';
|
|
|
|
+ import lianxiCardVue from '@/components/listCard/lianxiCard.vue';
|
|
|
|
+ import customTabbarClient from "@/components/custom-tabbar/custom-tabbar-client.vue"
|
|
|
|
|
|
|
|
+ import * as httpApi from "@/api/shouye.js"
|
|
|
|
+ import {
|
|
|
|
+ onLoad
|
|
|
|
+ } from "@dcloudio/uni-app"
|
|
|
|
+ import {
|
|
|
|
+ reactive
|
|
|
|
+ } from "vue"
|
|
|
|
+
|
|
|
|
+ const { saveIdentCache, getIdentCache, removeIdentCache } = useIdentificationTools();
|
|
|
|
+
|
|
|
|
+ const data = reactive({
|
|
|
|
+ kaoshiCount: 0,
|
|
|
|
+ kaoshiList: [],
|
|
|
|
+ kechengCount: 0,
|
|
|
|
+ kechengList: [],
|
|
|
|
+ lianxiCount: 0,
|
|
|
|
+ lianxiList: []
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ function initPage() {
|
|
|
|
+ httpApi.getAppIndexInfo().then(res => {
|
|
|
|
+ const {
|
|
|
|
+ kaoshiCount,
|
|
|
|
+ kaoshiList,
|
|
|
|
+ kechengCount,
|
|
|
|
+ kechengList,
|
|
|
|
+ lianxiCount,
|
|
|
|
+ lianxiList
|
|
|
|
+ } = res.data;
|
|
|
|
+
|
|
|
|
+ data.kaoshiCount = kaoshiCount;
|
|
|
|
+ data.kaoshiList = kaoshiList;
|
|
|
|
+ data.kechengCount = kechengCount;
|
|
|
|
+ data.kechengList = kechengList;
|
|
|
|
+ data.lianxiCount = lianxiCount;
|
|
|
|
+ data.lianxiList = lianxiList;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ onLoad(() => {
|
|
|
|
+ initPage()
|
|
|
|
+ })
|
|
|
|
+</script>
|