Selaa lähdekoodia

fix 主页日历

he2802 3 vuotta sitten
vanhempi
commit
4e431054f1
1 muutettua tiedostoa jossa 28 lisäystä ja 23 poistoa
  1. 28 23
      pages2/class/detail.vue

+ 28 - 23
pages2/class/detail.vue

@@ -26,7 +26,7 @@
 						<view class="video_t1">{{ detail.courseName }}</view>
 					</u-col>
 					<u-col span="2">
-						<view class="video_t1_t" @click="openPhoto">
+						<view class="video_t1_t" @click="openJY">
 							<image src="/static/icon/jy_icon.png" style="width: 40rpx;height: 40rpx;"></image>
 							讲义
 						</view>
@@ -35,28 +35,14 @@
 			</view>
 			<u-line color="#D6D6DB" />
 			<view style="display: flex;justify-content: center;">
-				<view style="width: 280px;"><u-tabs :list="list" font-size="24" bar-width="80" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
+				<view :style="list.length==3?'width: 220px;':'width: 280px;'"><u-tabs :list="list" font-size="24" bar-width="80" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
 			</view>
 			<u-line color="#D6D6DB" />
 		</view>
 		<view class="box">
+			
 			<!--目录 -->
 			<view v-show="current == 0">
-				<view class="menuBox" v-for="(item, index) in reMenuList">
-					<!--模块 -->
-					<view v-if="item.type == 1"><courseModule :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
-					<!--章 -->
-					<view v-if="item.type == 2">
-						<courseChapter :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>
-					</view>
-					<!--节 -->
-					<view v-if="item.type == 3">
-						<courseSection :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
-					</view>
-				</view>
-			</view>
-			<!--目录 -->
-			<view v-show="current == 1">
 				<view class="menuBox" v-for="(item, index) in menuList">
 					<!--模块 -->
 					<view v-if="item.type == 1"><courseModule :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
@@ -67,7 +53,7 @@
 				</view>
 			</view>
 			<!--笔记 -->
-			<view v-show="current == 2">
+			<view v-show="current == 1">
 				<view v-if="noteList.length == 0" style="text-align: center;">暂无笔记</view>
 				<view class="inputBottom">
 					<view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
@@ -98,7 +84,7 @@
 				</view>
 			</view>
 			<!--答疑 -->
-			<view v-show="current == 3">
+			<view v-show="current == 2">
 				<view class="inputBottom">
 					<view style="width: 73%;height: 88rpx;margin-bottom: 15rpx;margin-left: 10% ;">
 						<u-input height="78" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="ctxValue" />
@@ -126,6 +112,21 @@
 				</view>
 				<view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
 			</view>
+			<!--目录 -->
+			<view v-show="current == 3" >
+				<view class="menuBox" v-for="(item, index) in reMenuList">
+					<!--模块 -->
+					<view v-if="item.type == 1"><courseModule :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
+					<!--章 -->
+					<view v-if="item.type == 2">
+						<courseChapter :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>
+					</view>
+					<!--节 -->
+					<view v-if="item.type == 3">
+						<courseSection :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
+					</view>
+				</view>
+			</view>
 		</view>
 		<!-- 播放前拍照start -->
 		<u-popup v-model="photoPopup" mode="bottom" border-radius="32" :mask-close-able="false">
@@ -171,9 +172,7 @@ export default {
 			},
 			playbackRate: [0.5, 0.8, 1.0],
 			list: [
-				{
-					name: '重修目录'
-				},
+				
 				{
 					name: '目录'
 				},
@@ -185,7 +184,7 @@ export default {
 				}
 			],
 			menuList: [],
-			current: 1,
+			current: 0,
 			vid: '',
 			goodsId: 0,
 			goodsData: {},
@@ -338,6 +337,9 @@ export default {
 		});
 	},
 	methods: {
+		openJY(){
+			this.$u.toast('此功能正在开发中');
+		},
 		async playVideo(item) {
 			if (this.timer) {
 				clearInterval(this.timer);
@@ -721,6 +723,9 @@ export default {
 						item.name = item.menuName;
 					}
 					self.reMenuList = res.data.rows;
+					if(self.reMenuList.length>0){
+						self.list.unshift({name:'重修目录'})
+					}
 				}
 			});
 		},