wangguoyu 6 月之前
父節點
當前提交
3215e9766c
共有 2 個文件被更改,包括 9 次插入5 次删除
  1. 5 2
      pages/study/product/shuxue.vue
  2. 4 3
      pages/study/product/yingyu.vue

+ 5 - 2
pages/study/product/shuxue.vue

@@ -7,7 +7,7 @@
 				{{getZhangName(options.zhangName)}}
 			</view>
 			<!-- 动物类型 -->
-			<view :class="currentGrowth()"></view>
+			<view v-if="growthType" :class="currentGrowth()"></view>
 			<view>
 				<!-- 小岛 -->
 				<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
@@ -57,7 +57,10 @@
 		onShow
 	} from '@dcloudio/uni-app';
 	const growthType = ref(null);
-	onShow(() => growthType.value = cacheManager.get('auth').growthType)
+	onShow(() => {
+		growthType.value = cacheManager.get('auth')?cacheManager.get('auth').growthType:null
+	})
+	
 	const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
 	const props = defineProps({
 		options: {

+ 4 - 3
pages/study/product/yingyu.vue

@@ -4,7 +4,7 @@
 		<view class="ezy-study-wrap" @touchstart="onTouchStart" @touchend="onTouchEnd">
 			<view @click="handleCheckCatalogue" class="chapter-title-box">{{options.zhangName}}</view>
 			<!-- 动物类型 -->
-			<view :class="currentGrowth()"></view>
+			<view v-if="growthType" :class="currentGrowth()"></view>
 			<view>
 				<!-- 小岛 -->
 				<view class="brand-item" v-for="(item, index) in options.jieList" :key="item.jieId"
@@ -54,8 +54,9 @@
 		onShow
 	} from '@dcloudio/uni-app';
 	const growthType = ref(null);
-	onShow(() => growthType.value = cacheManager.get('auth').growthType)
-
+	onShow(() => {
+		growthType.value = cacheManager.get('auth')?cacheManager.get('auth').growthType:null
+	})
 	const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
 	const props = defineProps({
 		options: {