Browse Source

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

tanxue 1 month ago
parent
commit
bf579a8857

+ 4 - 2
pages/chanpinXuanze/banben.vue

@@ -39,12 +39,14 @@
 	}
 
 	function handleBack() {
-		uni.navigateBack()
+		uni.redirectTo({
+		  url: `/pages/chanpinXuanze/index`
+		})
 	}
 
   function handleSelect(item) {
     uni.redirectTo({
-      url: `/pages/chanpinXuanze/xuexi?banbenId=${item.id}`
+      url: `/pages/chanpinneirong/index?banbenId=${item.id}`
     })
   }
 

+ 1 - 1
pages/chanpinXuanze/components/shuxueList.vue

@@ -34,7 +34,7 @@
 	// 选择产品等级
 	function handleSelect(item) {
 		console.log('item', item)
-		uni.navigateTo({
+		uni.redirectTo({
 			url: `/pages/chanpinXuanze/banben?dengjiId=${item.dengjiId}`
 		})
 	}

+ 30 - 6
pages/chanpinneirong/index.vue

@@ -18,12 +18,12 @@
 				<text class="course-name">单元:{{ subjectDetail.curDanyuanName }}</text>
 				<progress :percent="20" class="exam-progress-box" stroke-width="10" backgroundColor="#3c7dfd"
 					activeColor="#ffd11c" />
-				<text class="course-name">继续学习</text>
+				<text class="course-name" @click="handlePlay(subjectDetail,'jixu')">继续学习</text>
 			</view>
 			<!-- 单元列表 -->
 			<view v-for="(unit, index) in danyuanList" :key="unit.danyuanId" :id="'unit-' + index" class="unit-item">
 				<!-- 单元标题 -->
-				<view class="unit-title">
+				<view class="unit-title" @click="handleClickDanyuan(unit)">
 					<text class="unit-name">{{ unit.danyuanName }}</text>
 					<text class="unit-intro">{{ unit.danyuanIntro }}</text>
 				</view>
@@ -42,7 +42,7 @@
 					</view>
 					<view class="section-right">
 						<text class="section-number">第{{ section.number }}节</text>
-						<text>播放按钮</text>
+						<text @click="handlePlay(section,'play')">播放按钮</text>
 					</view>
 				</view>
 			</view>
@@ -50,6 +50,9 @@
 			<!-- 底部占位 -->
 			<view style="height: 100px; text-align: center;">查看更多内容</view>
 		</scroll-view>
+		
+		<danyuanInfoVue ref="dyRef" v-if="isShow" @close="isShow= false"></danyuanInfoVue>
+		
 		<CustomTabBar :currentTabNumber="1"></CustomTabBar>
 	</view>
 </template>
@@ -59,6 +62,8 @@
 	import {
 		shuxueChanpinBanben
 	} from "@/api/chanpinneirong.js"
+	import danyuanInfoVue from '@/pages/xinshuxue/components/danyuanInfo.vue';
+	
 	export default {
 		data() {
 			return {
@@ -69,11 +74,13 @@
 				scrollTop: 0,
 				pageCacheKey: 'learn_page_scroll_cache',
 				hasRestoredScroll: false,
-				showStickyTitle: false
+				showStickyTitle: false,
+				isShow: true
 			}
 		},
 		components: {
-			CustomTabBar
+			CustomTabBar,
+			danyuanInfoVue,
 		},
 		onShow() {
 
@@ -105,7 +112,24 @@
 		},
 
 		methods: {
-
+			handlePlay(da,code) {
+				let jieId = null;
+				if (code == 'jixu') {
+					jieId = da.curJieId;
+				} else {
+					jieId = da.jieId;
+				}
+				uni.navigateTo({
+					url: `/pages/xinshuxue/lookShipin?jieId=${jieId}`
+				})
+			},
+			handleClickDanyuan(item){
+				console.log('item', item)
+				this.isShow = true;
+				setTimeout(() => {
+					this.$refs.dyRef.handleShow(item.danyuanId)
+				},100)
+			},
 
 			loadDataFromApi() {
 				const req = {

+ 4 - 3
pages/xinshuxue/components/danyuanInfo.vue

@@ -1,10 +1,10 @@
 <template>
-	<uni-popup ref="popupRef" :animation="false" :is-mask-click="false"
+	<uni-popup ref="popupRef" :animation="false" :is-mask-click="false" 
 		mask-background-color="rgba(51, 137, 217, 0.95);">
-		<view class="ezy-course-page" :style="{backgroundImage: 'url(' + courseBjFun() + ')'}">
+		<view class="ezy-course-page" :style="{backgroundImage: 'url(' + courseBjFun() + ')'}" style="height: 80vh">
 			<view class="icon-title-navBar-box">
 				<!-- 关闭按钮 -->
-				<view @click="goUpPage" class="nav-bar-icon">x</view>
+				<view @click="goUpPage" class="nav-bar-icon2">返回</view>
 				<text class="nav-bar-title">{{danyuanInfo.danyuanIntro}}</text>
 			</view>
 			<view class="ezy-video-box course-video-box">
@@ -103,6 +103,7 @@
 		methods: {
 			goUpPage() {
 				this.$refs.popupRef.close();
+				this.$emit('close')
 			},
 			// 打开弹窗
 			handleShow(danyuanId) {

+ 1 - 10
pages/xinshuxue/lookShipin.vue

@@ -5,8 +5,6 @@
 			<text class="nav-bar-title">{{jieInfo.jieIntro}}</text>
 		</view>
 		
-		<button @click="handleTest">test</button>
-		
 		<view class="ezy-video-box course-video-box">
 			<view ref="videoContent" id="wgy-player-test" :playAuth="playAuth"
 				:change:playAuth="renderScript.receiveMsg" :videoId="videoId" :change:videoId="renderScript.videoIdFun"
@@ -45,9 +43,6 @@
 
 		<!-- 弹窗 -->
 		<tishiDlVue ref="popupRef"></tishiDlVue>
-		
-		
-		<danyuanInfoVue ref="dyRef"></danyuanInfoVue>
 	</view>
 
 </template>
@@ -71,7 +66,6 @@
 	import cacheManager from "@/utils/cacheManager.js";
 	import * as httpApi from "@/api/chanpinShuxue.js";
 	import tishiDlVue from './components/tishiDl.vue';
-	import danyuanInfoVue from './components/danyuanInfo.vue';
 
 	export default {
 		data() {
@@ -101,7 +95,7 @@
 			}
 		},
 		components: {
-			tishiDlVue,danyuanInfoVue
+			tishiDlVue
 		},
 		onLoad(options) {
 			this.init(options)
@@ -113,9 +107,6 @@
 			this.hideFlag = 'hide'
 		},
 		methods: {
-			handleTest() {
-				this.$refs.dyRef.handleShow(1)
-			},
 			//  当前节学习完成
 			saveJieWancheng() {
 				getShuxueChanpinWancheng({jieId: this.jieInfo.jieId}).then(res => {