Explorar o código

Merge branch 'dev' of http://120.79.166.78:19005/zhongzheng-edu/saas_miniprogram into dev

# Conflicts:
#	pages5/mockExam/registrationSuccess.vue
xiexaing hai 1 ano
pai
achega
f38cdaa21c

+ 2 - 2
common/request.js

@@ -107,7 +107,7 @@ export const myRequest = (options) => {
 					resolve(res);
 					// #endif
 					// #ifdef H5
-					window.open(res.data.msg)
+					window.location.href = res.data.msg
 					reject();
 					// #endif
 				}
@@ -116,7 +116,7 @@ export const myRequest = (options) => {
 			fail: (err) => {
 				uni.hideLoading();
 				uni.showToast({
-					title: "请求接口失败",
+					title: "系统升级中",
 					icon: "none",
 				});
 				console.log("请求失败err---: ", options.url);

+ 240 - 257
components/course/answerBox.vue

@@ -1,277 +1,260 @@
 <template>
-  <view class="Answering">
-    <view
-      v-for="(item, index) in answerList"
-      :key="index"
-      style="background-color: #ffffff"
-      class="answer_item"
-    >
-      <view class="chat_box" @click.stop="clearCtx">
-        <view style="display: flex; flex: 1">
-          <view
-            ><image
-              :src="
+	<view class="Answering">
+		<view v-for="(item, index) in answerList" :key="index" style="background-color: #ffffff" class="answer_item">
+			<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">{{
+              " 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">{{
+						<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 != userId"
-          >回复</view
-        >
-        <view v-else class="btnDel" @click.stop="delAnswer(item.answerId)"
-          >删除</view
-        >
-      </view>
-      <u-line color="#D6D6DB" />
-    </view>
-    <view v-if="answerList.length == 0" style="text-align: center"
-      >暂无记录</view
-    >
-    <view class="inputBottom" :style="{ bottom: bottomHeight + 'px' }">
-      <view class="flex_auto">
-        <input
-          v-model="ctxValue"
-          height="60"
-          fixed="true"
-          :focus="isFocus"
-          :placeholder="placeholder"
-          type="text"
-          :custom-style="inputStyle"
-          :adjust-position="false"
-          class="input"
-          @focus="focusNote"
-          @blur="blur"
-        />
-      </view>
-      <view class="btn" @click="postContent">提交</view>
-    </view>
-  </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 != userId">回复</view>
+				<view v-else class="btnDel" @click.stop="delAnswer(item.answerId)">删除</view>
+			</view>
+			<u-line color="#D6D6DB" />
+		</view>
+		<view v-if="answerList.length == 0" style="text-align: center">暂无记录</view>
+		<view class="inputBottom" :style="{ bottom: bottomHeight + 'px' }">
+			<view class="flex_auto">
+				<input v-model="ctxValue" height="60" fixed="true" :focus="isFocus" :placeholder="placeholder"
+					type="text" :custom-style="inputStyle" :adjust-position="false" class="input" @focus="focusNote"
+					@blur="blur" />
+			</view>
+			<view class="btn" @click="postContent">提交</view>
+		</view>
+	</view>
 </template>
 
 <script>
-export default {
-  name: "SaasMiniprogramAnswerBox",
-  props: {
-    userId: {
-      type: Number,
-      defaule: 0,
-    },
-  },
-  inject: ["paramsFn"],
-  data() {
-    return {
-      answerList: [],
-      ctxValue: "",
-      isFocus: false,
-      placeholder: "您可以在这里输入答疑内容",
-      inputStyle: {
-        background: "rgba(244, 244, 244, 0.98)",
-        borderRadius: "24rpx",
-        padding: "8rpx",
-        marginBottom: "10rpx",
-      },
-      bottomHeight: 0,
-      assignUserId: 0,
-    };
-  },
+	export default {
+		name: "SaasMiniprogramAnswerBox",
+		props: {
+			userId: {
+				type: Number,
+				defaule: 0,
+			},
+		},
+		inject: ["paramsFn"],
+		data() {
+			return {
+				answerList: [],
+				ctxValue: "",
+				isFocus: false,
+				placeholder: "您可以在这里输入答疑内容",
+				inputStyle: {
+					background: "rgba(244, 244, 244, 0.98)",
+					borderRadius: "24rpx",
+					padding: "8rpx",
+					marginBottom: "10rpx",
+				},
+				bottomHeight: 0,
+				assignUserId: 0,
+			};
+		},
 
-  mounted() {
-    this.getAnswerList();
-  },
+		mounted() {
+			this.getAnswerList();
+		},
 
-  methods: {
-    postContent() {
-      if (!this.ctxValue || this.ctxValue == "") {
-        this.$u.toast("请输入内容");
-        return;
-      }
-      this.postAnswer();
-    },
-    blur() {
-      this.bottomHeight = 0;
-      this.clearTimer = setTimeout(() => {
-        this.ctxValue = "";
-        this.isFocus = false;
-        this.assignUserId = 0;
-        this.placeholder = "您可以在这里输入答疑内容";
-      }, 2000);
-    },
-    focusNote(event) {
-      this.bottomHeight = event.detail.height;
-    },
-    getAnswerList() {
-      this.$api.answerList(this.params).then((res) => {
-        if (res.data.code == 200) {
-          this.answerList = res.data.rows;
-        }
-      });
-    },
-    postAnswer() {
-      let self = this;
-      let data = {
-        answerText: this.ctxValue,
-        ...this.params,
-      };
-      if (this.assignUserId > 0) {
-        data.assignUserId = this.assignUserId;
-      }
-      this.$api.postAnswer(data).then((res) => {
-        if (res.data.code == 200) {
-          this.$u.toast("发布成功");
-          self.getAnswerList();
-          this.isFocus = false;
-          this.placeholder = "您可以在这里输入答疑内容";
-          this.ctxValue = "";
-          this.assignUserId = 0;
-        }
-      });
-    },
-    delAnswer(answerId) {
-      this.$api
-        .delAnswer({
-          answerId: answerId,
-          status: -1,
-          orderGoodsId: this.params.orderGoodsId,
-        })
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.getAnswerList();
-          }
-        });
-    },
-    clearCtx() {
-      this.placeholder = "您可以在这里输入答疑内容";
-      this.ctxValue = "";
-      this.assignUserId = 0;
-    },
-    replyContent(item) {
-      this.isFocus = true;
-      this.assignUserId = item.userId;
-      this.placeholder = "@" + item.realname;
-    },
-  },
-  computed: {
-    params() {
-      return this.paramsFn(["orderGoodsId", "goodsId", "courseId", "gradeId"]);
-    },
-  },
-};
+		methods: {
+			postContent() {
+				if (!this.ctxValue || this.ctxValue == "") {
+					this.$u.toast("请输入内容");
+					return;
+				}
+				this.postAnswer();
+			},
+			blur() {
+				this.bottomHeight = 0;
+				this.clearTimer = setTimeout(() => {
+					this.ctxValue = "";
+					this.isFocus = false;
+					this.assignUserId = 0;
+					this.placeholder = "您可以在这里输入答疑内容";
+				}, 2000);
+			},
+			focusNote(event) {
+				this.bottomHeight = event.detail.height;
+			},
+			getAnswerList() {
+				this.$api.answerList(this.params).then((res) => {
+					if (res.data.code == 200) {
+						this.answerList = res.data.rows;
+					}
+				});
+			},
+			postAnswer() {
+				let self = this;
+				let data = {
+					answerText: this.ctxValue,
+					...this.params,
+				};
+				if (this.assignUserId > 0) {
+					data.assignUserId = this.assignUserId;
+				}
+				this.$api.postAnswer(data).then((res) => {
+					if (res.data.code == 200) {
+						this.$u.toast("发布成功");
+						self.getAnswerList();
+						this.isFocus = false;
+						this.placeholder = "您可以在这里输入答疑内容";
+						this.ctxValue = "";
+						this.assignUserId = 0;
+					}
+				});
+			},
+			delAnswer(answerId) {
+				this.$api
+					.delAnswer({
+						answerId: answerId,
+						status: -1,
+						orderGoodsId: this.params.orderGoodsId,
+					})
+					.then((res) => {
+						if (res.data.code == 200) {
+							this.getAnswerList();
+						}
+					});
+			},
+			clearCtx() {
+				this.placeholder = "您可以在这里输入答疑内容";
+				this.ctxValue = "";
+				this.assignUserId = 0;
+			},
+			replyContent(item) {
+				this.isFocus = true;
+				this.assignUserId = item.userId;
+				this.placeholder = "@" + item.realname;
+			},
+		},
+		computed: {
+			params() {
+				return this.paramsFn(["orderGoodsId", "goodsId", "courseId", "gradeId", "moduleId", "chapterId",
+					"sectionId"
+				])
+			},
+		},
+	};
 </script>
 
 <style lang="scss" scoped>
-.Answering {
-  .answer_item {
-    &:nth-child(2) {
-      border-radius: 16rpx 16rpx 0rpx 0rpx;
-    }
-    &:nth-last-child(1) {
-      border-radius: 0rpx 0rpx 16rpx 16rpx;
-    }
-  }
-}
-.chat_box {
-  display: flex;
-  padding: 20rpx;
-  justify-content: space-between;
-}
-.chat3 {
-  font-size: 30rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  color: #666666;
-  margin-top: 10rpx;
-}
-.chat2 {
-  font-size: 20rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  color: #999999;
-  margin-top: 10rpx;
-}
-.chat1 {
-  font-size: 24rpx;
-  font-family: PingFang SC;
-  font-weight: 500;
-  color: #333333;
-}
-.btnReply {
-  width: 80rpx;
-  height: 40rpx;
-  background: #e3f0ff;
-  border-radius: 16rpx;
-  text-align: center;
-  color: #007aff;
-}
-.btnDel {
-  width: 80rpx;
-  height: 40rpx;
-  background: #ffedf0;
-  border-radius: 16rpx;
-  text-align: center;
-  color: #ff2d55;
-}
-.btnReply {
-  width: 80rpx;
-  height: 40rpx;
-  background: #e3f0ff;
-  border-radius: 16rpx;
-  font-size: 24rpx;
-}
-.inputBottom {
-  position: fixed;
-  left: 0;
-  bottom: 0;
-  background: #ffffff;
-  height: 98rpx;
-  display: flex;
-  align-items: center;
-  width: 100%;
+	.Answering {
+		.answer_item {
+			&:nth-child(2) {
+				border-radius: 16rpx 16rpx 0rpx 0rpx;
+			}
 
-  .flex_auto {
-    flex: 1;
-    margin-left: 10%;
-    word-break: break-all;
-    // .input {
-    //   height: 60rpx;
-    // }
-  }
+			&:nth-last-child(1) {
+				border-radius: 0rpx 0rpx 16rpx 16rpx;
+			}
+		}
+	}
 
-  .btn {
-    color: #007aff;
-    font-size: 30rpx;
-    font-weight: bold;
-    width: 15%;
-    text-align: center;
-  }
-  .input {
-    background: rgba(244, 244, 244, 0.98);
-    height: 60rpx;
-    border-radius: 24rpx;
-    margin-top: 12rpx;
-  }
-}
-</style>
+	.chat_box {
+		display: flex;
+		padding: 20rpx;
+		justify-content: space-between;
+	}
+
+	.chat3 {
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+		margin-top: 10rpx;
+	}
+
+	.chat2 {
+		font-size: 20rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+		margin-top: 10rpx;
+	}
+
+	.chat1 {
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+	}
+
+	.btnReply {
+		width: 80rpx;
+		height: 40rpx;
+		background: #e3f0ff;
+		border-radius: 16rpx;
+		text-align: center;
+		color: #007aff;
+	}
+
+	.btnDel {
+		width: 80rpx;
+		height: 40rpx;
+		background: #ffedf0;
+		border-radius: 16rpx;
+		text-align: center;
+		color: #ff2d55;
+	}
+
+	.btnReply {
+		width: 80rpx;
+		height: 40rpx;
+		background: #e3f0ff;
+		border-radius: 16rpx;
+		font-size: 24rpx;
+	}
+
+	.inputBottom {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		background: #ffffff;
+		height: 98rpx;
+		display: flex;
+		align-items: center;
+		width: 100%;
+
+		.flex_auto {
+			flex: 1;
+			margin-left: 10%;
+			word-break: break-all;
+			// .input {
+			//   height: 60rpx;
+			// }
+		}
+
+		.btn {
+			color: #007aff;
+			font-size: 30rpx;
+			font-weight: bold;
+			width: 15%;
+			text-align: center;
+		}
+
+		.input {
+			background: rgba(244, 244, 244, 0.98);
+			height: 60rpx;
+			border-radius: 24rpx;
+			margin-top: 12rpx;
+		}
+	}
+</style>

+ 742 - 771
components/course/courseSection.vue

@@ -1,790 +1,761 @@
 <template>
-  <view
-    style="display: flex; justify-content: space-between; align-items: center"
-    @click="getVideo"
-  >
-    <view
-      style="
+	<view style="display: flex; justify-content: space-between; align-items: center" @click="getVideo">
+		<view style="
         display: flex;
         justify-content: space-between;
         align-items: center;
         margin: 20rpx 0;
         width: 100%;
-      "
-    >
-      <view style="display: flex; align-items: center; flex: 1">
-        <view class="tag tagColor1" v-if="menuItem.sectionType == 1">视频</view>
-        <view class="tag tagColor2" v-if="menuItem.sectionType == 2">直播</view>
-        <view class="tag tagColor3" v-if="menuItem.sectionType == 3">回放</view>
-        <view class="t_content">
-          <view
-            v-if="menuItem.sectionType == 1"
-            :class="{ color1: isActive }"
-            >{{ menuItem.name || "" }}</view
-          >
-          <view
-            v-if="menuItem.sectionType == 2"
-            :class="{ color2: isActive }"
-            >{{ menuItem.name || "" }}</view
-          >
-          <view
-            v-if="menuItem.sectionType == 3"
-            :class="{ color3: isActive }"
-            >{{ menuItem.name || "" }}</view
-          >
-          <view
-            style="font-size: 20rpx; color: #ff3b30"
-            v-if="menuItem.sectionType == 2 && menuItem.liveStartTime"
-          >
-            <view v-if="menuItem.liveStartTime > nowTime || !isBuy">
-              <text>{{
+      ">
+			<view style="display: flex; align-items: center; flex: 1">
+				<view class="tag tagColor1" v-if="menuItem.sectionType == 1">视频</view>
+				<view class="tag tagColor2" v-if="menuItem.sectionType == 2">直播</view>
+				<view class="tag tagColor3" v-if="menuItem.sectionType == 3">回放</view>
+				<view class="t_content">
+					<view v-if="menuItem.sectionType == 1" :class="{ color1: isActive }">{{ menuItem.name || "" }}
+					</view>
+					<view v-if="menuItem.sectionType == 2" :class="{ color2: isActive }">{{ menuItem.name || "" }}
+					</view>
+					<view v-if="menuItem.sectionType == 3" :class="{ color3: isActive }">{{ menuItem.name || "" }}
+					</view>
+					<view style="font-size: 20rpx; color: #ff3b30"
+						v-if="menuItem.sectionType == 2 && menuItem.liveStartTime">
+						<view v-if="menuItem.liveStartTime > nowTime || !isBuy">
+							<text>{{
                 $method.timestampToTime(menuItem.liveStartTime, (isDay = false))
-              }}</text
-              >-
-              <text>{{
+              }}</text>-
+							<text>{{
                 $method.timestampToTime(menuItem.liveEndTime, (isDay = false))
               }}</text>
-            </view>
-            <template v-if="isLast()">
-              <view v-if="liveLast.watchStatus == 'live'">
-                <text>直播中</text>
-              </view>
-              <view v-if="liveLast.watchStatus == 'end'">
-                <text>当前直播回放视频请稍后再查看</text>
-              </view>
-            </template>
-          </view>
-          <view
-            style="font-size: 20rpx; color: #ff3b30"
-            v-if="menuItem.sectionType == 3"
-          >
-            <view v-if="!menuItem.recordingUrl">
-              <text>当前直播回放视频请稍后再查看</text>
-            </view>
-            <view v-else> 回放中 </view>
-          </view>
-        </view>
-        <view v-if="menuItem.sectionType == null">{{
+						</view>
+						<template v-if="isLast()">
+							<view v-if="liveLast.watchStatus == 'live'">
+								<text>直播中</text>
+							</view>
+							<view v-if="liveLast.watchStatus == 'end'">
+								<text>当前直播回放视频请稍后再查看</text>
+							</view>
+						</template>
+					</view>
+					<view style="font-size: 20rpx; color: #ff3b30" v-if="menuItem.sectionType == 3">
+						<view v-if="!menuItem.recordingUrl">
+							<text>当前直播回放视频请稍后再查看</text>
+						</view>
+						<view v-else> 回放中 </view>
+					</view>
+				</view>
+				<view v-if="menuItem.sectionType == null">{{
           menuItem.name || ""
         }}</view>
-        <!-- 学习中 -->
-        <view v-if="isActive" class="learnings">
-          <image
-            src="/pages3/static/imgs/learning_icon.gif"
-            class="learning_icon"
-          ></image>
-        </view>
-      </view>
-      <view
-        style="font-size: 20rpx; color: #ff3b30"
-        v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy"
-      >
-        <template v-if="!isLast() && !isLive">
-          <view class="tagWillPlay" v-if="menuItem.liveStartTime > nowTime">
-            <text>待开播</text>
-          </view>
-          <view
-            class="tagPlaying"
-            v-if="
+				<!-- 学习中 -->
+				<view v-if="isActive" class="learnings">
+					<image src="/pages3/static/imgs/learning_icon.gif" class="learning_icon"></image>
+				</view>
+			</view>
+			<view style="font-size: 20rpx; color: #ff3b30"
+				v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy">
+				<template v-if="!isLast() && !isLive">
+					<view class="tagWillPlay" v-if="menuItem.liveStartTime > nowTime">
+						<text>待开播</text>
+					</view>
+					<view class="tagPlaying" v-if="
               menuItem.liveStartTime <= nowTime &&
               menuItem.liveEndTime > nowTime
-            "
-          >
-            <text>直播中</text>
-          </view>
-          <view class="tagPlayed" v-if="menuItem.liveEndTime < nowTime">
-            <text>已结束</text>
-          </view>
-        </template>
-      </view>
-      <!-- 直播课程没有学习状态 -->
-      <template v-if="!isLive">
-        <view v-if="isRebuild || menuItem.rebuild > 0" class="tagRe"
-          >待重修</view
-        >
-        <view v-else>
-          <view v-if="menuItem.learning == 1" class="tagGreen">已学完</view>
-        </view>
-      </template>
-
-      <view
-        v-if="checkTest()"
-        class="exercises"
-        @click.stop="toDoSectionExam()"
-      >
-        <text class="exe_w">习题</text>
-        <u-icon name="arrow-right" color="#498AFE" size="28"></u-icon>
-      </view>
-    </view>
-    <view v-if="isTryListen" class="tryBox"> 试看 </view>
-  </view>
+            ">
+						<text>直播中</text>
+					</view>
+					<view class="tagPlayed" v-if="menuItem.liveEndTime < nowTime">
+						<text>已结束</text>
+					</view>
+				</template>
+			</view>
+			<!-- 直播课程没有学习状态 -->
+			<template v-if="!isLive">
+				<view v-if="isRebuild || menuItem.rebuild > 0" class="tagRe">待重修</view>
+				<view v-else>
+					<view v-if="menuItem.learning == 1" class="tagGreen">已学完</view>
+				</view>
+			</template>
+
+			<view v-if="checkTest()" class="exercises" @click.stop="toDoSectionExam()">
+				<text class="exe_w">习题</text>
+				<u-icon name="arrow-right" color="#498AFE" size="28"></u-icon>
+			</view>
+		</view>
+		<view v-if="isTryListen" class="tryBox"> 试看 </view>
+	</view>
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-export default {
-  name: "courseSection",
-  inject: ["paramsFn"],
-  props: {
-    isLive: false, //是否是直播课
-    preItem: {
-      default: undefined,
-    },
-
-    menuItem: {
-      type: Object,
-      default: {},
-    },
-    isBuy: {
-      type: Boolean,
-      default: false,
-    },
-    levelId: {
-      type: String,
-      default: "",
-    },
-    isRebuild: {
-      type: Boolean,
-      default: false,
-    },
-
-    nextMenuItem: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-    sectionMaxNum: {
-      default: undefined,
-    },
-    // 章->所有节试卷列表
-    ChapterSectionExam: {
-      type: Array,
-      default: () => [],
-    },
-    // 区分是模块试卷还是章试卷,3是模块试卷
-    testType: {
-      type: Number,
-      default: 0,
-    },
-  },
-  watch: {
-    menuItem(val) {
-      console.log(val, "val");
-    },
-  },
-  data() {
-    return {
-      nowTime: 0,
-      playId: "",
-      clickLock: false, //点击锁,防止连续点击多次
-      moduleSectionExam: [], // 模块下的所有节试卷列表
-      chapterExams: {},
-      moduleExams: {},
-      // newMenuAllList: [],
-    };
-  },
-  onLoad() {},
-  created() {
-    if (this.testType == 3) {
-      // 模块下的所有节试卷列表
-      this.$api
-        .reSectionExamList({
-          chapterId: 0,
-          courseId: this.courseId,
-          gradeId: this.gradeId,
-          orderGoodsId: this.orderGoodsId,
-        })
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.moduleSectionExam = res.data.data || [];
-          }
-        });
-    }
-  },
-  mounted() {
-    this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
-
-    this.isBuy &&
-      uni.$on("playEnd", () => {
-        if (this.isActive) {
-          this.$emit("playEnd");
-        }
-      });
-  },
-  methods: {
-    isLast() {
-      if (this.liveLast) {
-        let sectionASame =
-          this.liveLast.sectionId ==
-          (this.menuItem.sectionId || this.menuItem.menuId);
-        let chapterSame =
-          this.liveLast.chapterId == (this.menuItem.chapterId || 0);
-        let moduleSame =
-          this.liveLast.moduleId == (this.menuItem.moduleId || 0);
-        return sectionASame && chapterSame && moduleSame;
-      } else {
-        return false;
-      }
-    },
-    toDoSectionExam() {
-      if (this.testType == 3) {
-        this.ModuleExam();
-      } else {
-        this.ChapterExam();
-      }
-    },
-    checkTest() {
-      let data =
-        this.testType == 3 ? this.moduleSectionExam : this.ChapterSectionExam;
-      let id =
-        this.testType == 3 ? this.menuItem.menuId : this.menuItem.sectionId;
-      if (!data) {
-        return false;
-      }
-      return data.some((e) => e.sectionId == id);
-    },
-    ChapterExam() {
-      this.chapterExams = this.ChapterSectionExam.find(
-        (e) => e.sectionId == this.menuItem.sectionId
-      );
-      let moduleId = this.chapterExams.moduleId || 0;
-      let chapterId = this.chapterExams.chapterId || 0;
-      let sectionId = this.chapterExams.sectionId || this.chapterExams.menuId;
-      uni.navigateTo({
-        url:
-          "/pages2/class/questionBank?courseId=" +
-          this.courseId +
-          "&gradeId=" +
-          this.gradeId +
-          "&isFromVideo=1&id=" +
-          this.chapterExams.typeId +
-          "&goodsid=" +
-          this.goodsId +
-          "&moduleId=" +
-          moduleId +
-          "&chapterId=" +
-          chapterId +
-          "&sectionId=" +
-          sectionId +
-          "&orderGoodsId=" +
-          this.orderGoodsId +
-          "&type=2",
-      });
-    },
-    ModuleExam() {
-      let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-      this.moduleExams = this.moduleSectionExam.find(
-        (e) => e.sectionId == sectionId
-      );
-      let moduleId = this.moduleExams.moduleId || 0;
-      let chapterId = this.moduleExams.chapterId || 0;
-
-      uni.navigateTo({
-        url:
-          "/pages2/class/questionBank?courseId=" +
-          this.courseId +
-          "&gradeId=" +
-          this.gradeId +
-          "&isFromVideo=1&id=" +
-          this.moduleExams.typeId +
-          "&goodsid=" +
-          this.goodsId +
-          "&moduleId=" +
-          moduleId +
-          "&chapterId=" +
-          chapterId +
-          "&sectionId=" +
-          sectionId +
-          "&orderGoodsId=" +
-          this.orderGoodsId +
-          "&type=2",
-      });
-    },
-    gradeCheckGoodsStudy() {
-      return new Promise((resolve) => {
-        this.$api
-          .gradeCheckGoodsStudy({
-            goodsId: this.goodsId,
-            gradeId: this.gradeId,
-            moduleId: this.menuItem.moduleId || 0,
-            chapterId: this.menuItem.chapterId || 0,
-            sectionId: this.menuItem.sectionId || this.menuItem.menuId,
-            orderGoodsId: this.orderGoodsId,
-          })
-          .then((res) => {
-            resolve(res.data.data);
-          });
-      });
-    },
-    goodsTodayStudySectionNum() {
-      return new Promise((resolve) => {
-        this.$api
-          .goodsTodayStudySectionNum({
-            goodsId: this.goodsId,
-            gradeId: this.gradeId,
-            orderGoodsId: this.orderGoodsId,
-          })
-          .then((res) => {
-            if (res.data.code == 200) {
-              resolve(res.data.data);
-            }
-          });
-      });
-    },
-    getVideo() {
-      if (this.clickLock) {
-        return;
-      }
-      if (this.$method.isGoLogin()) {
-        return;
-      }
-      if (this.menuItem.id == this.sectionId) {
-        return;
-      }
-      this.clickLock = true;
-      // && !this.menuItem.isRebuild
-      if (this.params.orderNum == 2 && !this.isLive) {
-        //要按从头到尾顺序学习, 且不是重修课程
-        if (this.preItem) {
-          let rows = this.menuAllList;
-          let newRows = [];
-          for (let i = 0; i < rows.length; i++) {
-            let moduleTrue =
-              rows[i].moduleId == this.menuItem.moduleId ||
-              rows[i].moduleId == 0;
-            let chapterTrue =
-              rows[i].chapterId == this.menuItem.chapterId ||
-              rows[i].chapterId == 0;
-            let sectionTrue =
-              rows[i].sectionId == this.menuItem.sectionId ||
-              rows[i].sectionId == this.menuItem.menuId;
-            if (moduleTrue && chapterTrue && sectionTrue) {
-              break;
-            } else {
-              if (rows[i].sectionType != 2) {
-                newRows.push(rows[i]);
-              }
-            }
-          }
-          let isAllLearn = newRows.every((item) => {
-            return item.studyStatus == 1;
-          });
-          if (isAllLearn) {
-            this.playVideo();
-          } else {
-            uni.showToast({
-              icon: "none",
-              title: "请按顺序学习视频课程",
-            });
-          }
-        } else {
-          //第一章第一节
-          this.playVideo();
-        }
-      } else {
-        this.playVideo();
-      }
-      setTimeout(() => {
-        this.clickLock = false;
-      }, 3000);
-    },
-    studyRecordGetChannelBasicInfo(channelId) {
-      return new Promise((resolve) => {
-        this.$api
-          .studyRecordGetChannelBasicInfo({
-            channelId,
-          })
-          .then((res) => {
-            resolve(res.data.data);
-          });
-      });
-    },
-    async playVideo() {
-      if (!this.isBuy) {
-        if (this.isTryListen) {
-          uni.$emit("getSection", this.menuItem, this.isTryListen);
-        }
-        //非购买
-        this.clickLock = false;
-        return;
-      }
-      if (this.menuItem.sectionType == 1 || this.menuItem.sectionType == 3) {
-        let learnNum = await this.goodsTodayStudySectionNum();
-        let hasLearn = await this.gradeCheckGoodsStudy();
-
-        if (this.sectionMaxNum > 0) {
-          if (learnNum >= this.sectionMaxNum && !hasLearn) {
-            uni.showToast({
-              icon: "none",
-              title: `每天最多学习${this.sectionMaxNum}节`,
-            });
-            this.clickLock = false;
-            return;
-          }
-        }
-        if (!this.menuItem.recordingUrl) {
-          uni.showToast({
-            title: "暂无播放地址数据",
-            icon: "none",
-          });
-          this.clickLock = false;
-          return;
-        }
-        // 回放
-        if (this.menuItem.sectionType == 3) {
-          let moduleId = this.menuItem.moduleId || 0;
-          let chapterId = this.menuItem.chapterId || 0;
-          let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-          let uuid = new Date().valueOf() + "";
-          // buyCourse 是否购买课程:1是 0否,type=vod是回放
-          let encode = encodeURIComponent(
-            this.other.hostLive +
-              "/pages/live/index?token=" +
-              uni.getStorageSync("token") +
-              "&userInfo=" +
-              JSON.stringify(this.userInfo) +
-              "&channelId=" +
-              this.menuItem.liveUrl +
-              "&gradeId=" +
-              this.gradeId +
-              "&courseId=" +
-              this.courseId +
-              "&goodsId=" +
-              this.goodsId +
-              "&orderGoodsId=" +
-              this.orderGoodsId +
-              "&sectionId=" +
-              sectionId +
-              "&chapterId=" +
-              chapterId +
-              "&moduleId=" +
-              moduleId +
-              "&buyCourse=1" +
-              "&ident=" +
-              uuid +
-              "&sectionType=3" +
-              "&vid=" +
-              this.menuItem.recordingUrl
-          );
-          uni.navigateTo({
-            url: `/pages5/webview/index?url=` + encode,
-          });
-          return;
-        }
-        // console.log('===设置播放的节IDthis.menuItem,', this.menuItem, this.playId);
-        uni.$emit("getSection", this.menuItem);
-        uni.$emit("isRebuild", this.isRebuild);
-      }
-      if (this.menuItem.sectionType == 2) {
-        let learnNum = await this.goodsTodayStudySectionNum();
-        let hasLearn = await this.gradeCheckGoodsStudy();
-
-        if (this.sectionMaxNum > 0 && !this.isLive) {
-          if (learnNum >= this.sectionMaxNum && !hasLearn) {
-            uni.showToast({
-              icon: "none",
-              title: `每天最多学习${this.sectionMaxNum}节`,
-            });
-            this.clickLock = false;
-            return;
-          }
-        }
-        if (!this.menuItem.liveUrl) {
-          uni.showToast({
-            title: "暂无直播地址数据",
-            icon: "error",
-          });
-          return;
-        }
-
-        let data = await this.studyRecordGetChannelBasicInfo(
-          this.menuItem.liveUrl
-        );
-        let nowTime = +this.$method.timest();
-
-        if (this.menuItem.liveStartTime > nowTime) {
-          if (data.watchStatus == "end" || data.watchStatus == "playback") {
-            this.clickLock = false;
-            uni.showToast({
-              title: "直播未开始",
-              icon: "none",
-            });
-            return;
-          }
-        } else if (
-          this.menuItem.liveStartTime < nowTime &&
-          this.menuItem.liveEndTime > nowTime
-        ) {
-          if (data.watchStatus == "end" || data.watchStatus == "playback") {
-            this.clickLock = false;
-            uni.showToast({
-              title: "暂无直播",
-              icon: "none",
-            });
-            return;
-          }
-        } else if (this.menuItem.liveEndTime < nowTime) {
-          if (!data) {
-            uni.showToast({
-              title: "直播已结束",
-              icon: "none",
-            });
-            return;
-          }
-          if (data.watchStatus == "end" || data.watchStatus == "playback") {
-            this.clickLock = false;
-            uni.showToast({
-              title: "直播已结束",
-              icon: "none",
-            });
-            return;
-          }
-        }
-        let moduleId = this.menuItem.moduleId || 0;
-        let chapterId = this.menuItem.chapterId || 0;
-        let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-        let uuid = new Date().valueOf() + "";
-        // buyCourse 是否购买课程:1是 0否
-        let encode = encodeURIComponent(
-          this.other.hostLive +
-            "/pages/live/index?token=" +
-            uni.getStorageSync("token") +
-            "&userInfo=" +
-            JSON.stringify(this.userInfo) +
-            "&channelId=" +
-            this.menuItem.liveUrl +
-            "&gradeId=" +
-            this.gradeId +
-            "&courseId=" +
-            this.courseId +
-            "&goodsId=" +
-            this.goodsId +
-            "&orderGoodsId=" +
-            this.orderGoodsId +
-            "&sectionId=" +
-            sectionId +
-            "&chapterId=" +
-            chapterId +
-            "&moduleId=" +
-            moduleId +
-            "&buyCourse=1" +
-            "&ident=" +
-            uuid +
-            "&sectionType=2"
-        );
-        uni.navigateTo({
-          url: `/pages5/webview/index?url=` + encode,
-        });
-
-        return;
-      }
-    },
-  },
-  computed: {
-    ...mapGetters(["userInfo", "liveLast", "other"]),
-    isActive() {
-      if (!this.isBuy || !this.sectionItem) {
-        return false;
-      }
-      let moduleId = this.menuItem.moduleId || 0;
-      let chapterId = this.menuItem.chapterId || 0;
-      let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
-      let moduleId1 = this.sectionItem.moduleId || 0;
-      let chapterId1 = this.sectionItem.chapterId || 0;
-      let sectionId1 = this.sectionItem.sectionId || this.sectionItem.menuId;
-      return (
-        moduleId == moduleId1 &&
-        chapterId == chapterId1 &&
-        sectionId == sectionId1
-      );
-    },
-    params() {
-      return this.paramsFn([
-        "orderGoodsId",
-        "gradeId",
-        "courseId",
-        "sectionItem",
-        "menuAllList",
-        "orderNum",
-        "goodsId",
-        "sectionId",
-        "listenConfigList",
-      ]);
-    },
-    courseId() {
-      return this.params.courseId;
-    },
-    gradeId() {
-      return this.params.gradeId;
-    },
-    orderGoodsId() {
-      return this.params.orderGoodsId;
-    },
-    sectionItem() {
-      return this.params.sectionItem;
-    },
-    menuAllList() {
-      return this.params.menuAllList;
-    },
-    goodsId() {
-      return this.params.goodsId;
-    },
-    sectionId() {
-      return this.params.sectionId;
-    },
-    isTryListen() {
-      let { listenConfigList } = this.params;
-      return (
-        listenConfigList &&
-        listenConfigList.find(
-          (e) =>
-            e.sectionId == this.menuItem.sectionId ||
-            e.sectionId == this.menuItem.menuId
-        )
-      );
-    },
-  },
-};
+	import {
+		mapGetters
+	} from "vuex";
+	export default {
+		name: "courseSection",
+		inject: ["paramsFn"],
+		props: {
+			isLive: false, //是否是直播课
+			preItem: {
+				default: undefined,
+			},
+
+			menuItem: {
+				type: Object,
+				default: {},
+			},
+			isBuy: {
+				type: Boolean,
+				default: false,
+			},
+			levelId: {
+				type: String,
+				default: "",
+			},
+			isRebuild: {
+				type: Boolean,
+				default: false,
+			},
+
+			nextMenuItem: {
+				type: Object,
+				default: () => {
+					return {};
+				},
+			},
+			sectionMaxNum: {
+				default: undefined,
+			},
+			// 章->所有节试卷列表
+			ChapterSectionExam: {
+				type: Array,
+				default: () => [],
+			},
+			// 区分是模块试卷还是章试卷,3是模块试卷
+			testType: {
+				type: Number,
+				default: 0,
+			},
+		},
+		watch: {
+			menuItem(val) {
+				console.log(val, "val");
+			},
+		},
+		data() {
+			return {
+				nowTime: 0,
+				playId: "",
+				clickLock: false, //点击锁,防止连续点击多次
+				moduleSectionExam: [], // 模块下的所有节试卷列表
+				chapterExams: {},
+				moduleExams: {},
+				// newMenuAllList: [],
+			};
+		},
+		onLoad() {},
+		created() {
+			if (this.testType == 3) {
+				// 模块下的所有节试卷列表
+				this.$api
+					.reSectionExamList({
+						chapterId: 0,
+						courseId: this.courseId,
+						gradeId: this.gradeId,
+						orderGoodsId: this.orderGoodsId,
+					})
+					.then((res) => {
+						if (res.data.code == 200) {
+							this.moduleSectionExam = res.data.data || [];
+						}
+					});
+			}
+		},
+		mounted() {
+			this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
+
+			this.isBuy &&
+				uni.$on("playEnd", () => {
+					if (this.isActive) {
+						this.$emit("playEnd");
+					}
+				});
+		},
+		methods: {
+			isLast() {
+				if (this.liveLast) {
+					let sectionASame =
+						this.liveLast.sectionId ==
+						(this.menuItem.sectionId || this.menuItem.menuId);
+					let chapterSame =
+						this.liveLast.chapterId == (this.menuItem.chapterId || 0);
+					let moduleSame =
+						this.liveLast.moduleId == (this.menuItem.moduleId || 0);
+					return sectionASame && chapterSame && moduleSame;
+				} else {
+					return false;
+				}
+			},
+			toDoSectionExam() {
+				if (this.testType == 3) {
+					this.ModuleExam();
+				} else {
+					this.ChapterExam();
+				}
+			},
+			checkTest() {
+				let data =
+					this.testType == 3 ? this.moduleSectionExam : this.ChapterSectionExam;
+				let id =
+					this.testType == 3 ? this.menuItem.menuId : this.menuItem.sectionId;
+				if (!data) {
+					return false;
+				}
+				return data.some((e) => e.sectionId == id);
+			},
+			ChapterExam() {
+				this.chapterExams = this.ChapterSectionExam.find(
+					(e) => e.sectionId == this.menuItem.sectionId
+				);
+				let moduleId = this.chapterExams.moduleId || 0;
+				let chapterId = this.chapterExams.chapterId || 0;
+				let sectionId = this.chapterExams.sectionId || this.chapterExams.menuId;
+				uni.navigateTo({
+					url: "/pages2/class/questionBank?courseId=" +
+						this.courseId +
+						"&gradeId=" +
+						this.gradeId +
+						"&isFromVideo=1&id=" +
+						this.chapterExams.typeId +
+						"&goodsid=" +
+						this.goodsId +
+						"&moduleId=" +
+						moduleId +
+						"&chapterId=" +
+						chapterId +
+						"&sectionId=" +
+						sectionId +
+						"&orderGoodsId=" +
+						this.orderGoodsId +
+						"&type=2",
+				});
+			},
+			ModuleExam() {
+				let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+				this.moduleExams = this.moduleSectionExam.find(
+					(e) => e.sectionId == sectionId
+				);
+				let moduleId = this.moduleExams.moduleId || 0;
+				let chapterId = this.moduleExams.chapterId || 0;
+
+				uni.navigateTo({
+					url: "/pages2/class/questionBank?courseId=" +
+						this.courseId +
+						"&gradeId=" +
+						this.gradeId +
+						"&isFromVideo=1&id=" +
+						this.moduleExams.typeId +
+						"&goodsid=" +
+						this.goodsId +
+						"&moduleId=" +
+						moduleId +
+						"&chapterId=" +
+						chapterId +
+						"&sectionId=" +
+						sectionId +
+						"&orderGoodsId=" +
+						this.orderGoodsId +
+						"&type=2",
+				});
+			},
+			gradeCheckGoodsStudy() {
+				return new Promise((resolve) => {
+					this.$api
+						.gradeCheckGoodsStudy({
+							goodsId: this.goodsId,
+							gradeId: this.gradeId,
+							moduleId: this.menuItem.moduleId || 0,
+							chapterId: this.menuItem.chapterId || 0,
+							sectionId: this.menuItem.sectionId || this.menuItem.menuId,
+							orderGoodsId: this.orderGoodsId,
+						})
+						.then((res) => {
+							resolve(res.data.data);
+						});
+				});
+			},
+			goodsTodayStudySectionNum() {
+				return new Promise((resolve) => {
+					this.$api
+						.goodsTodayStudySectionNum({
+							goodsId: this.goodsId,
+							gradeId: this.gradeId,
+							orderGoodsId: this.orderGoodsId,
+						})
+						.then((res) => {
+							if (res.data.code == 200) {
+								resolve(res.data.data);
+							}
+						});
+				});
+			},
+			getVideo() {
+				if (this.clickLock) {
+					return;
+				}
+				if (this.$method.isGoLogin()) {
+					return;
+				}
+				if (this.menuItem.id == this.sectionId && this.menuItem.sectionType !== 2) {
+					return;
+				}
+				this.clickLock = true;
+				// && !this.menuItem.isRebuild
+				if (this.params.orderNum == 2 && this.menuItem.sectionType !== 2) {
+					//要按从头到尾顺序学习, 且不是重修课程
+					if (this.preItem) {
+						let rows = this.menuAllList;
+						let newRows = [];
+						for (let i = 0; i < rows.length; i++) {
+							let moduleTrue =
+								rows[i].moduleId == this.menuItem.moduleId ||
+								rows[i].moduleId == 0;
+							let chapterTrue =
+								rows[i].chapterId == this.menuItem.chapterId ||
+								rows[i].chapterId == 0;
+							let sectionTrue =
+								rows[i].sectionId == this.menuItem.sectionId ||
+								rows[i].sectionId == this.menuItem.menuId;
+							if (moduleTrue && chapterTrue && sectionTrue) {
+								break;
+							} else {
+								if (rows[i].sectionType != 2) {
+									newRows.push(rows[i]);
+								}
+							}
+						}
+						let isAllLearn = newRows.every((item) => {
+							return item.studyStatus == 1;
+						});
+						if (isAllLearn) {
+							this.playVideo();
+						} else {
+							uni.showToast({
+								icon: "none",
+								title: "请按顺序学习视频课程",
+							});
+						}
+					} else {
+						//第一章第一节
+						this.playVideo();
+					}
+				} else {
+					this.playVideo();
+				}
+				setTimeout(() => {
+					this.clickLock = false;
+				}, 3000);
+			},
+			studyRecordGetChannelBasicInfo(channelId) {
+				return new Promise((resolve) => {
+					this.$api
+						.studyRecordGetChannelBasicInfo({
+							channelId,
+						})
+						.then((res) => {
+							resolve(res.data.data);
+						});
+				});
+			},
+			async playVideo() {
+				if (!this.isBuy) {
+					if (this.isTryListen) {
+						uni.$emit("getSection", this.menuItem, this.isTryListen);
+					}
+					//非购买
+					this.clickLock = false;
+					return;
+				}
+				if (this.menuItem.sectionType == 1 || this.menuItem.sectionType == 3) {
+					let learnNum = await this.goodsTodayStudySectionNum();
+					let hasLearn = await this.gradeCheckGoodsStudy();
+
+					if (this.sectionMaxNum > 0) {
+						if (learnNum >= this.sectionMaxNum && !hasLearn) {
+							uni.showToast({
+								icon: "none",
+								title: `每天最多学习${this.sectionMaxNum}节`,
+							});
+							this.clickLock = false;
+							return;
+						}
+					}
+					if (!this.menuItem.recordingUrl) {
+						uni.showToast({
+							title: "暂无播放地址数据",
+							icon: "none",
+						});
+						this.clickLock = false;
+						return;
+					}
+					if (!this.userInfo) {
+						await this.$store.dispatch('getUserInfo')
+					}
+					// 回放
+					if (this.menuItem.sectionType == 3) {
+						let moduleId = this.menuItem.moduleId || 0;
+						let chapterId = this.menuItem.chapterId || 0;
+						let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+						let uuid = new Date().valueOf() + "";
+						// buyCourse 是否购买课程:1是 0否,type=vod是回放
+						let encode = encodeURIComponent(
+							this.other.hostLive +
+							"/pages/live/index?token=" +
+							uni.getStorageSync("token") +
+							"&userInfo=" +
+							JSON.stringify(this.userInfo) +
+							"&channelId=" +
+							this.menuItem.liveUrl +
+							"&gradeId=" +
+							this.gradeId +
+							"&courseId=" +
+							this.courseId +
+							"&goodsId=" +
+							this.goodsId +
+							"&orderGoodsId=" +
+							this.orderGoodsId +
+							"&sectionId=" +
+							sectionId +
+							"&chapterId=" +
+							chapterId +
+							"&moduleId=" +
+							moduleId +
+							"&buyCourse=1" +
+							"&ident=" +
+							uuid +
+							"&sectionType=3" +
+							"&vid=" +
+							this.menuItem.recordingUrl
+						);
+						uni.navigateTo({
+							url: `/pages5/webview/index?url=` + encode,
+						});
+						return;
+					}
+					// console.log('===设置播放的节IDthis.menuItem,', this.menuItem, this.playId);
+					uni.$emit("getSection", this.menuItem);
+					uni.$emit("isRebuild", this.isRebuild);
+				}
+				if (this.menuItem.sectionType == 2) {
+					let learnNum = await this.goodsTodayStudySectionNum();
+					let hasLearn = await this.gradeCheckGoodsStudy();
+
+					if (this.sectionMaxNum > 0 && this.menuItem.sectionType !== 2) {
+						if (learnNum >= this.sectionMaxNum && !hasLearn) {
+							uni.showToast({
+								icon: "none",
+								title: `每天最多学习${this.sectionMaxNum}节`,
+							});
+							this.clickLock = false;
+							return;
+						}
+					}
+					if (!this.menuItem.liveUrl) {
+						uni.showToast({
+							title: "暂无直播地址数据",
+							icon: "error",
+						});
+						return;
+					}
+
+					let data = await this.studyRecordGetChannelBasicInfo(
+						this.menuItem.liveUrl
+					);
+					let nowTime = +this.$method.timest();
+
+					if (this.menuItem.liveStartTime > nowTime) {
+						if (data.watchStatus == "end" || data.watchStatus == "playback") {
+							this.clickLock = false;
+							uni.showToast({
+								title: "直播未开始",
+								icon: "none",
+							});
+							return;
+						}
+					} else if (
+						this.menuItem.liveStartTime < nowTime &&
+						this.menuItem.liveEndTime > nowTime
+					) {
+						if (data.watchStatus == "end" || data.watchStatus == "playback") {
+							this.clickLock = false;
+							uni.showToast({
+								title: "暂无直播",
+								icon: "none",
+							});
+							return;
+						}
+					} else if (this.menuItem.liveEndTime < nowTime) {
+						if (!data) {
+							uni.showToast({
+								title: "直播已结束",
+								icon: "none",
+							});
+							return;
+						}
+						if (data.watchStatus == "end" || data.watchStatus == "playback") {
+							this.clickLock = false;
+							uni.showToast({
+								title: "直播已结束",
+								icon: "none",
+							});
+							return;
+						}
+					}
+					let moduleId = this.menuItem.moduleId || 0;
+					let chapterId = this.menuItem.chapterId || 0;
+					let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+					let uuid = new Date().valueOf() + "";
+					// buyCourse 是否购买课程:1是 0否
+					let encode = encodeURIComponent(
+						this.other.hostLive +
+						"/pages/live/index?token=" +
+						uni.getStorageSync("token") +
+						"&userInfo=" +
+						JSON.stringify(this.userInfo) +
+						"&channelId=" +
+						this.menuItem.liveUrl +
+						"&gradeId=" +
+						this.gradeId +
+						"&courseId=" +
+						this.courseId +
+						"&goodsId=" +
+						this.goodsId +
+						"&orderGoodsId=" +
+						this.orderGoodsId +
+						"&sectionId=" +
+						sectionId +
+						"&chapterId=" +
+						chapterId +
+						"&moduleId=" +
+						moduleId +
+						"&buyCourse=1" +
+						"&ident=" +
+						uuid +
+						"&sectionType=2"
+					);
+					uni.navigateTo({
+						url: `/pages5/webview/index?url=` + encode,
+					});
+
+					return;
+				}
+			},
+		},
+		computed: {
+			...mapGetters(["userInfo", "liveLast", "other"]),
+			isActive() {
+				if (!this.isBuy || !this.sectionItem) {
+					return false;
+				}
+				let moduleId = this.menuItem.moduleId || 0;
+				let chapterId = this.menuItem.chapterId || 0;
+				let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+				let moduleId1 = this.sectionItem.moduleId || 0;
+				let chapterId1 = this.sectionItem.chapterId || 0;
+				let sectionId1 = this.sectionItem.sectionId || this.sectionItem.menuId;
+				return (
+					moduleId == moduleId1 &&
+					chapterId == chapterId1 &&
+					sectionId == sectionId1
+				);
+			},
+			params() {
+				return this.paramsFn([
+					"orderGoodsId",
+					"gradeId",
+					"courseId",
+					"sectionItem",
+					"menuAllList",
+					"orderNum",
+					"goodsId",
+					"sectionId",
+					"listenConfigList",
+				]);
+			},
+			courseId() {
+				return this.params.courseId;
+			},
+			gradeId() {
+				return this.params.gradeId;
+			},
+			orderGoodsId() {
+				return this.params.orderGoodsId;
+			},
+			sectionItem() {
+				return this.params.sectionItem;
+			},
+			menuAllList() {
+				return this.params.menuAllList;
+			},
+			goodsId() {
+				return this.params.goodsId;
+			},
+			sectionId() {
+				return this.params.sectionId;
+			},
+			isTryListen() {
+				let {
+					listenConfigList
+				} = this.params;
+				return (
+					listenConfigList &&
+					listenConfigList.find(
+						(e) =>
+						e.sectionId == this.menuItem.sectionId ||
+						e.sectionId == this.menuItem.menuId
+					)
+				);
+			},
+		},
+	};
 </script>
 
 <style scoped lang="scss">
-.tagGreen {
-  width: 80rpx;
-  height: 28rpx;
-  background: #34c759;
-  border-radius: 8rpx;
-  font-size: 20rpx;
-  color: #ffffff;
-  text-align: center;
-}
-
-.tagWillPlay {
-  width: 80rpx;
-  height: 28rpx;
-  background: #ebf4ff;
-  border-radius: 8rpx;
-  font-size: 20rpx;
-  color: #007aff;
-  text-align: center;
-}
-
-.tagPlaying {
-  width: 80rpx;
-  height: 28rpx;
-  background: #fff7eb;
-  border-radius: 8rpx;
-  font-size: 20rpx;
-  color: #ff9500;
-  text-align: center;
-}
-
-.tagPlayed {
-  width: 80rpx;
-  height: 28rpx;
-  background: #eeeeee;
-  border-radius: 8rpx;
-  font-size: 20rpx;
-  color: #666666;
-  text-align: center;
-}
-
-.tagRe {
-  width: 80rpx;
-  height: 28rpx;
-  background: #ff3b30;
-  border-radius: 8rpx;
-  font-size: 20rpx;
-  color: #ffffff;
-  text-align: center;
-}
-
-.tryBox {
-  width: 103rpx;
-  height: 48rpx;
-  background: #fff;
-  border-radius: 24rpx;
-  color: #3577e8;
-  font-size: 24rpx;
-  line-height: 48rpx;
-  text-align: center;
-  border: 1rpx solid #3577e8;
-}
-
-.icon_up {
-  width: 24rpx;
-  height: 24rpx;
-}
-
-.t_content3 {
-  color: #007aff;
-}
-
-.t_content2 {
-  color: #007aff;
-}
-
-.t_content1 {
-  color: #007aff;
-}
-
-.t_content {
-  font-size: 30rpx;
-  margin-left: 10rpx;
-  color: #666666;
-  flex: 1;
-}
-
-.tagColor3 {
-  border: 2rpx solid #ff9500;
-  color: #ff9500;
-}
-
-.tagColor2 {
-  border: 2rpx solid #ff3b30;
-  color: #ff3b30;
-}
-
-.tagColor1 {
-  border: 2rpx solid #007aff;
-  color: #007aff;
-}
-
-.color3 {
-  color: #ff9500;
-}
-
-.color2 {
-  color: #ff3b30;
-}
-
-.color1 {
-  color: #007aff;
-}
-
-.tag {
-  border-radius: 8rpx;
-  font-size: 20rpx;
-  padding: 4rpx 10rpx;
-}
-
-.exercises {
-  margin-left: 10rpx;
-  font-size: 26rpx;
-  color: #498afe;
-
-  > text {
-    margin-right: 6rpx;
-  }
-}
-
-.learnings {
-  margin-right: 8rpx;
-
-  .learning_icon {
-    width: 40rpx;
-    height: 40rpx;
-    margin-right: 4rpx;
-  }
-}
-</style>
+	.tagGreen {
+		width: 80rpx;
+		height: 28rpx;
+		background: #34c759;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #ffffff;
+		text-align: center;
+	}
+
+	.tagWillPlay {
+		width: 80rpx;
+		height: 28rpx;
+		background: #ebf4ff;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #007aff;
+		text-align: center;
+	}
+
+	.tagPlaying {
+		width: 80rpx;
+		height: 28rpx;
+		background: #fff7eb;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #ff9500;
+		text-align: center;
+	}
+
+	.tagPlayed {
+		width: 80rpx;
+		height: 28rpx;
+		background: #eeeeee;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #666666;
+		text-align: center;
+	}
+
+	.tagRe {
+		width: 80rpx;
+		height: 28rpx;
+		background: #ff3b30;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #ffffff;
+		text-align: center;
+	}
+
+	.tryBox {
+		width: 103rpx;
+		height: 48rpx;
+		background: #fff;
+		border-radius: 24rpx;
+		color: #3577e8;
+		font-size: 24rpx;
+		line-height: 48rpx;
+		text-align: center;
+		border: 1rpx solid #3577e8;
+	}
+
+	.icon_up {
+		width: 24rpx;
+		height: 24rpx;
+	}
+
+	.t_content3 {
+		color: #007aff;
+	}
+
+	.t_content2 {
+		color: #007aff;
+	}
+
+	.t_content1 {
+		color: #007aff;
+	}
+
+	.t_content {
+		font-size: 30rpx;
+		margin-left: 10rpx;
+		color: #666666;
+		flex: 1;
+	}
+
+	.tagColor3 {
+		border: 2rpx solid #ff9500;
+		color: #ff9500;
+	}
+
+	.tagColor2 {
+		border: 2rpx solid #ff3b30;
+		color: #ff3b30;
+	}
+
+	.tagColor1 {
+		border: 2rpx solid #007aff;
+		color: #007aff;
+	}
+
+	.color3 {
+		color: #ff9500;
+	}
+
+	.color2 {
+		color: #ff3b30;
+	}
+
+	.color1 {
+		color: #007aff;
+	}
+
+	.tag {
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		padding: 4rpx 10rpx;
+	}
+
+	.exercises {
+		margin-left: 10rpx;
+		font-size: 26rpx;
+		color: #498afe;
+
+		>text {
+			margin-right: 6rpx;
+		}
+	}
+
+	.learnings {
+		margin-right: 8rpx;
+
+		.learning_icon {
+			width: 40rpx;
+			height: 40rpx;
+			margin-right: 4rpx;
+		}
+	}
+</style>

+ 221 - 243
components/course/noteBox.vue

@@ -1,257 +1,235 @@
 <template>
-  <view>
-    <view v-if="noteList.length == 0" style="text-align: center">暂无笔记</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 class="left_ti">
-              <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>
-        </view>
-      </view>
-    </view>
-    <view
-      class="inputBottom"
-      v-if="isShowInput"
-      :style="{ bottom: bottomHeight + 'px' }"
-    >
-      <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">
-        <input
-          v-model="noteValue"
-          height="60"
-          fixed="true"
-          placeholder="您可以在这里输入笔记内容"
-          type="text"
-          :custom-style="inputStyle"
-          :adjust-position="false"
-          class="input"
-          @focus="focusNote"
-          @blur="blurNote"
-        />
-      </view>
-      <view
-        style="
+	<view>
+		<view v-if="noteList.length == 0" style="text-align: center">暂无笔记</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 class="left_ti">
+							<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>
+				</view>
+			</view>
+		</view>
+		<view class="inputBottom" v-if="isShowInput" :style="{ bottom: bottomHeight + 'px' }">
+			<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">
+				<input v-model="noteValue" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="text"
+					:custom-style="inputStyle" :adjust-position="false" class="input" @focus="focusNote"
+					@blur="blurNote" />
+			</view>
+			<view style="
           color: #007aff;
           font-size: 30rpx;
           font-weight: bold;
           width: 15%;
           text-align: center;
-        "
-        @click="postNote"
-        >提交</view
-      >
-    </view>
-  </view>
+        " @click="postNote">提交</view>
+		</view>
+	</view>
 </template>
 
 <script>
-export default {
-  name: "SaasMiniprogramNoteBox",
-  inject: ["paramsFn"],
-  data() {
-    return {
-      noteList: [],
-      noteId: 0,
-      noteValue: "",
-      inputStyle: {
-        background: "rgba(244, 244, 244, 0.98)",
-        borderRadius: "24rpx",
-        padding: "8rpx",
-        marginBottom: "10rpx",
-      },
-      bottomHeight: 0,
-    };
-  },
-  methods: {
-    getNoteList() {
-      this.$api.noteList(this.params).then((res) => {
-        if (res.data.code == 200) {
-          this.noteList = res.data.rows;
-        }
-      });
-    },
-    jumpNote(item) {
-      this.noteId = item.noteId;
-      this.$emit("jumpNote", item);
-    },
-    postNote() {
-      let self = this;
-      if (!(this.sectionId > 0)) {
-        this.$u.toast("目前无播放视频");
-        return;
-      }
-      if (!this.noteValue) {
-        this.$u.toast("请输入内容");
-        return;
-      }
-      if (!this.params.gradeId) {
-        this.$u.toast("暂无班级数据");
-        return;
-      }
-      let noteSecond = this.params.playTime;
-      if (!noteSecond) {
-        this.$u.toast("视频暂未开始");
-        return;
-      }
-      let data = {
-        noteText: this.noteValue,
-        noteDate: this.$method.getZeroTime(),
-        noteSecond: noteSecond,
-        ...this.params,
-      };
-      this.$api.postNote(data).then((res) => {
-        if (res.data.code == 200) {
-          this.$u.toast("发布成功");
-          self.getNoteList();
-          this.noteValue = "";
-        }
-      });
-    },
-    blurNote() {
-      this.bottomHeight = 0;
-    },
-    focusNote(event) {
-      this.bottomHeight = event.detail.height;
-    },
-  },
-  computed: {
-    params() {
-      return this.paramsFn([
-        "orderGoodsId",
-        "gradeId",
-        "goodsId",
-        "courseId",
-        "sectionId",
-        "playTime",
-        "isPlayRebuild",
-      ]);
-    },
-    sectionId() {
-      return this.params.sectionId;
-    },
-    isShowInput() {
-      return this.params.isPlayRebuild;
-    },
-  },
-  watch: {
-    sectionId: {
-      handler(val) {
-        this.getNoteList();
-      },
-      immediate: true,
-    },
-  },
-};
+	export default {
+		name: "SaasMiniprogramNoteBox",
+		inject: ["paramsFn"],
+		data() {
+			return {
+				noteList: [],
+				noteId: 0,
+				noteValue: "",
+				inputStyle: {
+					background: "rgba(244, 244, 244, 0.98)",
+					borderRadius: "24rpx",
+					padding: "8rpx",
+					marginBottom: "10rpx",
+				},
+				bottomHeight: 0,
+			};
+		},
+		methods: {
+			getNoteList() {
+				this.$api.noteList(this.params).then((res) => {
+					if (res.data.code == 200) {
+						this.noteList = res.data.rows;
+					}
+				});
+			},
+			jumpNote(item) {
+				this.noteId = item.noteId;
+				this.$emit("jumpNote", item);
+			},
+			postNote() {
+				let self = this;
+				if (!(this.sectionId > 0)) {
+					this.$u.toast("目前无播放视频");
+					return;
+				}
+				if (!this.noteValue) {
+					this.$u.toast("请输入内容");
+					return;
+				}
+				if (!this.params.gradeId) {
+					this.$u.toast("暂无班级数据");
+					return;
+				}
+				let noteSecond = this.params.playTime;
+				if (!noteSecond) {
+					this.$u.toast("视频暂未开始");
+					return;
+				}
+				let data = {
+					noteText: this.noteValue,
+					noteDate: this.$method.getZeroTime(),
+					noteSecond: noteSecond,
+					...this.params,
+				};
+				this.$api.postNote(data).then((res) => {
+					if (res.data.code == 200) {
+						this.$u.toast("发布成功");
+						self.getNoteList();
+						this.noteValue = "";
+					}
+				});
+			},
+			blurNote() {
+				this.bottomHeight = 0;
+			},
+			focusNote(event) {
+				this.bottomHeight = event.detail.height;
+			},
+		},
+		computed: {
+			params() {
+				return this.paramsFn([
+					"orderGoodsId",
+					"gradeId",
+					"goodsId",
+					"courseId",
+					"playTime",
+					"isPlayRebuild",
+					"moduleId",
+					"chapterId",
+					"sectionId"
+				]);
+			},
+			sectionId() {
+				return this.params.sectionId;
+			},
+			isShowInput() {
+				return this.params.isPlayRebuild;
+			},
+		},
+		watch: {
+			sectionId: {
+				handler(val) {
+					this.getNoteList();
+				},
+				immediate: true,
+			},
+		},
+	};
 </script>
 
 <style lang="scss" scoped>
-.leftPadding {
-  margin-left: 8rpx;
-}
-.dateBox {
-  width: 216rpx;
-  height: 48rpx;
-  background: #ffffff;
-  border-radius: 24rpx;
-  font-size: 24rpx;
-  color: #666666;
-  text-align: center;
-  line-height: 48rpx;
-  margin: 16rpx 0rpx 8rpx;
-}
-.noteBox {
-  width: 100%;
-  background: #ffffff;
-  padding: 0rpx 10rpx 20rpx;
-  border-radius: 16rpx;
-  overflow: hidden;
-  .left_ti {
-    padding-top: 14rpx;
-    .title {
-      font-size: 24rpx;
-      color: #999999;
-    }
-  }
-}
-.t2Content {
-  font-size: 24rpx;
-  font-family: PingFang SC;
-  font-weight: bold;
-  color: #999999;
-  line-height: 48rpx;
-}
-.tBox2 {
-  display: flex;
-  padding-top: 10rpx;
-  color: #333333;
-  font-size: 30rpx;
-  font-weight: 400;
-}
-.inputBottom {
-  position: fixed;
-  left: 0;
-  bottom: 0;
-  background: #ffffff;
-  height: 98rpx;
-  display: flex;
-  align-items: center;
-  width: 100%;
+	.leftPadding {
+		margin-left: 8rpx;
+	}
 
-  .flex_auto {
-    flex: 1;
-    margin-left: 10%;
-    word-break: break-all;
-    // .input {
-    //   height: 60rpx;
-    // }
-  }
+	.dateBox {
+		width: 216rpx;
+		height: 48rpx;
+		background: #ffffff;
+		border-radius: 24rpx;
+		font-size: 24rpx;
+		color: #666666;
+		text-align: center;
+		line-height: 48rpx;
+		margin: 16rpx 0rpx 8rpx;
+	}
 
-  .btn {
-    color: #007aff;
-    font-size: 30rpx;
-    font-weight: bold;
-    width: 15%;
-    text-align: center;
-  }
-  .input {
-    background: rgba(244, 244, 244, 0.98);
-    height: 60rpx;
-    border-radius: 24rpx;
-    margin-top: 12rpx;
-  }
-}
-</style>
+	.noteBox {
+		width: 100%;
+		background: #ffffff;
+		padding: 0rpx 10rpx 20rpx;
+		border-radius: 16rpx;
+		overflow: hidden;
+
+		.left_ti {
+			padding-top: 14rpx;
+
+			.title {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
+	}
+
+	.t2Content {
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #999999;
+		line-height: 48rpx;
+	}
+
+	.tBox2 {
+		display: flex;
+		padding-top: 10rpx;
+		color: #333333;
+		font-size: 30rpx;
+		font-weight: 400;
+	}
+
+	.inputBottom {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		background: #ffffff;
+		height: 98rpx;
+		display: flex;
+		align-items: center;
+		width: 100%;
+
+		.flex_auto {
+			flex: 1;
+			margin-left: 10%;
+			word-break: break-all;
+			// .input {
+			//   height: 60rpx;
+			// }
+		}
+
+		.btn {
+			color: #007aff;
+			font-size: 30rpx;
+			font-weight: bold;
+			width: 15%;
+			text-align: center;
+		}
+
+		.input {
+			background: rgba(244, 244, 244, 0.98);
+			height: 60rpx;
+			border-radius: 24rpx;
+			margin-top: 12rpx;
+		}
+	}
+</style>

+ 17 - 14
pages/learn/index.vue

@@ -241,6 +241,10 @@
                 ">
 								温馨提示:当前班级正在申请中,正式开班后方可进行学习,请耐心等待
 							</div>
+							<div v-if="item.officialStatus != 1
+							">
+								推送失败原因:{{item.pushFailReason || '请先完善个人信息'}}
+							</div>
 							<div v-if="
                   (item.periodStatus == 0 || item.periodStatus == -1)
                 ">
@@ -298,12 +302,11 @@
 						<!-- 按钮 -->
 						<view class="study_btns">
 							<view v-if="
-                      (item.profileChangeStatus == 1 &&
+                      ((item.profileChangeStatus == 1 &&
                         (item.profileStatus == 1 || item.profileStatus == 2)) ||
                         (item.profileChangeStatus == 2 &&
-                          item.profileStatus != -1 &&
-                          item.educationName == '考前培训' &&
-                          item.projectName == '施工现场专业人员')" class="box_appoint" @click="toInput(item)">
+                          item.profileStatus != -1)) && item.educationName == '考前培训' &&
+                          item.projectName == '施工现场专业人员'" class="box_appoint" @click="toInput(item)">
 								<view class="exam_word intos">学习资料</view>
 							</view>
 							<template v-if="
@@ -661,7 +664,7 @@
 			},
 			goPage(url, type) {
 				if (type == 1) {
-					window.open(url, "_blank");
+					window.location.href = url
 				}
 				if (type == 2) {
 					uni.setClipboardData({
@@ -1355,15 +1358,15 @@
 				});
 			},
 			async appointment(item) {
-				// // #ifdef H5
-				// const {
-				// 	data
-				// } = await this.$api.courseoldgoodsredirect()
-				// if (data.data) {
-				// 	window.open(data.data.h5Url)
-				// 	return
-				// }
-				// // #endif
+				// #ifdef H5
+				const {
+					data
+				} = await this.$api.courseoldgoodsredirect()
+				if (data.data) {
+					window.location.href = data.data.h5Url
+					return
+				}
+				// #endif
 				if (item.subscribeSign == 4) {
 					this.$navTo.togo("/pages2/exam/exam_appointment");
 					return;

+ 1 - 1
pages/questionBank/index.vue

@@ -2,7 +2,7 @@
 	<view class="questionBank">
 		<nav-logo title="题库中心"></nav-logo>
 		<!-- 有学习的课程 -->
-		<view v-if="questionLists.length" class="had_courses">
+		<view class="had_courses" v-if="$method.isLogin()">
 			<!-- 我的题库 -->
 			<view class="my_courses">
 				<text class="titles">我的题库</text>

+ 1 - 1
pages2/order/confirm_pay.vue

@@ -111,7 +111,7 @@
 	export default {
 		data() {
 			const validateTel = (rule, value, callback) => {
-				var reg = /^1[34578][0-9]{9}$/;
+				var reg = /^1[345789][0-9]{9}$/;
 				if (!reg.test(value)) {
 					return callback(new Error("请输入正确手机号码"));
 				} else {

+ 1 - 1
pages2/verify/input.vue

@@ -10,7 +10,7 @@
 				<view style="color: #007aff" @click="refuseAgreement">稍后再填</view>
 			</view>
 			<u-collapse v-show="remarkStatus" :item-style="itemStyle" event-type="close" ref="collapse">
-				<u-collapse-item title="审核结果反馈">
+				<u-collapse-item title="审核结果反馈" :open="true">
 					<view style="padding-bottom: 30rpx">
 						<text class="collapse-item">{{ remark || "" }}</text>
 					</view>

+ 21 - 6
pages3/polyv/detail.vue

@@ -333,7 +333,7 @@
 					title: "提示",
 					content: "请使用其他浏览器进行学习",
 					showCancel: false,
-					complete:() => {
+					complete: () => {
 						uni.switchTab({
 							url: "/pages/learn/index",
 						});
@@ -909,11 +909,14 @@
 						this.initPlayVideo(data);
 					});
 			},
-			goLive(item) {
+			async goLive(item) {
 				let moduleId = item.moduleId || 0;
 				let chapterId = item.chapterId || 0;
 				let sectionId = item.sectionId || item.menuId;
 				let uuid = new Date().valueOf() + "";
+				if (!this.userInfo) {
+					await this.$store.dispatch('getUserInfo')
+				}
 				// buyCourse 是否购买课程:1是 0否
 				let encode = encodeURIComponent(
 					this.other.hostLive +
@@ -1600,19 +1603,31 @@
 						goodsId: this.goodsId,
 					})
 					.then((res) => {
-						if (res.data.data > 0) {
+						if (res.data.code == 200) {
+							if (res.data.data > 0) {
+								uni.showModal({
+									showCancel: false,
+									confirmText: "确定",
+									content: "该业务层次下有未学完的商品,无法学习新商品!",
+									success: function(resultst) {
+										uni.navigateBack();
+									},
+								});
+								return Promise.reject();
+							}
+							return Promise.resolve();
+						} else {
 							uni.showModal({
 								showCancel: false,
 								confirmText: "确定",
-								content: "该业务层次下有未学完的商品,无法学习新商品!",
+								content: res.data.msg,
 								success: function(resultst) {
 									uni.navigateBack();
 								},
 							});
 							return Promise.reject();
 						}
-						return Promise.resolve();
-					});
+					})
 			},
 			async getGoodsDetail() {
 				let {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 503 - 742
pages5/examBank/index.vue


+ 1 - 1
pages5/mockExam/examApply.vue

@@ -3,7 +3,7 @@
   <view class="exam_apply">
     <nav-bar title="模考报名" class="navbar"></nav-bar>
     <!-- background="{ background: '#498AFE' }" -->
-    <image class="mock_bg" :src="$method.splitImgHost('oss/images/file/20230710/1688974188358.png')"></image>
+    <image class="mock_bg" :src="$method.splitImgHost('oss/images/file/20240424/1713920366161.png')"></image>
     <!-- <u-navbar :is-back="false" title="模考报名" :border-bottom="false"  title-color="#fff" back-icon-color="#ffffff" background="{ background: '#498AFE' }">
 		</u-navbar> -->
 

+ 5 - 4
pages5/mockExam/registrationSuccess.vue

@@ -36,14 +36,15 @@
 		</view>
 		<view class="mains">
 			<view class="gives">
-				<view>高命中率类原题</view>
-				<view>通关有保障</view>
+				<view>考前冲刺班</view>
+				<view>密押特训 高命中率</view>
 			</view>
 			<view class="middles">
 				<view class="qr_codes">
-					<image class="code" src="../static/erCode.png" show-menu-by-longpress="true"></image>
+					<image class="code" :src="$method.splitImgHost('oss/images/file/20240424/1713920422193.jpg')"
+						show-menu-by-longpress="true"></image>
 				</view>
-				<view class="discern">扫码查看类原题</view>
+				<view class="discern">扫码咨询冲刺班</view>
 			</view>
 			<!-- <view class="middle_line">
         <view class="half_cir_left"></view>

+ 294 - 246
pages5/webview/index.vue

@@ -1,256 +1,304 @@
 <template>
-  <view class="webview">
-    <template v-if="url">
-      <web-view :webview-styles="webviewStyles" :src="url"></web-view>
-    </template>
+	<view class="webview">
+		<template v-if="url">
+			<web-view :webview-styles="webviewStyles" :src="url"></web-view>
+		</template>
 
-    <u-popup v-model="showAuth" mode="center" border-radius="30">
-      <view class="popCentent">
-        <view class="tips">您还没有开通直播课程,无法观看</view>
-        <view class="btns" @click="toAuth()">立即开通</view>
-      </view>
-    </u-popup>
-  </view>
+		<u-popup v-model="showAuth" mode="center" border-radius="30">
+			<view class="popCentent">
+				<view class="tips">您还没有开通直播课程,无法观看</view>
+				<view class="btns" @click="toAuth()">立即开通</view>
+			</view>
+		</u-popup>
+	</view>
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import { tenantId } from "@/common/request.js";
-export default {
-  components: {},
-  data() {
-    return {
-      url: "",
-      webviewStyles: {
-        progress: {
-          color: "#007AFF",
-        },
-      },
-      options: {},
-      optObj: {},
-      goodsId: 0,
-      chapterId: 0,
-      moduleId: 0,
-      courseId: 0,
-      sectionId: 0,
-      orderGoodsId: 0,
-      paramObj: {},
-      showAuth: false,
-      checkStatus: 0, // 0没有权限,1有权限
-      goodsStatus: 0, // 0未上架,1上架
-      sectionType: 2, // 2直播
-      vid: "", // 回放id
-    };
-  },
-  onLoad(option) {
-    console.log("--option-", option);
-    this.options = option;
-  },
-  async onShow() {
-    // 刷新令牌
-    if (this.options.user_account) {
-      await this.doRequest();
-    }
-    if (this.$method.isGoLogin()) {
-      // 扫二维码进来的没登录需要跳到登录页,登录后返回
-      return;
-    }
-    // #ifdef H5
-    if (this.options.scene) {
-      this.options.scene = window.atob(this.options.scene);
-    }
-    // #endif
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		tenantId
+	} from "@/common/request.js";
+	export default {
+		components: {},
+		data() {
+			return {
+				url: "",
+				webviewStyles: {
+					progress: {
+						color: "#007AFF",
+					},
+				},
+				options: {},
+				optObj: {},
+				goodsId: 0,
+				chapterId: 0,
+				moduleId: 0,
+				courseId: 0,
+				sectionId: 0,
+				orderGoodsId: 0,
+				paramObj: {},
+				showAuth: false,
+				checkStatus: 0, // 0没有权限,1有权限
+				goodsStatus: 0, // 0未上架,1上架
+				sectionType: 2, // 2直播
+				vid: "", // 回放id
+			};
+		},
+		onLoad(option) {
+			console.log("--option-", option);
+			this.options = option;
+		},
+		async onShow() {
+			// 刷新令牌
+			if (this.options.user_account) {
+				await this.doRequest();
+			}
+			if (this.$method.isGoLogin()) {
+				// 扫二维码进来的没登录需要跳到登录页,登录后返回
+				return;
+			}
+			// #ifdef H5
+			if (this.options.scene) {
+				this.options.scene = window.atob(this.options.scene);
+			}
+			// #endif
 
-    if (this.options.scene) {
-      this.optObj = {};
-      let arrs = decodeURIComponent(this.options.scene).split("&");
-      for (let i = 0; i < arrs.length; i++) {
-        this.optObj[arrs[i].split("=")[0]] = arrs[i].split("=")[1];
-      }
-    }
-    // 有a字段是标识是扫二维码进来的
-    if (this.optObj.a == 1) {
-      if (!this.userInfo) {
-        this.getInfo();
-      } else {
-        this.getParam();
-      }
-    } else {
-      this.url =
-        decodeURIComponent(decodeURIComponent(this.options.url)) +
-        "&tid=" +
-        tenantId;
-      console.log("小程序进来的url:", this.url);
-      let index = this.url.indexOf("?");
-      let paramArr = this.url.slice(index + 1).split("&");
-      let paramObj = {};
-      for (let i = 0; i < paramArr.length; i++) {
-        paramObj[paramArr[i].split("=")[0]] = paramArr[i].split("=")[1];
-      }
-      this.paramObj = paramObj;
-      this.sectionType = this.paramObj.sectionType || 2; // 默认直播,回放的加了sectionType=3
-      this.vid = this.paramObj.vid || "";
-      this.studyLog(paramObj);
-    }
-  },
-  computed: {
-    ...mapGetters(["userInfo", "other"]),
-  },
-  methods: {
-    async doRequest() {
-      const res = await this.$http({
-        url: "/app/common/automatic/account_login",
-        method: "post",
-        noToken: true,
-        data: {
-          userAccount: this.options.user_account,
-        },
-      });
-      if (res.data.code === 200) {
-        uni.setStorageSync("token", res.data.data.token);
-        uni.setStorageSync("user_account", this.options.user_account);
-        this.$store.state.userInfo = null;
-        return Promise.resolve();
-      } else {
-        return Promise.reject("请求错误");
-      }
-    },
-    getInfo() {
-      // /app/user/getInfo 登录用户信息 // fromPlat来源平台 1小程序 2PC网站
-      this.$api.getInfo({ fromPlat: 1 }).then((res) => {
-        if (res.data.code == 200) {
-          this.$store.state.userInfo = res.data.data;
-          this.getParam();
-        }
-      });
-    },
-    // 获取直播间跳转参数的接口
-    getParam() {
-      const { cid, gid, sid } = this.optObj;
-      this.$http({
-        url: "/course/check/watch/per",
-        method: "get",
-        data: {
-          courseId: cid, //课程ID
-          goodsId: gid, // 商品id
-          sectionId: sid, // 节id
-        },
-      }).then((res) => {
-        if (res.data.code == 200) {
-          let item = res.data.data;
-          this.paramObj = item;
-          this.goodsId = item.goodsId;
-          this.goodsStatus = item.goodsStatus;
-          this.sectionType = item.sectionType;
-          this.vid = item.recordingUrl || "";
-          if (item.checkStatus == 1) {
-            // 有权限
-            let moduleId = item.moduleId || 0;
-            let chapterId = item.chapterId || 0;
-            let sectionId = item.sectionId;
+			if (this.options.scene) {
+				this.optObj = {};
+				let arrs = decodeURIComponent(this.options.scene).split("&");
+				for (let i = 0; i < arrs.length; i++) {
+					this.optObj[arrs[i].split("=")[0]] = arrs[i].split("=")[1];
+				}
+			}
+			// 有a字段是标识是扫二维码进来的
+			if (this.optObj.a == 1) {
+				if (!this.userInfo) {
+					this.getInfo();
+				} else {
+					this.getParam();
+				}
+			} else {
+				// #ifdef H5
+				window.location.href = decodeURIComponent(decodeURIComponent(this.options.url)) +
+					"&tid=" +
+					tenantId;
+				// #endif
+				this.url =
+					decodeURIComponent(decodeURIComponent(this.options.url)) +
+					"&tid=" +
+					tenantId;
+				console.log("小程序进来的url:", this.url);
+				let index = this.url.indexOf("?");
+				let paramArr = this.url.slice(index + 1).split("&");
+				let paramObj = {};
+				for (let i = 0; i < paramArr.length; i++) {
+					paramObj[paramArr[i].split("=")[0]] = paramArr[i].split("=")[1];
+				}
+				this.paramObj = paramObj;
+				this.sectionType = this.paramObj.sectionType || 2; // 默认直播,回放的加了sectionType=3
+				this.vid = this.paramObj.vid || "";
+				this.studyLog(paramObj);
+			}
+		},
+		computed: {
+			...mapGetters(["userInfo", "other"]),
+		},
+		methods: {
+			async doRequest() {
+				const res = await this.$http({
+					url: "/app/common/automatic/account_login",
+					method: "post",
+					noToken: true,
+					data: {
+						userAccount: this.options.user_account,
+					},
+				});
+				if (res.data.code === 200) {
+					uni.setStorageSync("token", res.data.data.token);
+					uni.setStorageSync("user_account", this.options.user_account);
+					this.$store.state.userInfo = null;
+					return Promise.resolve();
+				} else {
+					return Promise.reject("请求错误");
+				}
+			},
+			getInfo() {
+				// /app/user/getInfo 登录用户信息 // fromPlat来源平台 1小程序 2PC网站
+				this.$api.getInfo({
+					fromPlat: 1
+				}).then((res) => {
+					if (res.data.code == 200) {
+						this.$store.state.userInfo = res.data.data;
+						this.getParam();
+					}
+				});
+			},
+			// 获取直播间跳转参数的接口
+			getParam() {
+				const {
+					cid,
+					gid,
+					sid
+				} = this.optObj;
+				this.$http({
+					url: "/course/check/watch/per",
+					method: "get",
+					data: {
+						courseId: cid, //课程ID
+						goodsId: gid, // 商品id
+						sectionId: sid, // 节id
+					},
+				}).then((res) => {
+					if (res.data.code == 200) {
+						let item = res.data.data;
+						let newTime = parseInt(new Date().getTime() / 1000)
+						if (item.liveStartTime > newTime) {
+							//未开始
+							uni.showModal({
+								title: "提示",
+								content: "当前直播未开始",
+								showCancel: false,
+								success: (res) => {
+									if (res.confirm) {
+										uni.reLaunch({
+											url: "/pages/index/index"
+										})
+									}
+								}
+							})
+							return
+						} else if ((item.liveEndTime + 10800) < newTime) {
+							//已结束
+							uni.showModal({
+								title: "提示",
+								content: "当前直播已结束",
+								showCancel: false,
+								success: (res) => {
+									if (res.confirm) {
+										uni.reLaunch({
+											url: "/pages/index/index"
+										})
+									}
+								}
+							})
+							return
+						}
+						this.paramObj = item;
+						this.goodsId = item.goodsId;
+						this.goodsStatus = item.goodsStatus;
+						this.sectionType = item.sectionType;
+						this.vid = item.recordingUrl || "";
+						if (item.checkStatus == 1) {
+							// 有权限
+							let moduleId = item.moduleId || 0;
+							let chapterId = item.chapterId || 0;
+							let sectionId = item.sectionId;
 
-            let uuid = new Date().valueOf() + "";
-            // buyCourse 是否购买课程:1是 0否
-            this.url =
-              this.other.hostLive +
-              "/pages/live/index?token=" +
-              uni.getStorageSync("token") +
-              "&userInfo=" +
-              JSON.stringify(this.userInfo) +
-              "&channelId=" +
-              item.channelId +
-              "&gradeId=" +
-              0 +
-              "&courseId=" +
-              item.courseId +
-              "&goodsId=" +
-              item.goodsId +
-              "&orderGoodsId=" +
-              item.orderGoodsId +
-              "&sectionId=" +
-              sectionId +
-              "&chapterId=" +
-              chapterId +
-              "&moduleId=" +
-              moduleId +
-              "&buyCourse=" +
-              item.buyCourse +
-              "&ident=" +
-              uuid +
-              "&sectionType=" +
-              this.sectionType +
-              "&vid=" +
-              this.vid +
-              "&tid=" +
-              tenantId;
-            this.studyLog(item);
-          } else {
-            // 没有权限
-            this.url = "";
-            this.showAuth = true;
-          }
-        } else {
-          this.$u.toast(res.data.msg);
-          uni.switchTab({
-            url: "/pages/index/index",
-          });
-        }
-      });
-    },
-    // 新增用户视频学习日志
-    studyLog(item) {
-      this.$http({
-        url: "/user/study/log",
-        method: "post",
-        data: {
-          goodsId: item.goodsId,
-          courseId: item.courseId,
-          moduleId: item.moduleId || 0,
-          chapterId: item.chapterId || 0,
-          sectionId: item.sectionId || 0,
-          fromPlat: 1, //来源平台 1小程序 2PC网站
-          goodsType: 6, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
-          orderGoodsId: item.orderGoodsId,
-        },
-      }).then((res) => {
-        console.log("直播的用户学习日志:", res);
-      });
-    },
-    toAuth() {
-      if (this.goodsStatus == 1) {
-        //已上架
-        uni.navigateTo({
-          url: "/pages3/course/detail?id=" + this.goodsId + "&goodsType=6",
-        });
-      } else {
-        uni.switchTab({
-          url: "/pages/index/index",
-        });
-      }
-    },
-  },
-};
+							let uuid = new Date().valueOf() + "";
+							// buyCourse 是否购买课程:1是 0否
+							this.url =
+								this.other.hostLive +
+								"/pages/live/index?token=" +
+								uni.getStorageSync("token") +
+								"&userInfo=" +
+								JSON.stringify(this.userInfo) +
+								"&channelId=" +
+								item.channelId +
+								"&gradeId=" +
+								0 +
+								"&courseId=" +
+								item.courseId +
+								"&goodsId=" +
+								item.goodsId +
+								"&orderGoodsId=" +
+								item.orderGoodsId +
+								"&sectionId=" +
+								sectionId +
+								"&chapterId=" +
+								chapterId +
+								"&moduleId=" +
+								moduleId +
+								"&buyCourse=" +
+								item.buyCourse +
+								"&ident=" +
+								uuid +
+								"&sectionType=" +
+								this.sectionType +
+								"&vid=" +
+								this.vid +
+								"&tid=" +
+								tenantId;
+							this.studyLog(item);
+						} else {
+							// 没有权限
+							this.url = "";
+							this.showAuth = true;
+						}
+					} else {
+						this.$u.toast(res.data.msg);
+						uni.switchTab({
+							url: "/pages/index/index",
+						});
+					}
+				});
+			},
+			// 新增用户视频学习日志
+			studyLog(item) {
+				this.$http({
+					url: "/user/study/log",
+					method: "post",
+					data: {
+						goodsId: item.goodsId,
+						courseId: item.courseId,
+						moduleId: item.moduleId || 0,
+						chapterId: item.chapterId || 0,
+						sectionId: item.sectionId || 0,
+						fromPlat: 1, //来源平台 1小程序 2PC网站
+						goodsType: 6, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
+						orderGoodsId: item.orderGoodsId,
+					},
+				}).then((res) => {
+					console.log("直播的用户学习日志:", res);
+				});
+			},
+			toAuth() {
+				if (this.goodsStatus == 1) {
+					//已上架
+					uni.navigateTo({
+						url: "/pages3/course/detail?id=" + this.goodsId + "&goodsType=6",
+					});
+				} else {
+					uni.switchTab({
+						url: "/pages/index/index",
+					});
+				}
+			},
+		},
+	};
 </script>
 
 <style lang="scss" scoped>
-.popCentent {
-  width: 600rpx;
-  height: 300rpx;
-  padding: 24rpx;
-  text-align: center;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: space-between;
-  .btns {
-    width: 500rpx;
-    height: 80rpx;
-    line-height: 80rpx;
-    text-align: center;
-    background-color: #3577e8;
-    color: #fff;
-    font-size: 24rpx;
-    border-radius: 20rpx;
-  }
-}
-</style>
+	.popCentent {
+		width: 600rpx;
+		height: 300rpx;
+		padding: 24rpx;
+		text-align: center;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: space-between;
+
+		.btns {
+			width: 500rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: center;
+			background-color: #3577e8;
+			color: #fff;
+			font-size: 24rpx;
+			border-radius: 20rpx;
+		}
+	}
+</style>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio