chenxiong %!s(int64=3) %!d(string=hai) anos
pai
achega
b13738d4ec

+ 5 - 5
common/request.js

@@ -4,20 +4,20 @@ 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 = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'http://120.79.166.78:19009'   //预发布
-export const BASE_URL = 'http://42.192.164.187:19005'    //test 
+// 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 socket_url = 'ws://42.192.164.187:19005/webSocket/'  //test
 // export const socket_url = 'ws://120.79.166.78:19009/webSocket/'  //预发布
 // export const socket_url = 'wss://api.xyyxt.net/webSocket/'  //release
 
-export const version = '5.2.2' 
+export const version = '5.2.4' 
 export const tenantId = '867735392558919680' 
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {

+ 2 - 1
components/course/courseSection.vue

@@ -12,7 +12,7 @@
 					<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType==2 && menuItem.liveStartTime">
 						<view v-if="menuItem.liveStartTime>nowTime">
 							<text>{{$method.timestampToTime(menuItem.liveStartTime, isDay =false)}}</text>-
-							<text>{{$method.timestampToTime(menuItem.liveEndTime, isDay =false).substr(11,9)}}</text>
+							<text>{{$method.timestampToTime(menuItem.liveEndTime, isDay =false)}}</text>
 						</view>
 						<!-- <view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
 							<text>直播中</text>
@@ -319,6 +319,7 @@ export default {
 					} else {
 						this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
 						this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
+						this.menuItem.courseId = this.courseId;
 						uni.$emit('getSection', this.menuItem)
 						return;
 					}

+ 5 - 5
pages/index/index.vue

@@ -185,8 +185,6 @@ export default {
 	},
 	onPullDownRefresh() {},
 	async onLoad(option) {
-		this.courseList();
-		this.bankList();
 		this.getAdvertising();
 		if(this.$method.isLogin()) {
 			try  {
@@ -209,6 +207,8 @@ export default {
 		this.init()
 	},
 	onShow() {
+		this.courseList();
+		this.bankList();
 		if (uni.getStorageSync('updateHome')){
 			this.init()
 			uni.removeStorageSync('updateHome'); //消费首页刷新事件
@@ -337,7 +337,7 @@ export default {
 		},
 		advertisingList() {
 			return new Promise(resolve => {
-				this.$api.advertisingList().then(res => {
+				this.$api.advertisingList({locationId:1}).then(res => {
 					this.list = res.data.rows;
 					resolve()
 				})
@@ -352,7 +352,7 @@ export default {
 			var param = this.paramList[0];
 			this.$api.goodsList(param).then(res => {
 				self.paramList[0].total = res.data.total;
-				self.list1.push.apply(self.list1, res.data.rows);
+				self.list1 = res.data.rows;
 				if (self.list1.length === res.data.total) {
 					self.paramList[0].showStatus = true;
 				}
@@ -364,7 +364,7 @@ export default {
 			var param = this.paramList[1];
 			this.$api.goodsList(param).then(res => {
 				self.paramList[1].total = res.data.total;
-				self.list2.push.apply(self.list2, res.data.rows);
+				self.list2 =  res.data.rows
 				if (self.list2.length === res.data.total) {
 					self.paramList[1].showStatus = true;
 				}

+ 2 - 1
pages2/appointment/index.vue

@@ -169,7 +169,8 @@ export default {
 			this.showTip = false;
 			this.$store.commit('updateBackApplyData',{
 				goodsId: this.goodsId,
-				gradeId: this.gradeId
+				orderGoodsId:this.orderGoodsId,
+				gradeId: this.gradeId,
 			})
 			this.$navTo.togo('/pages2/order/confirm_list', {
 				id: this.goodsIdBK,

+ 1 - 1
pages2/bank/question_report.vue

@@ -256,7 +256,7 @@ export default {
 		 * 去做题
 		 */
 		async doRepeat(id, goodsId, moduleId = 0, chapterId = 0) {
-			await this.getDetail(goodsId);
+			// await this.getDetail(goodsId);
 			let count = await this.examRecordCount(id, goodsId);
 			let answerNum = await this.getExamDetail(id);
 			//超过答题次数

+ 106 - 90
pages2/msg/detail.vue

@@ -14,7 +14,7 @@
 					</view>
 					<view style="display: flex;align-items: center;margin:28rpx 0rpx;" @click="jumpSection(item)">
 						<image style="width: 35rpx;height: 35rpx;" src="@/static/courseIcon.png" mode=""></image>
-						<text class="timeStys">{{ $method.secondToTime(item.topicNum) }}</text>
+						<text class="timeStys">{{ $method.secondToTime(item.topicNum,false) }}</text>
 						<text class="aSty">点击可直接跳转</text>
 					</view>
 				</view>
@@ -46,13 +46,15 @@ export default {
 			id: null,
 			img1: '/static/icon/msg_icon1.png',
 			img2: '/static/icon/msg_icon2.png',
-			statusGO: true
+			statusGO: true,
+			orderGoodsId:0,
 		};
 	},
 	onPullDownRefresh() {},
 	onLoad(option) {
 		this.sysTime = this.$method.timest();
 		this.id = Number(option.id);
+		this.orderGoodsId = option.orderGoodsId;
 	},
 	onShow() {
 		this.getInfo();
@@ -94,98 +96,110 @@ export default {
 					
 					//课程
 					if(item.goodsType == 1) {
-						let currentTime = this.$method.timest();
-						console.log(currentTime)
-						console.log(item)
-						console.log(item.serviceStartTime)
-						console.log(item.serviceEndTime)
-						console.log(currentTime < item.serviceStartTime || currentTime > item.serviceEndTime)
-						if(currentTime < item.serviceStartTime || currentTime > item.serviceEndTime) {
-							uni.showToast({
-								title:'不在学习有效期,不可以学习了哦',
-								icon:'none'
-							})
-							return;
-						}
-						
-						if( (item.classStartTime && currentTime <= item.classStartTime) || (item.classEndTime && currentTime >= item.classEndTime) ) {
-							uni.showToast({
-								title:'不在班级有效期,不能进入学习',
-								icon:'none'
-							})
-							return;
-						}
-						
-						if(item.learningStatus == 2) {
-							uni.showToast({
-								title:'开放学习时间待定,不能进入学习',
-								icon:'none'
-							})
-							return;
-						}
-						
-						if(item.classStatus == 0 ) {
-							uni.showToast({
-								title:'尚未开班,不能进入学习',
-								icon:'none'
-							})
-							return;
-						}
-						
-						if(item.learningStatus == 3 && (currentTime < item.learningTimeStart) ) {
-							uni.showToast({
-								title:'不在开放学习时间,不能进入学习',
-								icon:'none'
-							})
-							return;
-						}
-						
-						if(item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > currentTime) &&  (item.classEndTime && (item.classEndTime < currentTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
+						this.$api.orderInfo({
+							orderGoodsId:this.orderGoodsId
+						}).then(async res => {
+							console.log(res)
+							let item = res.data.data;
 							
-							uni.showModal({
-								title:'提示',
-								content:'班级已过期,需要重新选班',
-								showCancel:false,
-								success:() => {
-									uni.navigateTo({
-										url:"/pages2/wd/class"
-									})
-								}
-							})
-							return;
-						}
-						
-						let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
-						
-						if(rebuildStatus == 0) {
-							this.$navTo.togo('/pages2/learn/details', {
-								gradeId:item.gradeId,
-								goodsId: item.goodsId
-							})
-							return;
-						}
-						
-						if(item.courseNum == 1 ) {
+							let currentTime = this.$method.timest();
+							console.log(currentTime)
+							console.log(item)
+							console.log(item.serviceStartTime)
+							console.log(item.serviceEndTime)
+							console.log(currentTime < item.serviceStartTime || currentTime > item.serviceEndTime)
+							//内部系统
+							if (item.interfacePushId > 0 && item.officialStatus != 1) {
+								uni.showModal({
+									showCancel: false,
+									content: '机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!'
+								});
+								return;
+							}
+							if (this.sysTime <= item.serviceStartTime || this.sysTime >= item.serviceEndTime) {
+								uni.showToast({
+									icon: 'none',
+									title: '不在学习服务期,不能进入学习'
+								})
+								return;
+							}
 							
-							this.$api.courseCourseList({
-								pageNum:1,
-								pageSize:1,
-								goodsId:item.goodsId,
-								gradeId:item.gradeId
-							}).then(res => {
-								if(res.data.code == 200) {
-									uni.navigateTo({
-										url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
-									})
-								}
+							if ((item.classStartTime && this.sysTime <= item.classStartTime) || (item.classEndTime && this
+									.sysTime >= item.classEndTime)) {
+								uni.showToast({
+									icon: 'none',
+									title: '不在班级有效期,不能进入学习'
+								})
+								return
+							}
+							
+							if (item.learningStatus == 2) {
+								uni.showToast({
+									icon: 'none',
+									title: '开放学习时间待定,不能进入学习'
+								})
+								return
+							}
+							
+							if (item.classStatus == 0) {
+								uni.showToast({
+									icon: 'none',
+									title: '尚未开班,不能进入学习'
+								})
+								return
+							}
+							console.log(this.sysTime, item.learningTimeStart)
+							console.log(this.sysTime < item.learningTimeStart)
+							if (item.learningStatus == 3 && (this.sysTime < item.learningTimeStart)) {
+								uni.showToast({
+									icon: 'none',
+									title: '不在开放学习时间,不能进入学习'
+								})
+								return;
+							}
+			
+							
+							if (item.gradeStatus == 1 && item.status == 1 && (item.serviceEndTime > this.sysTime) && (item
+									.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item
+									.periodStatus == -1) && item.studyCount > 0) {
+								this.selectClass(item, index);
+								return;
+							}
+							
+							let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
+							
+							if(rebuildStatus == 0) {
+								this.$navTo.togo('/pages2/learn/details', {
+									gradeId:item.gradeId,
+									goodsId: item.goodsId,
+									orderGoodsId:this.orderGoodsId
+								})
+								return;
+							}
+							console.log(item,'item')
+							if(item.courseNum == 1 ) {
+								
+								this.$api.courseCourseList({
+									pageNum:1,
+									pageSize:1,
+									goodsId:item.goodsId,
+									gradeId:item.gradeId
+								}).then(res => {
+									if(res.data.code == 200) {
+										uni.navigateTo({
+											url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
+										})
+									}
+								});
+								return;
+							}
+							
+							this.$navTo.togo('/pages2/wd/course', {
+								id: item.goodsId,
+								gid: item.gradeId
 							});
-							return;
-						}
+						})
 						
-						this.$navTo.togo('/pages2/wd/course', {
-							id: item.goodsId,
-							gid: item.gradeId
-						});
 						// arsty = '立刻学习';
 						
 					//题库
@@ -253,6 +267,7 @@ export default {
 		},
 		//跳转节视频
 		jumpSection(item) {
+			console.log(item)
 			item.noteSecond = Number(item.topicNum) * 60; //转秒数
 			this.$navTo.togo('/pages3/polyv/detail', {
 				id: item.courseId,
@@ -314,6 +329,7 @@ export default {
 					if (res.data.data.informVo && res.data.data.informVo.affiche) {
 						res.data.data.informVo.affiche = res.data.data.informVo.affiche.replace(/<img/gi, '<img style="max-width:100%;"');
 					}
+					
 					this.listData = res.data.data;
 					if(res.data.data.goodsId) {
 						if(res.data.data.gradeId) {

+ 1 - 1
pages2/msg/index.vue

@@ -3,7 +3,7 @@
 		<nav-bar title="我的消息"></nav-bar>
 		<view v-if="!listData.length"><u-empty text="消息列表为空" mode="message"></u-empty></view>
 		<view v-else v-for="(item, index) in listData" :key="index" style="padding-bottom: 20rpx;">
-			<navigator hover-class="none" :url="`/pages2/msg/detail?id=${item.id}`" class="item" :style="item.receiptStatus === 1 ? 'opacity: 0.7' : ''">
+			<navigator hover-class="none" :url="`/pages2/msg/detail?id=${item.id}&orderGoodsId=${item.orderGoodsId}&goodsId=${item.goodsId}`" class="item" :style="item.receiptStatus === 1 ? 'opacity: 0.7' : ''">
 				<view style="display: flex;justify-content: space-between;align-items: center;height: 60rpx;">
 					<view style="color: #333333;font-size: 30rpx;font-weight: bold;display: flex;align-items: center;">
 						<image :src="item.systemStatus === 1 ? img1 : img2" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"></image>

+ 1 - 1
pages2/order/confirm_success.vue

@@ -102,7 +102,7 @@ export default {
 		// 继续本次的考试预约
 		gots(){
 			uni.redirectTo({
-			    url: `/pages2/appointment/index?goodsId=${this.getDatas.goodsId}&gradeId=${this.getDatas.gradeId}`
+			    url: `/pages2/appointment/index?goodsId=${this.getDatas.goodsId}&gradeId=${this.getDatas.gradeId}&orderGoodsId=${this.getDatas.orderGoodsId}`
 			});
 		},
 		goCourse(){

+ 3 - 3
pages2/subject/wrongBank.vue

@@ -644,7 +644,7 @@ export default {
 			} else {
 				this.$api.wrongRecordDelete({
 					"examId": this.questionList[bindex].examId,
-					"goodsId": this.questionList[bindex].goodsId,
+					"orderGoodsId": this.questionList[bindex].orderGoodsId,
 					"questionId": this.questionList[bindex].questionId,
 				}).then(res => {
 					
@@ -723,7 +723,7 @@ export default {
 				if(question) {
 					this.$api.wrongRecordDelete({
 						"examId": question.examId,
-						"goodsId": question.goodsId,
+						"orderGoodsId": question.orderGoodsId,
 						"questionId": question.questionId,
 					}).then(res => {
 						
@@ -768,7 +768,7 @@ export default {
 
 					this.$api.wrongRecordDelete({
 						"examId": this.questionList[bindex].examId,
-						"goodsId": this.questionList[bindex].goodsId,
+						"orderGoodsId": this.questionList[bindex].orderGoodsId,
 						"questionId": this.questionList[bindex].questionId,
 					}).then(res => {
 						

+ 3 - 3
pages2/subject/wrongTypeBank.vue

@@ -526,7 +526,7 @@ export default {
 			} else {
 				this.$api.wrongRecordDelete({
 					"examId": this.questionList[bindex].examId,
-					"goodsId": this.questionList[bindex].goodsId,
+					"orderGoodsId": this.questionList[bindex].orderGoodsId,
 					"questionId": this.questionList[bindex].questionId,
 				}).then(res => {
 					
@@ -604,7 +604,7 @@ export default {
 				if(question) {
 					this.$api.wrongRecordDelete({
 						"examId": question.examId,
-						"goodsId": question.goodsId,
+						"orderGoodsId": question.orderGoodsId,
 						"questionId": question.questionId,
 					}).then(res => {
 						
@@ -649,7 +649,7 @@ export default {
 			
 					this.$api.wrongRecordDelete({
 						"examId": this.questionList[bindex].examId,
-						"goodsId": this.questionList[bindex].goodsId,
+						"orderGoodsId": this.questionList[bindex].orderGoodsId,
 						"questionId": this.questionList[bindex].questionId,
 					}).then(res => {
 						

+ 3 - 1
pages2/verify/input.vue

@@ -557,7 +557,9 @@ export default {
 		getGoodsDetail() {
 			return new Promise(resolve => {
 				
-				this.$api.goodsDetail(this.goodsId).then(res => {
+				this.$api.orderInfo({
+					orderGoodsId:this.orderGoodsId
+				}).then(res => {
 					this.goodsData = res.data.data;
 					if(this.goodsData.categoryName) {
 						this.form.apply_post = this.goodsData.categoryName;

+ 10 - 4
pages2/wd/info.vue

@@ -15,11 +15,11 @@
 						<view>{{form.nickname}}<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
 					</view>
 					<view>
-						<picker @change="bindPickerChangeSex" :value="form.sex" :range="array_sex">
+						<picker @change="bindPickerChangeSex" :value="form.sex-1" range-key="key" :range="array_sex">
 							<view class="item">
 								<view>性别</view>
 								<view class="rBox">
-									<view class="picker">{{ array_sex[form.sex] }}</view>
+									<view class="picker">{{ array_sex[form.sex-1].key }}</view>
 									<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
 								</view>
 							</view>
@@ -124,7 +124,13 @@ export default {
 				tel:'',
 				code:'',
 			},
-			array_sex: ['男', '女'],
+			array_sex: [{
+				key:'男',
+				value:1,
+			},{
+				key:'女',
+				value:2,
+			}],
 			n_show:false,
 			defaultRegionCode: '440112',
 			id_show:false,
@@ -185,7 +191,7 @@ export default {
 			}
 		},
 		bindPickerChangeSex(e) {
-			let data = {sex:e.detail.value}
+			let data = {sex:+e.detail.value+1}
 			this.submitForm(data)
 		},
 		uploadFile(options, int) {

+ 5 - 4
pages3/course/detail.vue

@@ -58,9 +58,9 @@
 						</view>
 						<view v-show="!item.down">
 							<view v-for="(itemM,indexM) in item.menuList"  :key="indexM">
-								<courseModule :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==1" :menuItem="itemM"></courseModule>
-								<courseChapter :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==2" :isBuy="false" :menuItem="itemM"></courseChapter>
-								<courseSection v-if="itemM.type==3" :isBuy="false" :menuItem="itemM"></courseSection>
+								<courseModule :courseId="itemM.courseId" :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==1" :menuItem="itemM"></courseModule>
+								<courseChapter :courseId="itemM.courseId" :needOpen="(isFirstEnter && menuIndex[0] === index && menuIndex[1] === indexM) ? true : false" v-if="itemM.type==2" :isBuy="false" :menuItem="itemM"></courseChapter>
+								<courseSection :courseId="itemM.courseId" v-if="itemM.type==3" :isBuy="false" :menuItem="itemM"></courseSection>
 								<u-line></u-line>
 								
 							</view>
@@ -134,10 +134,11 @@ export default {
 	mounted() {
 		let self = this
 		uni.$on('getSection', item => {
+			console.log(item)
 			//播放试听
 			self.listenSecond = 0
 			for (var itemChild of self.listenConfigList) {
-				if(itemChild.sectionId==self.playSectionId){
+				if(self.playSectionId == (itemChild.sectionId || itemChild.menuId) && item.courseId == itemChild.courseId){
 					if(itemChild.auditionMinute>0){
 				//		self.listenSecond = itemChild.auditionMinute *60 //试听秒数
 						self.listenSecond = itemChild.auditionMinute //试听秒数 auditionMinute调整为秒单位

+ 23 - 3
pages3/polyv/detail.vue

@@ -185,7 +185,7 @@
           <view v-if="noteList.length == 0" style="text-align: center"
             >暂无笔记</view
           >
-          <view class="inputBottom" v-if="!(isPlayRebuild > 0)">
+          <view class="inputBottom" v-if="!(isPlayRebuild > 0) && playChannelId ==0">
             <view style="width: 10%"
               ><image
                 src="/static/icon/note3.png"
@@ -264,8 +264,10 @@
               <u-input
                 height="60"
                 fixed="true"
+								:focus="isFocus"
                 :placeholder="placeholder"
                 type="input"
+								@blur="blur"
                 :custom-style="inputStyle"
                 v-model="ctxValue"
               />
@@ -510,6 +512,7 @@ export default {
   },
   data() {
     return {
+			hasStart:false,
 			channelItem:null,
       lockTimer: null,
       orderGoodsId: 0,
@@ -594,6 +597,8 @@ export default {
       uploadLock: false, //上传图片
       isPlayRebuild: false, //是否正在播放重修视频
       isRebuild: false, //视频是否从重修目录点击
+			isFocus:false,
+			clearTimer:null,
     };
   },
   computed: {
@@ -769,7 +774,7 @@ export default {
 		
 	},
   onUnload() {
-    if (this.playSectionId > 0) {
+    if (this.playSectionId > 0 && this.hasStart) {
       //退出提交记录
       this.postStudyRecord();
     }
@@ -800,6 +805,7 @@ export default {
   mounted() {
     uni.$on("changeSection", (oldSectionId) => {
       console.log(this.playVID);
+				this.hasStart = false;
       this.photoConfig = false;
       this.photoIndex = 0;
       var polyvPlayerContext = this.selectComponent("#playerVideo");
@@ -814,6 +820,7 @@ export default {
     });
     uni.$on("getSection", (item) => {
       //清除直播
+				this.hasStart = false;
       this.isPlayRebuild = item.rebuild;
       this.photoConfig = false;
       this.photoIndex = 0;
@@ -831,6 +838,7 @@ export default {
     });
     uni.$on("getChannel", (item) => {
       //清除录播
+				this.hasStart = false;
       this.$store.commit("setPlayVID", { playVID: null });
       this.playChannel(item);
 			this.channelItem = item;
@@ -1062,7 +1070,7 @@ export default {
     },
 		loadedmetadata(e) {
 			var polyvPlayerContext = this.selectComponent("#playerVideo");
-			
+			this.hasStart = true;
 			uni.$off('playPause')
 			uni.$on('playPause',() => {
 				polyvPlayerContext.pause()
@@ -1288,6 +1296,7 @@ export default {
         this.timer = setInterval(this.timeEventLiving, 1000); //定时器
       }
       if (status === "end") {
+				this.hasStart = false;
         if (this.livePlay) {
           //只有播放过的结束才提交,避免未开播触发结束
           this.postStudyRecord(1);
@@ -1587,7 +1596,16 @@ export default {
       this.ctxValue = "";
       this.assignUserId = 0;
     },
+		blur() {
+			this.clearTimer = setTimeout(() => {
+				this.ctxValue = ""
+				this.isFocus = false;
+				this.assignUserId = 0;
+				this.placeholder = '您可以在这里输入答疑内容';
+			},2000)
+		},
     replyContent(item) {
+			this.isFocus = true;
       this.assignUserId = item.userId;
       this.placeholder = "@" + item.realname;
     },
@@ -1609,6 +1627,7 @@ export default {
         if (res.data.code == 200) {
           this.$u.toast("发布成功");
           self.getAnswerList();
+					this.isFocus = false;
           this.placeholder = "您可以在这里输入答疑内容";
           this.ctxValue = "";
           this.assignUserId = 0;
@@ -1870,6 +1889,7 @@ export default {
           icon: "none",
           title: "播放完毕",
         });
+				this.hasStart = false;
         this.postStudyRecord(1);
         // uni.$emit('playNext') //播放重修下一节
       }