|
@@ -1,10 +1,11 @@
|
|
<template>
|
|
<template>
|
|
- <view class="ezy-study-page ezy-yingyu-study-page">
|
|
|
|
|
|
+ <view class="ezy-study-page ezy-cjdc-study-page">
|
|
<view class="study-school-year" @click="clickGradeTerm">{{gradeTerm}}</view>
|
|
<view class="study-school-year" @click="clickGradeTerm">{{gradeTerm}}</view>
|
|
<view class="ezy-study-wrap" @touchstart="onTouchStart" @touchend="onTouchEnd">
|
|
<view class="ezy-study-wrap" @touchstart="onTouchStart" @touchend="onTouchEnd">
|
|
<img class="study-name-img" :src="growthImg"/>
|
|
<img class="study-name-img" :src="growthImg"/>
|
|
- <view></view>
|
|
|
|
- <view @click="handleCheckCatalogue" class="chapter-title-box">{{zhangName}}</view>
|
|
|
|
|
|
+ <!-- <img class="study-book-img" :src="bookImg"/> -->
|
|
|
|
+ <img class="study-book-img" src="@/static/images/study/cjdc/book-default-img.png"/>
|
|
|
|
+ <view @click="handleCheckCatalogue" :class="getTitleClass(zhangName)">{{zhangName}}</view>
|
|
<!-- 动物类型 -->
|
|
<!-- 动物类型 -->
|
|
<view v-if="growthType!=null" :class="currentGrowth()"></view>
|
|
<view v-if="growthType!=null" :class="currentGrowth()"></view>
|
|
<view>
|
|
<view>
|
|
@@ -68,6 +69,7 @@
|
|
} from '@dcloudio/uni-app';
|
|
} from '@dcloudio/uni-app';
|
|
const growthType = ref(null);
|
|
const growthType = ref(null);
|
|
const growthImg = ref(null);
|
|
const growthImg = ref(null);
|
|
|
|
+ const bookImg = ref(null);
|
|
const youkeImageBook = ref(null);
|
|
const youkeImageBook = ref(null);
|
|
const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
|
|
const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -90,6 +92,8 @@
|
|
onShow(() => {
|
|
onShow(() => {
|
|
growthType.value = cacheManager.get('auth')?cacheManager.get('auth').growthType:props.youkeImage
|
|
growthType.value = cacheManager.get('auth')?cacheManager.get('auth').growthType:props.youkeImage
|
|
growthImg.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').icon : props.youkeImage;
|
|
growthImg.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').icon : props.youkeImage;
|
|
|
|
+ // 待修改 wgy看这
|
|
|
|
+ bookImg.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').icon : props.youkeImage;
|
|
youkeImageBook.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').zhangIcon : props.youkeImageBook;
|
|
youkeImageBook.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').zhangIcon : props.youkeImageBook;
|
|
|
|
|
|
})
|
|
})
|
|
@@ -141,18 +145,16 @@
|
|
return 'animal-img da-e-img'
|
|
return 'animal-img da-e-img'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 章换行显示
|
|
|
|
- function getZhangContent(data) {
|
|
|
|
- console.log(data.length, 'data.length');
|
|
|
|
- let length = data.length;
|
|
|
|
- // 初始将字符串平分成两半
|
|
|
|
- let halfLength = Math.floor(length / 2);
|
|
|
|
-
|
|
|
|
- // 插入换行符
|
|
|
|
- let firstLine = data.slice(0, halfLength);
|
|
|
|
- let secondLine = data.slice(halfLength);
|
|
|
|
- console.log(firstLine + '\n' + secondLine, 'firstLine + + secondLine');
|
|
|
|
- return firstLine + '\n' + secondLine;
|
|
|
|
|
|
+ // 章名称显示显示
|
|
|
|
+ function getTitleClass(data) {
|
|
|
|
+ console.log(data.length, 'data.length666');
|
|
|
|
+ if(data.length <= 5){
|
|
|
|
+ return 'chapter-title-box'
|
|
|
|
+ }else if(data.length <= 8){
|
|
|
|
+ return 'chapter-big-title-box'
|
|
|
|
+ }else{
|
|
|
|
+ return 'chapter-last-title-box'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// 获取节class
|
|
// 获取节class
|