瀏覽代碼

Merge branch '2024鹅状元' of https://gogs.mtavip.com/wangguoyu/uniProject into 2024鹅状元

tanxue 4 月之前
父節點
當前提交
5758cf4237

+ 87 - 0
components/wSwiper/DSwiper.vue

@@ -0,0 +1,87 @@
+<template>
+	<swiper :circular="false" @change="onChangeTab" :duration="currentDuration" :current="current"
+		:style="{'height': swiperHeight + 'px'}">
+		<swiper-item v-for="(cItem,index) in props.list" :key="cItem">
+			<view class="item flex-col flex-center">
+				<slot :item="cItem"></slot>
+			</view>
+		</swiper-item>
+	</swiper>
+</template>
+
+<script setup>
+	import {
+		ref,
+		reactive,
+		watch,
+		onMounted
+	} from 'vue';
+	import {
+		onLoad,
+	} from "@dcloudio/uni-app";
+
+	const props = defineProps({
+		swiperHeight: { // swiper的高度
+			type: Number,
+			default: 0
+		},
+		positionIndex: { // 当前的数据的下标,直接定位到某条数据时使用
+			required: false,
+			type: Number,
+			default: 0
+		},
+		list: { // 数据数组
+			required: true,
+			type: Array,
+			default: []
+		},
+	})
+	const emits = defineEmits(['change'])
+	const current = ref(0)
+	const currentDuration = ref('500')
+	
+	watch(() => props.positionIndex, (val) => positionData(), {
+		immediate: true
+	})
+	watch(() => props.list, (val) => positionData(), {
+		immediate: true
+	})
+
+	
+	function positionData() {
+		if(!props.list){
+			return
+		}
+		
+		if (props.list[current]) {
+			props.list[current].mta_show = true;
+		}
+		if (props.list[current+1]) {
+			props.list[current+1].mta_show = true;
+		}
+		if (props.list[current-1]) {
+			props.list[current-1].mta_show = true;
+		}
+		console.log(props.list);
+	}
+	
+	function changeCurrent(data) {
+		current.value = data
+	}
+	
+	function onChangeTab(e) {
+		current.value = e.detail.current;
+		if (props.list[current+1]) {
+			props.list[current+1].mta_show = true;
+		}
+		if (props.list[current-1]) {
+			props.list[current-1].mta_show = true;
+		}
+		emits('change', current.value)
+	}
+</script>
+
+
+<style>
+
+</style>

+ 2 - 2
pages.json

@@ -129,8 +129,8 @@
 		"navigationBarTitleText": "麦塔软件",
 		"navigationBarTitleText": "麦塔软件",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"navigationBarBackgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8",
 		"backgroundColor": "#F8F8F8",
-		// "animationType": "none",
-		// "animationDuration": "0",
+	//	"animationType": "none",
+		//"animationDuration": "0",
 		//禁止滑动返回
 		//禁止滑动返回
 		"app-plus": {
 		"app-plus": {
 					"popGesture": "none"
 					"popGesture": "none"

+ 17 - 7
pages/login/index.vue

@@ -94,7 +94,7 @@
 	const telClose = () => {
 	const telClose = () => {
 		telDialogFlag.value = false;
 		telDialogFlag.value = false;
 	}
 	}
-	const bindBtn = (res) => {
+	const bindBtn = (res) => {
 		telDialogFlag.value = false;
 		telDialogFlag.value = false;
 		if (res.cardId == 0) {
 		if (res.cardId == 0) {
 			uni.redirectTo({
 			uni.redirectTo({
@@ -156,7 +156,7 @@
 	// 游客登录
 	// 游客登录
 	const ykBtn = () => {
 	const ykBtn = () => {
 		if (indexData.isAgreed === true) {
 		if (indexData.isAgreed === true) {
-			uni.navigateTo({
+			uni.redirectTo({
 				url: `/pages/selectGradesTerms/index`
 				url: `/pages/selectGradesTerms/index`
 			})
 			})
 		} else {
 		} else {
@@ -193,12 +193,13 @@
 				let req = {
 				let req = {
 					"apple": false,
 					"apple": false,
 					"code": code
 					"code": code
-				}
-				wxLogin(req).then(res => {
+				}
+				console.log(req);
+				wxLogin(req).then(res => {
 					console.log(res);
 					console.log(res);
-					if (!res.data.bind) {
+					if (!res.data.bind) {
 						console.log('未绑定');
 						console.log('未绑定');
-						cacheManager.set('wxLogin', { 
+						cacheManager.set('wxLogin', {
 							bind: res.data.bing
 							bind: res.data.bing
 						})
 						})
 						telDialogFlag.value = true;
 						telDialogFlag.value = true;
@@ -206,7 +207,16 @@
 							telDialogRef.value.getOpenId(res.data.openId);
 							telDialogRef.value.getOpenId(res.data.openId);
 						})
 						})
 					} else {
 					} else {
-
+						cacheManager.set('auth', res.data.loginVo)
+						if (res.data.loginVo.cardId == 0) {
+							uni.redirectTo({
+								url: `/pages/selectGradesTerms/index`
+							})
+						} else {
+							uni.redirectTo({
+								url: `/pages/study/index`
+							})
+						}
 					}
 					}
 				}).catch((error) => {
 				}).catch((error) => {
 					console.log(error);
 					console.log(error);

+ 2 - 2
pages/pay/order.vue

@@ -53,7 +53,7 @@
 				</view>
 				</view>
 				<view v-if="dingdanData.current === 1">
 				<view v-if="dingdanData.current === 1">
 					<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
 					<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
-						:refresher-triggered="dingdanData.daiFukuan.loading" :refresher-threshold="50"
+						:refresher-triggered="dingdanData.daiFukuan.loading" :refresher-threshold="50" class="order-scroll-view"
 						refresher-background="transparent" @refresherrefresh="onRefresh">
 						refresher-background="transparent" @refresherrefresh="onRefresh">
 							<uni-list>
 							<uni-list>
 								<uni-list-item v-for="item in dingdanData.daiFukuan.list" class="order-list-item">
 								<uni-list-item v-for="item in dingdanData.daiFukuan.list" class="order-list-item">
@@ -94,7 +94,7 @@
 				</view>
 				</view>
 				<view v-if="dingdanData.current === 2">
 				<view v-if="dingdanData.current === 2">
 					<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
 					<scroll-view style="height: 300px;" scroll-y="true" refresher-enabled="true"
-						:refresher-triggered="dingdanData.yiFukuan.loading" :refresher-threshold="50"
+						:refresher-triggered="dingdanData.yiFukuan.loading" :refresher-threshold="50" class="order-scroll-view"
 						refresher-background="transparent" @refresherrefresh="onRefresh">
 						refresher-background="transparent" @refresherrefresh="onRefresh">
 							<uni-list>
 							<uni-list>
 								<uni-list-item v-for="item in dingdanData.yiFukuan.list" class="order-list-item">
 								<uni-list-item v-for="item in dingdanData.yiFukuan.list" class="order-list-item">

+ 87 - 98
pages/study/index.vue

@@ -1,13 +1,21 @@
 <template>
 <template>
-	<shuxueZhangjie v-if="currentProduct ==1" @clickGradeTerm="clickGradeTerm" @onLeft="onLeft" @onRight="onRight"
-		@handleCheckCatalogue="handleCheckCatalogue" @listClick="listClick" :options="infoData">
-	</shuxueZhangjie>
-	<yingyuZhangjie v-if="currentProduct ==2" @clickGradeTerm="clickGradeTerm" @onLeft="onLeft" @onRight="onRight"
-		@handleCheckCatalogue="handleCheckCatalogue" @listClick="listClick" :options="infoData">
-	</yingyuZhangjie>
+	<swiper :circular="false" style="height: 100vh;" @change="onChangeTab" :duration="currentDuration"
+		:current="current">
+		<swiper-item v-for="(item,index) in zhangList" :key="index">
+			<view class="item flex-col flex-center">
+				<shuxueZhangjie v-if="currentProduct ==1" @clickGradeTerm="clickGradeTerm"
+					@handleCheckCatalogue="handleCheckCatalogue" @listClick="listClick" :gradeTerm='gradeTerm'
+					:options="item">
+				</shuxueZhangjie>
+				<yingyuZhangjie v-if="currentProduct ==2" @clickGradeTerm="clickGradeTerm"
+					@handleCheckCatalogue="handleCheckCatalogue" @listClick="listClick" :options="item">
+				</yingyuZhangjie>
+			</view>
+		</swiper-item>
+	</swiper>
 	<!-- 蛋 -->
 	<!-- 蛋 -->
 	<egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
 	<egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
-	<catalogue ref="catalogueRef" @change-zhang="handleChangeZhang"></catalogue>
+	<catalogue ref="catalogueRef" :list=zhangList @change-zhang="handleChangeZhang"></catalogue>
 	<CustomTabBar :cardId="cardId" :nianji="nianji" :zhangId="zhangId"></CustomTabBar>
 	<CustomTabBar :cardId="cardId" :nianji="nianji" :zhangId="zhangId"></CustomTabBar>
 	<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
 	<tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
 	<tip-middle-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :content="YouKeContent"></tip-middle-dialog>
 	<tip-middle-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :content="YouKeContent"></tip-middle-dialog>
@@ -34,6 +42,7 @@
 	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
 	import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
 	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
 	import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
 	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
 	import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
+	import dSwiper from '@/components/wSwiper/DSwiper.vue';
 
 
 	import shuxueZhangjie from './product/shuxue.vue';
 	import shuxueZhangjie from './product/shuxue.vue';
 	import yingyuZhangjie from './product/yingyu.vue';
 	import yingyuZhangjie from './product/yingyu.vue';
@@ -50,7 +59,10 @@
 	const tipContent = '付费章节,是否前往开通付费?'; //当前产品
 	const tipContent = '付费章节,是否前往开通付费?'; //当前产品
 	const goPayDialogRef = ref(null);
 	const goPayDialogRef = ref(null);
 	const youkeDialogRef = ref(null);
 	const youkeDialogRef = ref(null);
+	const dSwiperRef = ref(null);
 	const eggDialogRef = ref(null);
 	const eggDialogRef = ref(null);
+	const current = ref(0);
+	const currentDuration = ref(500)
 	const YouKeContent = '您当前是游客身份,登录后才能浏览内容,现在去登录?';
 	const YouKeContent = '您当前是游客身份,登录后才能浏览内容,现在去登录?';
 	const zhangId = ref(null); //游客使用
 	const zhangId = ref(null); //游客使用
 	const nianji = ref(null); //游客使用
 	const nianji = ref(null); //游客使用
@@ -58,6 +70,8 @@
 	const catalogueRef = ref(null);
 	const catalogueRef = ref(null);
 	const currentProduct = ref(null);
 	const currentProduct = ref(null);
 	const selectZhang = ref(null);
 	const selectZhang = ref(null);
+	const zhangList = ref(null);
+	const gradeTerm = ref(null);
 	let infoData = reactive({
 	let infoData = reactive({
 		jieList: [],
 		jieList: [],
 		haveFlag: '',
 		haveFlag: '',
@@ -68,27 +82,48 @@
 		zhangName: '',
 		zhangName: '',
 		numberStr: '',
 		numberStr: '',
 	});
 	});
+	const gradeMapping = {
+		1: '一年级',
+		2: '二年级',
+		3: '三年级',
+		4: '四年级',
+		5: '五年级',
+		6: '六年级'
+	};
+
+	const termMapping = {
+		1: ' 数学',
+		2: ' 英语'
+	};
 	onLoad((options) => {
 	onLoad((options) => {
 		init(options)
 		init(options)
 	})
 	})
 
 
+	function onChangeTab(e) {
+		console.log(e.detail.current);
+		infoData.zhangId = cacheManager.get('zhangInfo').zhangList[e.detail.current].zhangId
+		cacheManager.updateObject('auth', {
+			currentZhang: e.detail.current,
+			zhangId: infoData.zhangId
+		})
+
+		//current.value = e.detail.current;
+	}
+
 	function init(options) {
 	function init(options) {
 		if (cacheManager.get('auth')) {
 		if (cacheManager.get('auth')) {
-			currentProduct.value = cacheManager.get('auth').cardId;
 			//会员 取auth
 			//会员 取auth
 			selectZhang.value = cacheManager.get('auth');
 			selectZhang.value = cacheManager.get('auth');
+			currentProduct.value = cacheManager.get('auth').cardId;
+			//let currentObject = this.cacheZhangInfo.jieList.find(item => item.jieId == this.jieId);
 			console.log(selectZhang.value);
 			console.log(selectZhang.value);
 			// 已登录
 			// 已登录
-			// 选择年级进入调用此接口
-			//options.flag == 'selectGrades'
-			if (!selectZhang.value.firstLogin) {
+			if (selectZhang.value.firstLogin) {
 				nextTick(() => {
 				nextTick(() => {
 					eggDialogRef.value.eggShow();
 					eggDialogRef.value.eggShow();
 				})
 				})
 			}
 			}
 			getZhangInfo()
 			getZhangInfo()
-			// 蛋
-			// eggDialogRef.value.eggShow();
 		} else {
 		} else {
 			zhangId.value = options.zhangId
 			zhangId.value = options.zhangId
 			nianji.value = options.nianji
 			nianji.value = options.nianji
@@ -107,22 +142,25 @@
 		}
 		}
 		userZhangInfo(req).then(res => {
 		userZhangInfo(req).then(res => {
 			cacheManager.set('zhangInfo', res.data)
 			cacheManager.set('zhangInfo', res.data)
-			infoData.jieList = res.data.jieList
-			infoData.haveFlag = res.data.haveFlag
-			infoData.nianji = res.data.nianji
-			infoData.number = res.data.number
-			infoData.numberStr = res.data.numberStr
-			infoData.cardId = res.data.cardId
-			infoData.zhangId = res.data.zhangId
-			infoData.zhangName = res.data.zhangName
-			recordZhangJie()
-			getNewData()
-			// if (cacheManager.get('zhangInfo')) {
-			//     cacheManager.remove('zhangInfo')
-			//     cacheManager.set('zhangInfo', res.data)
-			// } else {
-			//     cacheManager.set('zhangInfo', res.data)
-			// }
+			let zhang = cacheManager.get('zhangInfo').zhangList.findIndex(zhang => zhang.zhangId == selectZhang
+				.value.zhangId);
+			if (zhang != -1) {
+				cacheManager.updateObject('auth', {
+					currentZhang: zhang
+				})
+			} else {
+				cacheManager.updateObject('auth', {
+					currentZhang: 0
+				})
+			}
+			nextTick(() => {
+				translateData(res.data)
+				zhangList.value = res.data.zhangList
+				current.value = cacheManager.get('auth').currentZhang
+				infoData.zhangId = res.data.zhangList[current.value].zhangId
+				recordZhangJie()
+			})
+
 		})
 		})
 	}
 	}
 
 
@@ -146,71 +184,6 @@
 		})
 		})
 	}
 	}
 
 
-
-
-	function onLeft(event) {
-		const authCode = getUserIdentity();
-		if (authCode !== 'VIP') {
-			return false
-		}
-		console.log('用户左滑了');
-		let req = {
-			nianji: selectZhang.value.nianji,
-			zhangId: selectZhang.value.zhangId,
-			cardId: selectZhang.value.cardId,
-		}
-		userZhangForntInfo(req).then(res => {
-			cacheManager.set('zhangInfo', res.data)
-			infoData.jieList = res.data.jieList
-			infoData.haveFlag = res.data.haveFlag
-			infoData.nianji = res.data.nianji
-			infoData.number = res.data.number
-			infoData.numberStr = res.data.numberStr
-			infoData.cardId = res.data.cardId
-			infoData.zhangId = res.data.zhangId
-			infoData.zhangName = res.data.zhangName
-			recordZhangJie()
-			getNewData()
-		})
-	}
-
-	function onRight(event) {
-		console.log('');
-		const authCode = getUserIdentity();
-		if (authCode !== 'VIP') {
-			return false
-		}
-		console.log('用户又滑了');
-		let req = {
-			nianji: selectZhang.value.nianji,
-			zhangId: selectZhang.value.zhangId,
-			cardId: selectZhang.value.cardId,
-		}
-		userZhangNextInfo(req).then(res => {
-			cacheManager.set('zhangInfo', res.data)
-			nextTick(() => {
-				// uni.redirectTo({
-				// 	url: `/pages/study/index`
-				// })
-				uni.navigateTo({
-				  url:  `/pages/study/index`
-				});
-			})
-
-			// cacheManager.set('zhangInfo', res.data)
-			// infoData.jieList = res.data.jieList
-			// infoData.haveFlag = res.data.haveFlag
-			// infoData.nianji = res.data.nianji
-			// infoData.number = res.data.number
-			// infoData.numberStr = res.data.numberStr
-			// infoData.cardId = res.data.cardId
-			// infoData.zhangId = res.data.zhangId
-			// infoData.zhangName = res.data.zhangName
-			// recordZhangJie()
-			// getNewData()
-		})
-	}
-
 	function getNewData() {
 	function getNewData() {
 		selectZhang.value.zhangId = cacheManager.get('zhangInfo').zhangId;
 		selectZhang.value.zhangId = cacheManager.get('zhangInfo').zhangId;
 		selectZhang.value.cardId = cacheManager.get('zhangInfo').cardId;
 		selectZhang.value.cardId = cacheManager.get('zhangInfo').cardId;
@@ -241,6 +214,7 @@
 	}
 	}
 
 
 	function handleChangeZhang(data) {
 	function handleChangeZhang(data) {
+		console.log(data);
 		selectZhang.value = data;
 		selectZhang.value = data;
 		const authCode = getUserIdentity();
 		const authCode = getUserIdentity();
 		if (authCode !== 'Visitor') {
 		if (authCode !== 'Visitor') {
@@ -248,7 +222,14 @@
 				zhangId: data.zhangId
 				zhangId: data.zhangId
 			})
 			})
 		}
 		}
-		init()
+		currentDuration.value = 0
+		setTimeout(() => {
+			current.value = data.number - 1
+			nextTick(() => {
+				currentDuration.value = 500
+			})
+		}, 100)
+		//	init()
 	}
 	}
 
 
 	function goKaoshi(data) {
 	function goKaoshi(data) {
@@ -270,14 +251,19 @@
 			return;
 			return;
 		} else {
 		} else {
 			uni.redirectTo({
 			uni.redirectTo({
-				url: '/pages/study/lookShipin?jieId=' + data.jieId
+				url: '/pages/study/lookShipin?jieId=' + data.jieId + '&zhangId=' + infoData.zhangId
 			})
 			})
 		}
 		}
 
 
 
 
 	}
 	}
 
 
-	function listClick(data, index) {
+	function translateData(data) {
+		gradeTerm.value = gradeMapping[data.nianji] + termMapping[data.cardId]
+	}
+
+	function listClick(data) {
+		console.log('data', data);
 		if (!cacheManager.get('auth') && data.firstFlag != 1) {
 		if (!cacheManager.get('auth') && data.firstFlag != 1) {
 			youkeDialogRef.value.handleShow();
 			youkeDialogRef.value.handleShow();
 			return;
 			return;
@@ -300,6 +286,9 @@
 	}
 	}
 
 
 	function clickGradeTerm() {
 	function clickGradeTerm() {
+		cacheManager.updateObject('auth', {
+			currentZhang: 0
+		})
 		uni.navigateTo({
 		uni.navigateTo({
 			url: `/pages/selectGradesTerms/index`,
 			url: `/pages/selectGradesTerms/index`,
 		})
 		})
@@ -314,7 +303,7 @@
 	function eggBtn() {
 	function eggBtn() {
 		console.log('点击:开启提分之旅');
 		console.log('点击:开启提分之旅');
 		cacheManager.updateObject('auth', {
 		cacheManager.updateObject('auth', {
-			firstLogin: true
+			firstLogin: false
 		})
 		})
 	}
 	}
 </script>
 </script>

+ 27 - 23
pages/study/lookShipin.vue

@@ -79,12 +79,12 @@
 				YouKeContent: '您当前是游客身份,登录后才能浏览内容,现在去登录?'
 				YouKeContent: '您当前是游客身份,登录后才能浏览内容,现在去登录?'
 			}
 			}
 		},
 		},
-		components:{
+		components: {
 			tipMiddleDialog
 			tipMiddleDialog
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
 			if (!cacheManager.get('auth')) {
 			if (!cacheManager.get('auth')) {
-			const youkeData = 	JSON.parse(	options.youkePageData)	
+				const youkeData = JSON.parse(options.youkePageData)
 				// 游客
 				// 游客
 				this.videoId = youkeData.jieList[0].videoId
 				this.videoId = youkeData.jieList[0].videoId
 				this.nianji = youkeData.nianji
 				this.nianji = youkeData.nianji
@@ -109,14 +109,18 @@
 
 
 			init(options) {
 			init(options) {
 				this.jieId = options.jieId
 				this.jieId = options.jieId
+				this.zhangId = options.zhangId
 				if (!(cacheManager.get('zhangInfo') && options.jieId)) {
 				if (!(cacheManager.get('zhangInfo') && options.jieId)) {
 					toast('数据错误,缓存丢失/ jieId丢失')
 					toast('数据错误,缓存丢失/ jieId丢失')
 					return false
 					return false
 				}
 				}
 				this.cacheZhangInfo = cacheManager.get('zhangInfo')
 				this.cacheZhangInfo = cacheManager.get('zhangInfo')
-
-				let currentObject = this.cacheZhangInfo.jieList.find(item => item.jieId == options.jieId);
-				
+				let zhang = this.cacheZhangInfo.zhangList.find(zhang => zhang.zhangId == this.zhangId);
+				if (!zhang) {
+					return
+					//console.log('currentObject',currentObject);
+				}
+				let currentObject = zhang.jieList.find(item => item.jieId == options.jieId);
 				console.log(currentObject);
 				console.log(currentObject);
 				this.shipinTitle = currentObject.jieName
 				this.shipinTitle = currentObject.jieName
 
 
@@ -127,7 +131,7 @@
 				this.videoId = this.pageData.videoId
 				this.videoId = this.pageData.videoId
 				this.jieName = this.pageData.jieName
 				this.jieName = this.pageData.jieName
 				this.credit = this.pageData.credit
 				this.credit = this.pageData.credit
-				this.progressMarkers = this.pageData.jiedianList
+				this.progressMarkers = this.pageData.jiedianList||[]
 				this.getLive(); //获取播放凭证
 				this.getLive(); //获取播放凭证
 			},
 			},
 			goNextZhang() {
 			goNextZhang() {
@@ -159,20 +163,20 @@
 			playEnd(data) {
 			playEnd(data) {
 				const AuthCode = getUserIdentity();
 				const AuthCode = getUserIdentity();
 				console.log(AuthCode);
 				console.log(AuthCode);
-				if(AuthCode =='Visitor'){
-					return  false
-				}else {
+				if (AuthCode == 'Visitor') {
+					return false
+				} else {
 					this.$refs.popupRef.open();
 					this.$refs.popupRef.open();
 					let req = {
 					let req = {
-						credit:this.credit,
-						jieId:this.jieId,
-						
+						credit: this.credit,
+						jieId: this.jieId,
+
 					}
 					}
-					videoWancheng(req).then(res=>{
-						
+					videoWancheng(req).then(res => {
+
 					})
 					})
 				}
 				}
-				
+
 			},
 			},
 			goBack() {
 			goBack() {
 				this.$refs.popupRef.close();
 				this.$refs.popupRef.close();
@@ -186,13 +190,13 @@
 				} else {
 				} else {
 					const AuthCode = getUserIdentity();
 					const AuthCode = getUserIdentity();
 					console.log(AuthCode);
 					console.log(AuthCode);
-					if(AuthCode =='Not-Vip'){
+					if (AuthCode == 'Not-Vip') {
 						toast("请前往付费!")
 						toast("请前往付费!")
-						return  false
+						return false
 					}
 					}
-				//	debugger
+					//	debugger
 					Number(this.jieId++)
 					Number(this.jieId++)
-					
+
 					let currentObject = this.cacheZhangInfo.jieList.find(item => item.jieId == this.jieId);
 					let currentObject = this.cacheZhangInfo.jieList.find(item => item.jieId == this.jieId);
 					this.pageData = {
 					this.pageData = {
 						...currentObject
 						...currentObject
@@ -271,7 +275,7 @@
 		mounted() {
 		mounted() {
 			console.log("renderScript1")
 			console.log("renderScript1")
 			// 在适合的生命周期,通过script和link标签引入播放器sdk、css
 			// 在适合的生命周期,通过script和link标签引入播放器sdk、css
-		//	this.loadWebPlayerSDK()
+			//	this.loadWebPlayerSDK()
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
@@ -297,7 +301,7 @@
 					this.playAuth = ''
 					this.playAuth = ''
 					this.playAuth = newValue
 					this.playAuth = newValue
 					this.loadWebPlayerSDK()
 					this.loadWebPlayerSDK()
-				
+
 				}
 				}
 			},
 			},
 			videoIdFun(newValue, oldValue, ownerInstance, instance) {
 			videoIdFun(newValue, oldValue, ownerInstance, instance) {
@@ -357,7 +361,7 @@
 				// console.log(this.videoId);
 				// console.log(this.videoId);
 				// console.log(this.playAuth);
 				// console.log(this.playAuth);
 				//配置播放器
 				//配置播放器
-				if(!this.playAuth){
+				if (!this.playAuth) {
 					return false;
 					return false;
 				}
 				}
 				var player = new Aliplayer({
 				var player = new Aliplayer({
@@ -439,7 +443,7 @@
 					s_tag.src = 'https://g.alicdn.com/de/prismplayer/2.9.6/aliplayer-min.js';
 					s_tag.src = 'https://g.alicdn.com/de/prismplayer/2.9.6/aliplayer-min.js';
 					s_tag.charset = 'utf-8';
 					s_tag.charset = 'utf-8';
 					s_tag.onload = () => {
 					s_tag.onload = () => {
-					//	console.log(this.playAuth);
+						//	console.log(this.playAuth);
 						this.playAli()
 						this.playAli()
 						resolve();
 						resolve();
 					}
 					}

+ 22 - 9
pages/study/product/shuxue.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="ezy-study-page ezy-shuxue-study-page">
 	<view class="ezy-study-page ezy-shuxue-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">
 			<view class="chapter-box" @click="handleCheckCatalogue">{{options.numberStr}}</view>
 			<view class="chapter-box" @click="handleCheckCatalogue">{{options.numberStr}}</view>
 			<view @click="handleCheckCatalogue" :class="getTitleClass(options.zhangName)">{{getZhangName(options.zhangName)}}</view>
 			<view @click="handleCheckCatalogue" :class="getTitleClass(options.zhangName)">{{getZhangName(options.zhangName)}}</view>
 			<view>
 			<view>
@@ -61,6 +61,9 @@
 	const props = defineProps({
 	const props = defineProps({
 		options: {
 		options: {
 			type: Object,
 			type: Object,
+		},	
+		gradeTerm: {
+			type: String,
 		},
 		},
 	})
 	})
 	const isVip = getUserIdentity();
 	const isVip = getUserIdentity();
@@ -101,7 +104,7 @@
 	
 	
 	// 章换行显示
 	// 章换行显示
 	function getZhangContent(data){
 	function getZhangContent(data){
-		console.log(data.length,'data.length');
+
 		let length = data.length;
 		let length = data.length;
 		// 初始将字符串平分成两半
 		// 初始将字符串平分成两半
 		let halfLength = Math.floor(length / 2); 
 		let halfLength = Math.floor(length / 2); 
@@ -115,7 +118,7 @@
 	
 	
 	// 章class
 	// 章class
 	function getTitleClass(data){
 	function getTitleClass(data){
-		console.log(data.length,'getTitleClass');
+	
 		if(data.length <=5){
 		if(data.length <=5){
 			return 'chapter-title-box chapter-small-title-box'
 			return 'chapter-title-box chapter-small-title-box'
 		}else if(data.length <=9){
 		}else if(data.length <=9){
@@ -153,9 +156,7 @@
 		}
 		}
 	}
 	}
 	
 	
-	function translateData(data) {
-		return gradeMapping[data.nianji] + termMapping[data.cardId]
-	}
+	
 
 
 	function handleCheckCatalogue() {
 	function handleCheckCatalogue() {
 		$emit('handleCheckCatalogue');
 		$emit('handleCheckCatalogue');
@@ -183,7 +184,9 @@
 
 
 	function onSwipeRight(event) {
 	function onSwipeRight(event) {
 		console.log('22222');
 		console.log('22222');
+		console.log(cacheManager.get('auth'));
 		if (cacheManager.get('auth')) {
 		if (cacheManager.get('auth')) {
+			console.log('啊啊啊啊啊');
 			$emit('onRight');
 			$emit('onRight');
 		}
 		}
 
 
@@ -192,9 +195,9 @@
 	function onTouchEnd(event) {
 	function onTouchEnd(event) {
 		if (isSliding.value) {
 		if (isSliding.value) {
 			const distanceX = event.changedTouches[0].clientX - startX.value
 			const distanceX = event.changedTouches[0].clientX - startX.value
-			if (distanceX > 0) {
+			if (distanceX > 200) {
 				onSwipeLeft();
 				onSwipeLeft();
-			} else if (distanceX < 0) {
+			} else if (distanceX < -200) {
 				onSwipeRight();
 				onSwipeRight();
 			}
 			}
 			isSliding.value = false
 			isSliding.value = false
@@ -217,12 +220,22 @@
 	//	console.log('New options:', newVal);
 	//	console.log('New options:', newVal);
 	//	console.log('Old options:', oldVal);
 	//	console.log('Old options:', oldVal);
 		// 在这里可以根据新的 options 做一些操作,比如发起请求等
 		// 在这里可以根据新的 options 做一些操作,比如发起请求等
-		gradeTerm.value = translateData(newVal);
+	
 		dataRecom(newVal)
 		dataRecom(newVal)
 	}, {
 	}, {
 		deep: true,
 		deep: true,
 		immediate: true
 		immediate: true
 	});
 	});
+	watch(() => props.gradeTerm, (newVal, oldVal) => {
+	//	console.log('New options:', newVal);
+	//	console.log('Old options:', oldVal);
+		// 在这里可以根据新的 options 做一些操作,比如发起请求等
+		gradeTerm.value = newVal
+	
+	}, {
+		deep: true,
+		immediate: true
+	});
 </script>
 </script>
 
 
 <style>
 <style>

+ 6 - 6
unpackage/dist/cache/.vite/deps/_metadata.json

@@ -1,19 +1,19 @@
 {
 {
-  "hash": "84373a44",
-  "configHash": "988bddf2",
-  "lockfileHash": "7eed52a7",
-  "browserHash": "37170371",
+  "hash": "2a404f3e",
+  "configHash": "088a760f",
+  "lockfileHash": "e3b0c442",
+  "browserHash": "02dde0a8",
   "optimized": {
   "optimized": {
     "uview-plus": {
     "uview-plus": {
       "src": "../../../../../node_modules/uview-plus/index.js",
       "src": "../../../../../node_modules/uview-plus/index.js",
       "file": "uview-plus.js",
       "file": "uview-plus.js",
-      "fileHash": "91c97fcb",
+      "fileHash": "5d9e2b17",
       "needsInterop": false
       "needsInterop": false
     },
     },
     "ts-md5/dist/md5": {
     "ts-md5/dist/md5": {
       "src": "../../../../../node_modules/ts-md5/dist/md5.js",
       "src": "../../../../../node_modules/ts-md5/dist/md5.js",
       "file": "ts-md5_dist_md5.js",
       "file": "ts-md5_dist_md5.js",
-      "fileHash": "13268c9b",
+      "fileHash": "cec44cf6",
       "needsInterop": true
       "needsInterop": true
     }
     }
   },
   },