소스 검색

消息跳播放

he2802 3 년 전
부모
커밋
c0129f0c1a
5개의 변경된 파일12개의 추가작업 그리고 9개의 파일을 삭제
  1. 2 2
      pages2/bank/questionBank.vue
  2. 2 2
      pages2/class/questionBank.vue
  3. 1 1
      pages2/course/detail.vue
  4. 4 4
      pages2/wd/class.vue
  5. 3 0
      pages2/wd/course.vue

+ 2 - 2
pages2/bank/questionBank.vue

@@ -596,7 +596,7 @@ export default {
 									return false;
 								}
 							} else if (jsonItem.type == 5) {
-								if (item.ques[indexs].text.length || item.ques[indexs].imageList.length) {
+								if (item.ques[indexs] && (item.ques[indexs].text.length || item.ques[indexs].imageList.length)) {
 									return true;
 								} else {
 									return false;
@@ -613,7 +613,7 @@ export default {
 					//简答题
 					if(hasSpecail) {
 						
-						if (item.ansText.text.length || item.ansText.imageList.length) {
+						if (item.ansText && (item.ansText.text.length || item.ansText.imageList.length)) {
 							count++;
 						}
 					}

+ 2 - 2
pages2/class/questionBank.vue

@@ -730,7 +730,7 @@ export default {
 								}
 							} else if (jsonItem.type == 5) {
 								console.log(jsonItem, 111);
-								if (item.ques[indexs].text.length || item.ques[indexs].imageList.length) {
+								if (item.ques[indexs] && (item.ques[indexs].text.length || item.ques[indexs].imageList.length)) {
 									return true;
 								} else {
 									return false;
@@ -747,7 +747,7 @@ export default {
 					//简答题
 					if(hasSpecail) {
 						
-						if (item.ansText.text.length || item.ansText.imageList.length) {
+						if (item.ansText && (item.ansText.text.length || item.ansText.imageList.length)) {
 							count++;
 						}
 					}

+ 1 - 1
pages2/course/detail.vue

@@ -40,7 +40,7 @@
 			
 		</view>
 		<view style="padding: 20rpx;position: relative;top: 680rpx;" v-show="current==0">
-			<view class="content" style="padding: 10rpx;">
+			<view class="content">
 				<view v-html="detail.mobileDetailHtml" style="width: 100%;overflow: hidden;"></view>
 			</view>
 		</view>

+ 4 - 4
pages2/wd/class.vue

@@ -1,6 +1,6 @@
 <template>
 	<view style="padding: 30rpx;">
-		<navigator  hover-class="none" :url="'/pages2/wd/course?id=' + item.goodsId" v-for="(item, index) in goodsList" :key="index" style="margin-bottom: 30rpx;">
+		<navigator  hover-class="none" :url="`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}`" v-for="(item, index) in goodsList" :key="index" style="margin-bottom: 30rpx;">
 			<view class="class_item">
 				<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
 				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">{{ item.goodsName }}</view>
@@ -27,7 +27,7 @@
 				</view>
 				<view class="box_progress">
 					<view style="width: 60%;"><u-line-progress :showText="false" active-color="#ff9900" :show-percent="false" :percent="(item.stuAllNum / item.secAllNum) * 100"></u-line-progress></view>
-					<view><u-button type="warning" size="mini" @click.stop="studyIn(item.goodsId)">进入学习</u-button></view>
+					<view><u-button type="warning" size="mini" @click.stop="studyIn(item.goodsId,item.gradeId)">进入学习</u-button></view>
 				</view>
 				<view class="box_progress" v-if="item.applyStatus === 1">
 					<view style="width: 60%;">
@@ -98,8 +98,8 @@ export default {
 				}
 			});
 		},
-		studyIn(v) {
-			this.$navTo.togo('/pages2/wd/course?id=' + v);
+		studyIn(v,i) {
+			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}`);
 		},
 		appointment(item) {
 			var data = {

+ 3 - 0
pages2/wd/course.vue

@@ -27,6 +27,7 @@ export default {
 	data() {
 		return {
 			goodsId: 0,
+			gradeId:0,
 			courseList: [],
 			param:{
 				pageNum: 1,
@@ -38,6 +39,7 @@ export default {
 	},
 	onLoad(option) {
 		this.goodsId = Number(option.id);
+		this.gradeId = Number(option.gid)
 		// uni.setStorageSync('courseGoodsId', this.goodsId);
 		this.courseCourseList();
 		this.$store.getters.dictObj
@@ -65,6 +67,7 @@ export default {
 		courseCourseList() {
 			let self = this;
 			this.param.goodsId =this.goodsId
+			this.param.gradeId = this.gradeId
 			this.$api.courseCourseList(this.param).then(res => {
 				if (res.data.code == 200) {
 					self.courseList.push.apply(self.courseList, res.data.rows);