wangguoyu 1 viikko sitten
vanhempi
commit
ef2f36b099
2 muutettua tiedostoa jossa 32 lisäystä ja 27 poistoa
  1. 26 24
      pages/study/index.vue
  2. 6 3
      pages/study/product/yingyuNew.vue

+ 26 - 24
pages/study/index.vue

@@ -21,7 +21,7 @@
 				<!-- 	新的英语(人教版等等) -->
 				<yingyuNewZhangjie v-if="currentProduct ==2&&typeId==1" @clickGradeTerm="clickGradeTerm"
 					@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
-					:options="item" :youkeImage="youkeImage" :youkeImageBook="youkeImageBook">
+					:options="item" :zhangName="zhangName" :youkeImage="youkeImage" :youkeImageBook="youkeImageBook">
 				</yingyuNewZhangjie>
 			</swiper-item>
 		</swiper>
@@ -101,6 +101,7 @@
 	const levelId = ref(null); //游客使用
 	const subjectId = ref(null); //游客使用
 	const youkeZhangId = ref(null); //游客使用
+	const zhangName = ref(null);
 	const typeId = ref(null);
 	const zhangList = ref(null);
 	const gradeTerm = ref(null);
@@ -286,6 +287,7 @@
 		if (currentProduct.value == 2 && typeId.value == 1) {
 			translateData(cacheManager.get('zhangInfo'))
 			zhangList.value = cacheManager.get('zhangInfo').zhangList[0].zList
+			zhangName.value = cacheManager.get('zhangInfo').zhangList[0].zhangName
 			current.value = cacheManager.get('auth').currentZhang
 			infoData.zhangId = cacheManager.get('zhangInfo').zhangList[0].zhangId
 			recordZhangJie()
@@ -306,7 +308,7 @@
 		levelId.value = options.levelId
 		tipFlag.value = options.tipFlag;
 		currentProduct.value = options.subjectId
-		youkeZhangId.value = options.zhangId
+		youkeZhangId.value = options.youkeZhangId
 		if (subjectId.value == 2 && typeId.value == 1) {
 			// 新英语
 			getCommonZhangNewYingyu(options)
@@ -346,6 +348,7 @@
 			nextTick(() => {
 				translateData(res.data)
 				zhangList.value = res.data.zhangList[0].zList
+				zhangName.value = res.data.zhangList[0].zhangName
 				current.value = cacheManager.get('auth').currentZhang
 				infoData.zhangId = res.data.zhangList[0].zhangId
 				recordZhangJie()
@@ -401,16 +404,16 @@
 	}
 
 	function getCommonZhangNewYingyu(data) {
-
 		let req = {
 			levelId: data.levelId,
-			zhangId: data.zhangId
+			zhangId: data.youkeZhangId
 		}
 		getCommonZhangInfo(req).then(res => {
 			translateData(res.data)
 			youkeImage.value = res.data.icon
 			youkeImageBook.value = res.data.zhangIcon
-			zhangList.value = res.data.zhangList[0].zList
+			zhangList.value = res.data.zhangList[0].zList
+			zhangName.value = res.data.zhangList[0].zhangName
 			current.value = 0
 		}).catch((err) => {
 			toast('数据异常,请重新登录!')
@@ -572,28 +575,27 @@
 
 	function listClick(data, data2, index) {
 		//console.log('data', data); // 节内容
-	//	console.log('data2', data2); //章内容
-		chooseMethodListClick(data,data2,index)
+		//	console.log('data2', data2); //章内容
+		chooseMethodListClick(data, data2, index)
 
 	}
 
-	function chooseMethodListClick(data,data2,index) {
-
-	console.log('data', data); // 节内容
-		console.log('data2', data2); //章内容
-		 const authCode = getUserIdentity();
-		if (currentProduct.value == 2 && typeId.value == 1) {
-			const	isFirst  =  data.jieName ==data2.jieList[0].jieName
-			 if(!cacheManager.get('auth') &&!isFirst){
-				youkeDialogRef.value.handleShow();
-				return false;
-			 }
-			 console.log('authCode', authCode);
-			 if (!(authCode == 'VIP' || isFirst)) {
-			 	goPayDialogRef.value.handleShow();
-			 	return false
-			 }
-			 debugger
+	function chooseMethodListClick(data, data2, index) {
+
+		console.log('data', data); // 节内容
+		console.log('data2', data2); //章内容
+		const authCode = getUserIdentity();
+		if (currentProduct.value == 2 && typeId.value == 1) {
+			const isFirst = data.jieName == data2.jieList[0].jieName
+			if (!cacheManager.get('auth') && !isFirst) {
+				youkeDialogRef.value.handleShow();
+				return false;
+			}
+			console.log('authCode', authCode);
+			if (!(authCode == 'VIP' || isFirst)) {
+				goPayDialogRef.value.handleShow();
+				return false
+			}
 			goDanciList(data, index)
 		} else {
 			if (!cacheManager.get('auth') && data.firstFlag != 1) {

+ 6 - 3
pages/study/product/yingyuNew.vue

@@ -4,7 +4,7 @@
 		<view class="ezy-study-wrap" @touchstart="onTouchStart" @touchend="onTouchEnd">
 			<img class="study-name-img" :src="growthImg"/>
 			<view></view>
-			<view @click="handleCheckCatalogue" class="chapter-title-box">{{options.zhangName}}</view>
+			<view @click="handleCheckCatalogue" class="chapter-title-box">{{zhangName}}</view>
 			<!-- 动物类型 -->
 			<view v-if="growthType!=null" :class="currentGrowth()"></view>
 			<view>
@@ -25,7 +25,7 @@
 					<view v-if="isVip == 'Not-Vip'">
 						<!-- 序号 -->
 			<!-- 			<view  class="brand-icon">{{ item.number }}</view> -->
-						<view v-if="item.firstFlag !=1" class="brand-lock"></view>
+						<view v-if="item.number !=1" class="brand-lock"></view>
 						<!-- 箭头 -->
 						<view v-if="item.daeFlag  &&  animalNum == index && isVip != 'Visitor'" class="brand-arrow"></view>
 						<!-- 节名称 -->
@@ -36,7 +36,7 @@
 						<!-- 锁 -->
 		<!-- 				<view  class="brand-icon">{{ item.number }} </view> -->
 						<!-- 锁 -->
-						<view  v-if="item.firstFlag !=1" class="brand-lock"></view>
+						<view  v-if="item.number !=1" class="brand-lock"></view>
 						<!-- 箭头 -->
 						<view v-if="item.daeFlag  &&  animalNum == index && isVip != 'Visitor'" class="brand-arrow"></view>
 						<!-- 节名称 -->
@@ -82,6 +82,9 @@
 		},
 		gradeTerm: {
 			type: String,
+		},	
+		zhangName: {
+			type: String,
 		},
 	})
 	onShow(() => {