|
@@ -1,13 +1,8 @@
|
|
|
<template>
|
|
|
- <view class="ezy-study-page ezy-shuxue-study-page">
|
|
|
+ <view class="ezy-study-page ezy-jstx-study-page">
|
|
|
<view class="study-school-year" @click="clickGradeTerm">{{gradeTerm}}</view>
|
|
|
<view class="ezy-study-wrap">
|
|
|
- <view class="chapter-box" @click="handleCheckCatalogue">{{options.numberStr}}</view>
|
|
|
- <view @click="handleCheckCatalogue" :class="getTitleClass(options.zhangName)">
|
|
|
- {{getZhangName(options.zhangName)}}
|
|
|
- </view>
|
|
|
- <!-- 动物类型 -->
|
|
|
- <view v-if="growthType!=null" :class="currentGrowth()"></view>
|
|
|
+ <img class="study-name-img" :src="growthImg"/>
|
|
|
<view>
|
|
|
<!-- 小岛 -->
|
|
|
<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
|
|
@@ -20,31 +15,29 @@
|
|
|
<!-- 箭头 -->
|
|
|
<view v-if="item.daeFlag &&animalNum == index" class="brand-arrow"></view>
|
|
|
<!-- 节名称 -->
|
|
|
- <view class="brand-content">{{ item.jieName }}</view>
|
|
|
+ <view class="brand-content"><text>{{ item.jieName }}</text></view>
|
|
|
</view>
|
|
|
<view v-if="isVip == 'Not-Vip'">
|
|
|
- <!-- 序号或锁 -->
|
|
|
- <view v-if="options.number ==1 && item.firstFlag ==1" class="brand-icon">{{ item.number }}
|
|
|
- </view>
|
|
|
+ <!-- 序号 -->
|
|
|
+ <view v-if="options.number ==1 && item.firstFlag ==1" class="brand-icon">{{ item.number }} </view>
|
|
|
+ <!-- 锁 -->
|
|
|
<view v-else class="brand-lock"></view>
|
|
|
<!-- 箭头 -->
|
|
|
- <view v-if="item.daeFlag && animalNum == index &&isVip != 'Visitor'" class="brand-arrow">
|
|
|
- </view>
|
|
|
+ <view v-if="item.daeFlag && animalNum == index &&isVip != 'Visitor'" class="brand-arrow"> </view>
|
|
|
<!-- 节名称 -->
|
|
|
- <view class="brand-content"> {{ item.jieName }} </view>
|
|
|
+ <view class="brand-content"><text>{{ item.jieName }}</text></view>
|
|
|
</view>
|
|
|
|
|
|
+
|
|
|
<view v-if="isVip == 'Visitor'">
|
|
|
- <!-- 序号或锁 -->
|
|
|
- <view class="brand-icon">{{ item.number }}
|
|
|
- </view>
|
|
|
+ <!-- 序号 -->
|
|
|
+ <view class="brand-icon">{{ item.number }} </view>
|
|
|
<!-- 锁 -->
|
|
|
<view v-if="options.number !='1' || item.type==2" class="brand-lock"></view>
|
|
|
<!-- 箭头 -->
|
|
|
- <view v-if="item.daeFlag && animalNum == index &&isVip != 'Visitor'" class="brand-arrow">
|
|
|
- </view>
|
|
|
+ <view v-if="item.daeFlag && animalNum == index &&isVip != 'Visitor'" class="brand-arrow"> </view>
|
|
|
<!-- 节名称 -->
|
|
|
- <view class="brand-content"> {{ item.jieName }} </view>
|
|
|
+ <view class="brand-content"><text>{{ item.jieName }}</text></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -70,8 +63,10 @@
|
|
|
onShow
|
|
|
} from '@dcloudio/uni-app';
|
|
|
const growthType = ref(null);
|
|
|
+ const growthImg = ref(null);
|
|
|
onShow(() => {
|
|
|
- growthType.value = cacheManager.get('auth') ? cacheManager.get('auth').growthType : null
|
|
|
+ growthType.value = cacheManager.get('auth') ? cacheManager.get('auth').growthType : null;
|
|
|
+ growthImg.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').icon : null;
|
|
|
})
|
|
|
|
|
|
const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
|
|
@@ -154,18 +149,6 @@
|
|
|
return firstLine + '\n' + secondLine;
|
|
|
}
|
|
|
|
|
|
- // 章class
|
|
|
- function getTitleClass(data) {
|
|
|
-
|
|
|
- if (data.length <= 5) {
|
|
|
- return 'chapter-title-box chapter-small-title-box'
|
|
|
- } else if (data.length <= 9) {
|
|
|
- return 'chapter-title-box chapter-middle-title-box'
|
|
|
- } else if (data.length > 9) {
|
|
|
- return 'chapter-title-box chapter-big-title-box'
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// 获取节class
|
|
|
function getClass(data, index, isVip,item) {
|
|
|
// console.log('data',data);
|
|
@@ -179,24 +162,7 @@
|
|
|
} else {
|
|
|
brandActive = '';
|
|
|
}
|
|
|
- let indexLast = data.jieList.length - 1;
|
|
|
- // 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
|
|
|
- if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == '单元测试') {
|
|
|
- return 'ceshi-brand-item' + ' ' + brandActive;
|
|
|
- } else {
|
|
|
- return getJieClass(data, index, brandActive)
|
|
|
- }
|
|
|
}
|
|
|
- // 根据获取节字数获取class
|
|
|
- function getJieClass(data, index, active) {
|
|
|
- let itemJieName = data.jieList[index].jieName.length;
|
|
|
- if (itemJieName > 7) {
|
|
|
- return 'big-brand-item' + ' ' + active;
|
|
|
- } else {
|
|
|
- return 'small-brand-item' + ' ' + active;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
|
|
|
function handleCheckCatalogue() {
|