瀏覽代碼

修复bug

chenxiong 3 年之前
父節點
當前提交
053fa41869
共有 2 個文件被更改,包括 125 次插入114 次删除
  1. 4 4
      common/request.js
  2. 121 110
      pages3/polyv/detail.vue

+ 4 - 4
common/request.js

@@ -4,13 +4,13 @@ import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
 //接口api   
-export const BASE_URL = 'https://api.xyyxt.net'   //release
-// export const BASE_URL = 'http://42.192.164.187:19005'    //test
+// export const BASE_URL = 'https://api.xyyxt.net'   //release
+export const BASE_URL = 'http://42.192.164.187:19005'    //test
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
  //图片上传api
-export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 export const tenantId = '867735392558919680' 
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {

+ 121 - 110
pages3/polyv/detail.vue

@@ -1,7 +1,7 @@
 <template>
-	<view>
+	<view  class="polyv_detail">
 		<nav-bar title="课程详情" v-show="navShow"></nav-bar>
-		<view style="position: fixed;width: 100%;z-index: 999;background: #FFFFFF;" id="top">
+		<view id="top">
 			<view class="video_box" v-if="!startStatus">
 				<image :src="$method.splitImgHost(detail.coverUrl)" mode="widthFix" style="width: 100%;height: 460rpx;"></image>
 				<image v-if="false" class="video_play" src="/static/play.png" @click="startVideo"></image>
@@ -61,119 +61,121 @@
 			<u-line color="#D6D6DB" />
 		</view>
 		<view class="box">
-			
-			<!--目录 -->
-			<view v-show="current == 0">
-				<view class="menuBox" v-for="(item, index) in menuList" :key="index">
-					<!--模块 -->
-					<view v-if="item.type == 1"><courseModule :needOpen="menuIndex[0] === index ? true : false" :courseId="courseId" :preItem="menuList[index-1]"  :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
-					<!--章 -->
-					<view v-if="item.type == 2"><courseChapter :needOpen="menuIndex[0] === index ? true : false" :courseId="courseId" :preItem="menuList[index-1]"  @playEnd="sectionPlayEnd($event,index)" :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter></view>
-					<!--节 -->
-					<view v-if="item.type == 3"><courseSection @playEnd="sectionPlayEnd($event,index)" :courseId="courseId" :preItem="menuList[index-1]" :learningOrder="businessData.goodsLearningOrder"  :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection></view>
-				</view>
-			</view>
-			<!--讲义 -->
-			<view v-show="current == 1">
-				<view class="lecture-box" v-if="courseHandoutsData">
-					<view class="title">
-						{{courseHandoutsData.handoutsName}}
-						<!-- 这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略 -->
-					</view>
-					<view class="btn" @click="openDocument">
-						<u-icon name="download" color="#007AFF" size="40"></u-icon>
+			<scroll-view class="box_in" scroll-y="true">
+				<!--目录 -->
+				<view v-show="current == 0">
+					<view class="menuBox" v-for="(item, index) in menuList" :key="index">
+						<!--模块 -->
+						<view v-if="item.type == 1"><courseModule :needOpen="menuIndex[0] === index ? true : false" :courseId="courseId" :preItem="menuList[index-1]"  :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
+						<!--章 -->
+						<view v-if="item.type == 2"><courseChapter :needOpen="menuIndex[0] === index ? true : false" :courseId="courseId" :preItem="menuList[index-1]"  @playEnd="sectionPlayEnd($event,index)" :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter></view>
+						<!--节 -->
+						<view v-if="item.type == 3"><courseSection @playEnd="sectionPlayEnd($event,index)" :courseId="courseId" :preItem="menuList[index-1]" :learningOrder="businessData.goodsLearningOrder"  :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection></view>
 					</view>
 				</view>
-				
-				<view style="text-align: center;" v-else>暂无讲义</view>
-				<!-- <view class="lecture-content">
-					<rich-text :nodes="'讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容'"></rich-text>
-				</view> -->
-				
-			<!-- 	<view class="inputBottom">
-					<view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
-					<view style="width: 73%;height: 100%;padding: 10rpx 0;">
-						<u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
-					</view>
-					<view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
-				</view> -->
-				
-			</view>
-			<!--笔记 -->
-			<view v-show="current == 2">
-				<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>
-					<view style="width: 73%;height: 100%;padding: 10rpx 0;">
-						<u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
+				<!--讲义 -->
+				<view v-show="current == 1">
+					<view class="lecture-box" v-if="courseHandoutsData">
+						<view class="title">
+							{{courseHandoutsData.handoutsName}}
+							<!-- 这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略 -->
+						</view>
+						<view class="btn" @click="openDocument">
+							<u-icon name="download" color="#007AFF" size="40"></u-icon>
+						</view>
 					</view>
-					<view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
+					
+					<view style="text-align: center;" v-else>暂无讲义</view>
+					<!-- <view class="lecture-content">
+						<rich-text :nodes="'讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容'"></rich-text>
+					</view> -->
+					
+				<!-- 	<view class="inputBottom">
+						<view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
+						<view style="width: 73%;height: 100%;padding: 10rpx 0;">
+							<u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
+						</view>
+						<view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
+					</view> -->
+					
 				</view>
-				<view v-for="(item, index) in noteList" :key="index">
-					<view class="dateBox">{{ $method.timestampToTime(item.dateNote) }}</view>
-					<view class="noteBox">
-						<view v-for="(item1, index1) in item.userNotes" :key="index1" style="margin-top: 30rpx;" @click="jumpNote(item1)">
-							<view style="display: flex;">
-								<view>
+				<!--笔记 -->
+				<view v-show="current == 2">
+					<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>
+						<view style="width: 73%;height: 100%;padding: 10rpx 0;">
+							<u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="input" :custom-style="inputStyle" v-model="noteValue" />
+						</view>
+						<view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
+					</view>
+					<view v-for="(item, index) in noteList" :key="index">
+						<view class="dateBox">{{ $method.timestampToTime(item.dateNote) }}</view>
+						<view class="noteBox">
+							<view v-for="(item1, index1) in item.userNotes" :key="index1" style="margin-top: 30rpx;" @click="jumpNote(item1)">
+								<view style="display: flex;">
 									<view>
-										<image src="/static/icon/note2.png" v-if="noteId != item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
-										<image src="/static/icon/note1.png" v-if="noteId == item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
+										<view>
+											<image src="/static/icon/note2.png" v-if="noteId != item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
+											<image src="/static/icon/note1.png" v-if="noteId == item1.noteId" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image>
+										</view>
+										<view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">{{ $method.secondToDate(item1.noteSecond) }}</view>
+									</view>
+									<view style="margin-left: 10rpx;">
+										<view class="t2Content leftPadding">{{ item1.sectionName }}</view>
+										<view class="tBox2">{{ item1.noteText }}</view>
 									</view>
-									<view class="title" style="width: 39rpx;height: 39rpx;margin:0 29rpx;">{{ $method.secondToDate(item1.noteSecond) }}</view>
-								</view>
-								<view style="margin-left: 10rpx;">
-									<view class="t2Content leftPadding">{{ item1.sectionName }}</view>
-									<view class="tBox2">{{ item1.noteText }}</view>
 								</view>
 							</view>
 						</view>
 					</view>
 				</view>
-			</view>
-			<!--答疑 -->
-			<view v-show="current == 3">
-				<view class="inputBottom">
-					<view class="flex_auto">
-						<u-input height="60" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="ctxValue" />
+				<!--答疑 -->
+				<view v-show="current == 3">
+					<view class="inputBottom">
+						<view class="flex_auto">
+							<u-input height="60" fixed="true" :placeholder="placeholder" type="input" :custom-style="inputStyle" v-model="ctxValue" />
+						</view>
+						<view class="btn" @click="postContent">提交</view>
 					</view>
-					<view class="btn" @click="postContent">提交</view>
-				</view>
-				<view v-for="(item, index) in answerList" :key="index" style="background-color: #FFFFFF;margin-bottom: 20rpx;">
-					<view class="chat_box" @click.stop="clearCtx">
-						<view style="display: flex;flex:1;">
-							<view><image :src="item.assignUserId > 0 && !item.realname  ? '/static/logo_xcx.png' :$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
-							<view style="margin-left: 15rpx;">
-								<view class="chat1">{{ item.assignUserId > 0 && !item.realname ? '祥粤老师' : item.realname }}</view>
-								<view class="chat2">{{ $method.timestampToTime(item.createTime,false) }}</view>
-								<view class="chat3">
-									<text v-if="item.assignUserId > 0">回复</text>
-									<text v-if="item.assignUserId > 0" style="color: #007AFF;">@{{ item.assignRealname }}</text>
-									<view style="word-break: break-all;">{{ item.answerText }}</view>
+					<view v-for="(item, index) in answerList" :key="index" style="background-color: #FFFFFF;margin-bottom: 20rpx;">
+						<view class="chat_box" @click.stop="clearCtx">
+							<view style="display: flex;flex:1;">
+								<view><image :src="item.assignUserId > 0 && !item.realname  ? '/static/logo_xcx.png' :$method.splitImgHost(item.avatar)" style="width: 64rpx;height: 64rpx;"></image></view>
+								<view style="margin-left: 15rpx;">
+									<view class="chat1">{{ item.assignUserId > 0 && !item.realname ? '祥粤老师' : item.realname }}</view>
+									<view class="chat2">{{ $method.timestampToTime(item.createTime,false) }}</view>
+									<view class="chat3">
+										<text v-if="item.assignUserId > 0">回复</text>
+										<text v-if="item.assignUserId > 0" style="color: #007AFF;">@{{ item.assignRealname }}</text>
+										<view style="word-break: break-all;">{{ item.answerText }}</view>
+									</view>
 								</view>
 							</view>
+							<view class="btnReply" @click.stop="replyContent(item)" v-if="item.userId != userInfo.userId">回复</view>
+							<view v-else class="btnDel" @click.stop="delContent(item)">删除</view>
 						</view>
-						<view class="btnReply" @click.stop="replyContent(item)" v-if="item.userId != userInfo.userId">回复</view>
-						<view v-else class="btnDel" @click.stop="delContent(item)">删除</view>
+						<u-line color="#D6D6DB" />
 					</view>
-					<u-line color="#D6D6DB" />
+					<view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
 				</view>
-				<view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
-			</view>
-			<!--目录 -->
-			<view v-show="current == 4" >
-				<view class="menuBox" v-for="(item, index) in reMenuList" :key="index">
-					<!--模块 -->
-					<view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
-					<!--章 -->
-					<view v-if="item.type == 2">
-						<courseChapter :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>			
-					</view>
-					<!--节 -->
-					<view v-if="item.type == 3">
-						<courseSection :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :nextMenuItem="findMenuNextSection(index)"  :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
+				<!--目录 -->
+				<view v-show="current == 4" >
+					<view class="menuBox" v-for="(item, index) in reMenuList" :key="index">
+						<!--模块 -->
+						<view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
+						<!--章 -->
+						<view v-if="item.type == 2">
+							<courseChapter :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>			
+						</view>
+						<!--节 -->
+						<view v-if="item.type == 3">
+							<courseSection :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :nextMenuItem="findMenuNextSection(index)"  :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
+						</view>
 					</view>
 				</view>
-			</view>
+			</scroll-view>
+			
 		</view>
 		<!-- 播放前拍照end -->
 		<u-popup v-model="showSet" :mask-close-able="false" mode="center" border-radius="24">
@@ -1709,15 +1711,30 @@ export default {
 </script>
 
 <style lang="scss" scope>
-	.btnSet{
-		width: 440rpx;
-		height: 80rpx;
-		background: #007AFF;
-		border-radius: 40rpx;
-		color: #FFFFFF;
-		font-size: 28rpx;
-		line-height: 80rpx;
+.polyv_detail {
+	display: flex;
+	flex-direction: column;
+	height:100vh;
+	
+	.box {
+		flex:1;
+		overflow: hidden;
+		margin: 20rpx;
+		
+		.box_in {
+			height:100%;
+		}
 	}
+}
+.btnSet{
+	width: 440rpx;
+	height: 80rpx;
+	background: #007AFF;
+	border-radius: 40rpx;
+	color: #FFFFFF;
+	font-size: 28rpx;
+	line-height: 80rpx;
+}
 .btnReply {
 	width: 80rpx;
 	height: 40rpx;
@@ -2125,12 +2142,6 @@ page {
 .catalogBox::-webkit-scrollbar {
 	display: none; /* Chrome Safari */
 }
-.box {
-	position: relative;
-	top: 650rpx;
-	padding-bottom: 88rpx;
-	margin: 20rpx;
-}
 .price_t2 {
 	font-size: 18rpx;
 	font-family: PingFang SC;