wangxy 1 month ago
parent
commit
88b91ade6e
3 changed files with 16 additions and 16 deletions
  1. 0 7
      pages/chanpinMy/my.vue
  2. 15 8
      pages/chanpinneirong/index.vue
  3. 1 1
      pages/xinshuxue/lookShipin.vue

+ 0 - 7
pages/chanpinMy/my.vue

@@ -23,18 +23,11 @@
 					<icon class="list-icon yysz-icon"></icon>
 					<text>应用设置</text>
 				</view>
-				
-				<view class="list-item" @click="handleTest">
-					<icon class="list-icon yysz-icon"></icon>
-					<text>测试</text>
-				</view>
 			</view>
 		</view>
 		<!-- 底部 -->
 		<CustomTabBar :currentTabNumber="3"></CustomTabBar>
 		
-		<danyuanMuluVue ref="testRef"></danyuanMuluVue>
-		
 	</view>
 </template>
 

+ 15 - 8
pages/chanpinneirong/index.vue

@@ -26,10 +26,10 @@
 						<view class="jxxx-btn" @click="handlePlay(danyuanInfo,'jixu')"></view>
 					</view>
 					<view class="jd-item-box">
-						<view class="jd-item-btn">
+						<view class="jd-item-btn" @click="handleClickDanyuan">
 							<icon class="dydg-icon"></icon>单元大纲
 						</view>
-						<view class="jd-item-btn">
+						<view class="jd-item-btn" @click="handleClickMulu">
 							<icon class="dyml-icon"></icon>单元目录
 						</view>
 					</view>
@@ -59,7 +59,7 @@
 		<!-- <scroll-view scroll-y class="scroll-view" :scroll-top="scrollTop" @scroll="onScroll"> </scroll-view> -->
 
 		<danyuanInfoVue ref="dyRef" v-if="isShow" @close="isShow= false"></danyuanInfoVue>
-
+		<danyuanMuluVue ref="dyMlRef" @select="handleSelectDanyuan"></danyuanMuluVue>
 		<CustomTabBar :currentTabNumber="1"></CustomTabBar>
 	</view>
 </template>
@@ -71,6 +71,7 @@
 		shuxueChanpinDanyuanInfo
 	} from "@/api/chanpinneirong.js"
 	import danyuanInfoVue from '@/pages/xinshuxue/components/danyuanInfo.vue';
+	import danyuanMuluVue from '@/pages/xinshuxue/components/danyuanMulu.vue';
 
 	export default {
 		data() {
@@ -95,6 +96,7 @@
 		components: {
 			CustomTabBar,
 			danyuanInfoVue,
+			danyuanMuluVue
 		},
 		onShow() {
 			console.log('学习页面显示,尝试恢复滚动位置')
@@ -114,7 +116,7 @@
 				this.loadDataFromApi()
 			} else {
 				console.log('使用缓存');
-				
+
 				this.chanpinId = cacheManager.get('auth').chanpinId
 				this.danyuanId = cacheManager.get('auth').danyuanId
 				this.banbenId = cacheManager.get('auth').banbenId
@@ -128,7 +130,12 @@
 		},
 
 		methods: {
-
+			handleSelectDanyuan(item) {
+				console.log('点击单元', item)
+			},
+			handleClickMulu() {
+				this.$refs.dyMlRef.showPopup(this.banbenId)
+			},
 			handleBack() {
 
 			},
@@ -173,6 +180,7 @@
 			},
 
 			handlePlay(da, code) {
+				console.log('da', da)
 				let jieId = null;
 				if (code == 'jixu') {
 					jieId = da.curJieId;
@@ -192,11 +200,10 @@
 					}
 				}
 			},
-			handleClickDanyuan(item) {
-				console.log('item', item)
+			handleClickDanyuan() {
 				this.isShow = true;
 				setTimeout(() => {
-					this.$refs.dyRef.handleShow(item.danyuanId)
+					this.$refs.dyRef.handleShow(this.danyuanId)
 				}, 100)
 			},
 

+ 1 - 1
pages/xinshuxue/lookShipin.vue

@@ -148,7 +148,7 @@
 					// 重新赋值
 					Object.assign(this.jieInfo, res.data)
 					// 触发当前节学习进度
-					this.saveJinduStart();
+					// this.saveJinduStart();
 					// 	针对视频进行赋值
 					this.videoId = this.jieInfo.video1;
 					this.videoId2 = this.jieInfo.video2;