Browse Source

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

tanxue 1 month ago
parent
commit
7790e1f05d

+ 1 - 4
pages/chanpinXuanze/index.vue

@@ -2,14 +2,13 @@
 	<view class="ezy-xuanke-page">
 		<!-- 返回区域 -->
 		<view class="icon-title-navBar-box">
-			<!-- <view @click="handleBack" class="nav-bar-icon"></view> -->
 			<text class="nav-bar-title">选课</text>
 		</view>
 		<view class="ezy-page-body">
 			<!-- 头部区域 -->
 			<view class="xuanke-tab-box">
 				<view v-for="item in data.list" :key="item.value" class="tab-item"
-				:class="{active: item.value == data.chanpinActiveSelect}" @click="handleSelectChanpin">{{item.name}}</view>
+				:class="{active: item.value == data.chanpinActiveSelect}" @click="handleSelectChanpin(item)">{{item.name}}</view>
 			</view>
 			<!-- 英语列表 -->
 			<view v-if="data.chanpinActiveSelect == 1"> </view>
@@ -51,8 +50,6 @@
 		shuxueList: [],
 	})
 	
-	function handleBack() {}
-	
 	function getShuxueList() {
 		shuxueHttp.getShuxueChanpinList().then(res => {
 			data.shuxueList = res.data;

+ 7 - 6
pages/chanpinneirong/index.vue

@@ -19,7 +19,7 @@
 					<view class="xx-progress-btn-box">
 						<view class="xx-progress-box">
 							<view>当前学习进度</view>
-							<progress :percent="20" class="xx-progress" stroke-width="10" backgroundColor="#3c7dfd"
+							<progress :percent="curProcess" class="xx-progress" stroke-width="10" backgroundColor="#3c7dfd"
 								activeColor="#ffd11c" />
 						</view>
 						<view class="jxxx-btn" @click="handlePlay(danyuanInfo,'jixu')"></view>
@@ -87,6 +87,7 @@
 				nextDanyuanId: '',
 				dengjiId: '',
 				customType: '',
+				curProcess: '',
 				cacheManagerLocal: null
 
 
@@ -126,6 +127,7 @@
 				this.cacheManagerLocal = cacheManager.get('xuexi-' + this.chanpinId)
 				// 使用缓存
 				this.danyuanInfo = this.cacheManagerLocal
+				this.curProcess = this.cacheManagerLocal.curProcess
 				this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
 				this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
 				this.dagangList = this.cacheManagerLocal.dagangList || []
@@ -135,6 +137,8 @@
 		methods: {
 			handleSelectDanyuan(item) {
 				console.log('切换单元', item)
+				this.danyuanId =item.danyuanId
+				this.loadDataFromApi()
 			},
 			handleClickMulu() {
 				this.$refs.dyMlRef.showPopup(this.banbenId)
@@ -151,6 +155,7 @@
 				}
 				shuxueChanpinDanyuanInfo(req).then(res => {
 					this.danyuanInfo = res.data
+					this.curProcess = res.data.curProcess
 					this.fontDanyuanId = res.data.fontDanyuanId
 					this.nextDanyuanId = res.data.nextDanyuanId
 					this.dagangList = res.data.dagangList || []
@@ -160,11 +165,7 @@
 						banbenId: this.banbenId,
 						danyuanId: this.danyuanId,
 						dengjiId: this.dengjiId
-					})
-					// 初始化当前单元
-					// if (this.danyuanList.length > 0) {
-					// 	this.currentUnitName = this.danyuanList[0].danyuanName
-					// }
+					})	
 				})
 			},
 

+ 1 - 1
pages/xinshuxue/components/danyuanMulu.vue

@@ -10,7 +10,7 @@
 				</view>
 				<!-- 目录 -->
 				<view class="xuexi-dyml-body">
-					<view class="dyml-item-box" v-for="item in list" @click="handleSelect" :key="item.danyuanId">
+					<view class="dyml-item-box" v-for="item in list" @click="handleSelect(item)" :key="item.danyuanId">
 						<text class="dy-num">{{item.danyuanName}}</text>
 						<text class="dy-title">{{item.intro}}</text>
 						<icon></icon>

+ 0 - 6
pages/xinshuxue/components/videoPlay.vue

@@ -66,12 +66,6 @@
 			}
 		},
 		methods: {
-		   // 通用的方法调用器
-			handleRenderMethod(methodName, params) {
-			  if (this[methodName] && typeof this[methodName] === 'function') {
-				return this[methodName](params)
-			  }
-			},
 			stopPlayer() {
 				this.player && this.player.pause();
 			},

+ 0 - 6
pages/xinshuxue/components/videoPlay2.vue

@@ -63,12 +63,6 @@
 			}
 		},
 		methods: {
-		   // 通用的方法调用器
-			handleRenderMethod(methodName, params) {
-			  if (this[methodName] && typeof this[methodName] === 'function') {
-				return this[methodName](params)
-			  }
-			},
 			stopPlayer() {
 				this.player && this.player.pause();
 			},