wangguoyu пре 2 недеља
родитељ
комит
7a2fb06529
3 измењених фајлова са 98 додато и 28 уклоњено
  1. 13 2
      pages/study/product/shuxueNew.vue
  2. 52 21
      pages/study/product/yingyu.vue
  3. 33 5
      pages/study/product/yingyuNew.vue

+ 13 - 2
pages/study/product/shuxueNew.vue

@@ -29,7 +29,14 @@
 					</view>
 					
 					
-					<view v-if="isVip == 'Visitor'">
+					<view v-if="isVip == 'Visitor' && appleTishen =='true'&&item.type!=2">
+			
+						<view class="brand-icon">{{ item.number }} </view>
+				
+						<view class="brand-content"><text>{{ item.jieName }}</text></view>
+					</view>
+				
+					<view v-if="isVip == 'Visitor'&& appleTishen =='false'">
 			
 						<view class="brand-icon">{{ item.number }} </view>
 						<!-- 锁 -->
@@ -63,7 +70,7 @@
 		onShow
 	} from '@dcloudio/uni-app';
 	const growthImg = ref(null);
-
+	const appleTishen = ref(null);
 
 	const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
 	const props = defineProps({
@@ -79,6 +86,8 @@
 	})
 	onShow(() => {
 		growthImg.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').icon : props.youkeImage;
+		appleTishen.value = cacheManager.get('youkeTishen').toString()
+		console.log(appleTishen.value);
 	})
 	const isVip = getUserIdentity();
 	console.log('isVip', isVip);
@@ -146,6 +155,8 @@
 			brandActive = 'brand-active';
 		} else if (data.number == 1&&item.firstFlag==1 && isVip =='Not-Vip') {
 			brandActive = 'brand-active';
+		} else if (appleTishen.value =='true'&&isVip == 'Visitor') {
+			brandActive = 'brand-active';
 		} else if (data.number == 1&&item.firstFlag==1 && isVip =='Visitor' &&item.type ==1) {
 			brandActive = 'brand-active';
 		} else {

+ 52 - 21
pages/study/product/yingyu.vue

@@ -21,25 +21,36 @@
 					</view>
 					<view v-if="isVip == 'Not-Vip'">
 						<!-- 序号 -->
-						<view  class="brand-icon">{{ item.number }}
+						<view class="brand-icon">{{ item.number }}
 						</view>
 						<view v-if="item.firstFlag !=1" 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>
-					<view v-if="isVip == 'Visitor'">
+					<view v-if="isVip == 'Visitor' && appleTishen =='true'&&item.type!=2 ">
 						<!-- 锁 -->
-						<view  class="brand-icon">{{ item.number }} </view>
+						<view class="brand-icon">{{ item.number }} </view>
+
+						<!-- 节名称 -->
+						<view class="brand-content"> {{ item.jieName }} </view>
+
+					</view>
+
+					<view v-if="isVip == 'Visitor'&& appleTishen =='false'">
+						<!-- 锁 -->
+						<view class="brand-icon">{{ item.number }} </view>
 						<!-- 锁 -->
-						<view  v-if="item.firstFlag !=1" class="brand-lock"></view>
+						<view v-if="item.firstFlag !=1" 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>
 				</view>
 			</view>
@@ -65,7 +76,7 @@
 		onShow
 	} from '@dcloudio/uni-app';
 	const growthType = ref(null);
-
+	const appleTishen = ref(null);
 	const $emit = defineEmits(['clickGradeTerm', 'onLeft', 'onRight', 'handleCheckCatalogue', 'listClick'])
 	const props = defineProps({
 		options: {
@@ -79,10 +90,12 @@
 		},
 	})
 	onShow(() => {
-		growthType.value = cacheManager.get('auth')?cacheManager.get('auth').growthType:props.youkeImage
+		growthType.value = cacheManager.get('auth') ? cacheManager.get('auth').growthType : props.youkeImage
+		appleTishen.value = cacheManager.get('youkeTishen').toString()
+		console.log(appleTishen.value);
 	})
 	const isVip = getUserIdentity();
-	console.log('isVip',isVip);
+	console.log('isVip', isVip);
 	const gradeMapping = {
 		1: '一年级',
 		2: '二年级',
@@ -107,15 +120,15 @@
 		$emit('clickGradeTerm');
 	}
 
-	function listClick(data,index,data2) {
+	function listClick(data, index, data2) {
 		data.daeFlag = true
 		nextTick(() => {
 			animalNum.value = index
 		})
 		setTimeout(() => {
-			$emit('listClick', data,data2,index);
+			$emit('listClick', data, data2, index);
 		}, 300)
-		
+
 	}
 
 	function currentGrowth(data) {
@@ -144,28 +157,46 @@
 	}
 
 	// 获取节class
-	function getClass(data, index, isVip,item) {
-	
+	function getClass(data, index, isVip, item) {
+
 		let brandActive = '';
 		if (isVip === 'VIP') {
 			brandActive = 'brand-active';
-		} else if (item.firstFlag == 1 && isVip =='Not-Vip') {
+		} else if (item.firstFlag == 1 && isVip == 'Not-Vip') {
 			brandActive = 'brand-active';
-		}else if (item.firstFlag == 1 && isVip =='Visitor' &&item.type ==1){
+		} else if (appleTishen.value == 'true' && isVip == 'Visitor') {
+			brandActive = 'brand-active';
+		} else if (item.firstFlag == 1 && isVip == 'Visitor' && item.type == 1) {
 			brandActive = 'brand-active';
 		} else {
 			brandActive = '';
 		}
 		let indexLast = data.jieList.length - 1;
-		// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
-		if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == 'Testing') {
-			return 'ceshi-brand-item' + ' ' + brandActive;
+
+
+		if (appleTishen.value == 'true' && isVip == 'Visitor') {
+			// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
+			if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == 'Testing') {
+				return ''
+			} else {
+				return brandActive;
+			}
 		} else {
-			return brandActive;
+			// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
+			if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == 'Testing') {
+				return 'ceshi-brand-item' + ' ' + brandActive;
+			} else {
+				return brandActive;
+			}
 		}
+
+
 	}
 
 	function handleCheckCatalogue() {
+		if (appleTishen.value == 'true' && isVip == 'Visitor') {
+			return false
+		}
 		$emit('handleCheckCatalogue');
 	}
 

+ 33 - 5
pages/study/product/yingyuNew.vue

@@ -41,7 +41,17 @@
 						</view>
 
 					</view>
-					<view v-if="isVip == 'Visitor'">
+					<view v-if="isVip == 'Visitor' && appleTishen =='true'&&item.type!=2 ">
+						<!-- 锁 -->
+						<!-- 				<view  class="brand-icon">{{ item.number }} </view> -->
+						<!-- 锁 -->
+						<!-- 节名称 -->
+						<view class="brand-content">
+							<view class="content-text">{{ item.jieName }} </view>
+						</view>
+					</view>
+					
+					<view v-if="isVip == 'Visitor'&& appleTishen =='false'">
 						<!-- 锁 -->
 						<!-- 				<view  class="brand-icon">{{ item.number }} </view> -->
 						<!-- 锁 -->
@@ -77,6 +87,7 @@
 		onShow
 	} from '@dcloudio/uni-app';
 	const growthType = ref(null);
+		const appleTishen = ref(null);
 	const growthImg = ref(null);
 	const bookImg = ref(null);
 	const youkeImageBook = ref(null);
@@ -112,6 +123,8 @@
 		bookImg.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').icon : props.youkeImage;
 		youkeImageBook.value = cacheManager.get('auth') ? cacheManager.get('zhangInfo').zhangIcon : props
 			.youkeImageBook;
+			appleTishen.value = cacheManager.get('youkeTishen').toString()
+			console.log(appleTishen.value);
 
 	})
 	const isVip = getUserIdentity();
@@ -178,21 +191,36 @@
 			brandActive = 'brand-active';
 		} else if (item.firstFlag == 1 && isVip == 'Not-Vip') {
 			brandActive = 'brand-active';
+		} else if (appleTishen.value == 'true' && isVip == 'Visitor') {
+			brandActive = 'brand-active';
 		} else if (item.firstFlag == 1 && isVip == 'Visitor' && item.type == 1) {
 			brandActive = 'brand-active';
 		} else {
 			brandActive = '';
 		}
 		let indexLast = data.jieList.length - 1;
-		// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
-		if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == 'Testing') {
-			return 'ceshi-brand-item' + ' ' + brandActive;
+		
+		if (appleTishen.value == 'true' && isVip == 'Visitor') {
+			// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
+			if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == 'Testing') {
+				return ''
+			} else {
+				return brandActive;
+			}
 		} else {
-			return brandActive;
+			// 判断最后一个为名称是否为单元测试,是单元测试则返回ceshi-jie
+			if (index === indexLast && data.jieList[data.jieList.length - 1].jieName == 'Testing') {
+				return 'ceshi-brand-item' + ' ' + brandActive;
+			} else {
+				return brandActive;
+			}
 		}
 	}
 
 	function handleCheckCatalogue() {
+		if (appleTishen.value == 'true' && isVip == 'Visitor') {
+			return false
+		}
 		$emit('handleCheckCatalogue');
 	}