谢杰标 2 rokov pred
rodič
commit
79a89b892c
41 zmenil súbory, kde vykonal 4217 pridanie a 3851 odobranie
  1. 11 0
      common/httpList/goods.js
  2. 11 1
      common/httpList/lock.js
  3. 36 30
      common/httpList/oss.js
  4. 76 81
      common/httpList/userInfo.js
  5. 124 2
      common/methodTool.js
  6. 23 1
      common/request.js
  7. 340 0
      components/common/BankBom.vue
  8. 148 56
      components/course/courseChapter.vue
  9. 56 7
      components/course/courseModule.vue
  10. 7 4
      components/course/courseSection.vue
  11. 4 18
      pages/index/index.vue
  12. 496 482
      pages/learn/index.scss
  13. 345 430
      pages/learn/index.vue
  14. 21 37
      pages/questionBank/index.vue
  15. 5 21
      pages/wd/index.vue
  16. 1 2
      pages2/appointment/index.vue
  17. 34 81
      pages2/class/questionBank.vue
  18. 9 10
      pages2/class/question_report.vue
  19. 2 2
      pages2/exam/exam_appointment.vue
  20. 7 0
      pages2/invoice/index.vue
  21. 2 2
      pages2/learn/details.vue
  22. 28 47
      pages2/learn/my_learn.vue
  23. 13 38
      pages2/order/confirm_list.vue
  24. 324 467
      pages2/verify/input.vue
  25. 475 394
      pages2/verify/input2.vue
  26. 26 82
      pages2/wd/class.vue
  27. 45 119
      pages2/wd/course.vue
  28. 28 46
      pages3/course/detail.vue
  29. 575 454
      pages3/live/detail.vue
  30. 417 257
      pages3/polyv/detail.vue
  31. 24 317
      pages5/examBank/index.vue
  32. 3 4
      pages5/examReport/index.vue
  33. 484 355
      pages5/mockExam/examApply.vue
  34. 1 1
      pages5/mockExam/registrationSuccess.vue
  35. 2 2
      pages5/mockRecord/mock_record.vue
  36. BIN
      static/icon_paper.png
  37. BIN
      static/icon_sheet.png
  38. BIN
      static/icon_star.png
  39. BIN
      static/icon_star_sel.png
  40. 14 0
      static/style/index.scss
  41. 0 1
      store/index.js

+ 11 - 0
common/httpList/goods.js

@@ -278,6 +278,7 @@ export default {
       url: "/collect/question/getInfo",
       data: data,
       method: "get",
+      noLoading: true,
     });
   },
 
@@ -393,6 +394,7 @@ export default {
     });
   },
 
+  // 获得所有视频列表
   studyRecordMenuAllList(data) {
     return myRequest({
       url: "/study/record/menuAllList",
@@ -401,6 +403,15 @@ export default {
     });
   },
 
+  // 获得所有视频+考试列表
+  studMenuAllList(data) {
+    return myRequest({
+      url: "/study/record/menuAllListWithExam",
+      method: "get",
+      data: data,
+    });
+  },
+
   goodsTodayStudySectionNum(data) {
     return myRequest({
       url: "/goods/todayStudySectionNum",

+ 11 - 1
common/httpList/lock.js

@@ -41,6 +41,16 @@ export default {
 		})
 	},
 	
-	
+    /**
+	 * @param {Object} data
+	 * 踢其他用户下线
+	 */
+	offline(data) {
+		return myRequest({
+			url: '/app/user/offline',
+			method: 'post',
+			data: data,
+		})
+	},
 	
 }

+ 36 - 30
common/httpList/oss.js

@@ -1,31 +1,37 @@
-import {
-	myRequest
-} from '../request.js'
+import { myRequest } from "../request.js";
 export default {
-	//回调
-	aliyuncallback(data) {
-		return myRequest({
-			url: '/aliyun/oss/callback',
-			method: 'post',
-			data: data
-		})
-	},
-	//policy获得
-	aliyunpolicy(data) {
-		return myRequest({
-			url: '/aliyun/oss/policy',
-			method: 'get',
-			data: data,
-			// noToken: true
-		})
-	},
-	//上传图片
-	aliyunpolicyupload(data) {
-		return myRequest({
-			url: '/aliyun/oss/upload',
-			method: 'post',
-			data: data
-			// noToken: true
-		})
-	},
-}
+  //回调
+  aliyuncallback(data) {
+    return myRequest({
+      url: "/aliyun/oss/callback",
+      method: "post",
+      data: data,
+    });
+  },
+  //policy获得
+  aliyunpolicy(data) {
+    return myRequest({
+      url: "/aliyun/oss/policy",
+      method: "get",
+      data: data,
+      // noToken: true
+    });
+  },
+  //上传图片
+  aliyunpolicyupload(data) {
+    return myRequest({
+      url: "/aliyun/oss/upload",
+      method: "post",
+      data: data,
+      // noToken: true
+    });
+  },
+  aliyunUpload(url, data) {
+    return myRequest({
+      url: url,
+      method: "post",
+      data,
+	  noToken: true
+    });
+  },
+};

+ 76 - 81
common/httpList/userInfo.js

@@ -1,82 +1,77 @@
-import {
-	myRequest
-} from '../request.js'
+import { myRequest } from "../request.js";
 export default {
-	//修改客户端用户
-	appuserInfo(data) {
-		return myRequest({
-			url: '/app/user/edit',
-			method: 'post',
-			data: data,
-		})
-	},
-	// 修改用户活动邀请码
-	shareActivityCode(data) {
-		return myRequest({
-			url: '/app/user/edit/shareActivityCode',
-			method: 'post',
-			data: data,
-		})
-	},
-	appInfoAttached(data) {
-		return myRequest({
-			url: '/app/user/infoAttached',
-			method: 'get',
-			data: data,
-		})
-	},
-	getSchoolInfo(data) {
-		return myRequest({
-			url: '/school/info/getInfo',
-			method: 'get',
-			data: data,
-		})
-	},
-	updateSchoolInfo(data) {
-		return myRequest({
-			url: '/school/info/edit',
-			method: 'post',
-			data: data,
-		})
-	},
-	getUserBuy(data) {
-		return myRequest({
-			url: '/system/user/list',
-			method: 'get',
-			data: data,
-		})
-	},
-	rankList(data) {
-		return myRequest({
-			url: '/app/user/rankingList',
-			method: 'get',
-			data: data,
-		})
-	},
-	getUserSubscribeRecentExam(data) {
-		return myRequest({
-			url: '/user/subscribe/recentExam',
-			method: 'get',
-			data: data,
-		})
-	},
-	
-	userConfirmInfoDetail(data) {
-			return myRequest({
-				url: '/user/confirm/info/detail',
-				method: 'GET',
-				data: data,
-			})
-		},
-		
-		userConfirminfo(data) {
-				return myRequest({
-					url: '/user/confirm/info',
-					method: 'post',
-					data: data,
-				})
-			},
-	
-	
-	
-}
+  //修改客户端用户
+  appuserInfo(data) {
+    return myRequest({
+      url: "/app/user/edit",
+      method: "post",
+      data: data,
+    });
+  },
+  // 修改用户活动邀请码
+  shareActivityCode(data) {
+    return myRequest({
+      url: "/app/user/edit/shareActivityCode",
+      method: "post",
+      data: data,
+    });
+  },
+  appInfoAttached(data) {
+    return myRequest({
+      url: "/app/user/infoAttached",
+      method: "get",
+      data: data,
+    });
+  },
+  getSchoolInfo(data) {
+    return myRequest({
+      url: "/school/info/getInfo",
+      method: "get",
+      data: data,
+    });
+  },
+  updateSchoolInfo(data) {
+    return myRequest({
+      url: "/school/info/edit",
+      method: "post",
+      data: data,
+    });
+  },
+  getUserBuy(data) {
+    return myRequest({
+      url: "/system/user/list",
+      method: "get",
+      data: data,
+    });
+  },
+  rankList(data) {
+    return myRequest({
+      url: "/app/user/rankingList",
+      method: "get",
+      data: data,
+    });
+  },
+  getUserSubscribeRecentExam(data) {
+    return myRequest({
+      url: "/user/subscribe/recentExam",
+      method: "get",
+      data: data,
+    });
+  },
+
+  userConfirmInfoDetail(data) {
+    return myRequest({
+      url: "/user/confirm/info/detail",
+      method: "GET",
+      data: data,
+    });
+  },
+
+  userConfirminfo(data) {
+    return myRequest({
+      url: "/user/confirm/info",
+      method: "post",
+      data: data,
+    });
+  },
+};

+ 124 - 2
common/methodTool.js

@@ -165,6 +165,9 @@ export default {
           res = year + "." + month + "." + day;
           break;
         case "yyyy-mm-dd hh:mm:ss":
+        case "yyyy/mm/dd":
+          res = year + "/" + month + "/" + day;
+          break;
         default: {
           res =
             year +
@@ -275,7 +278,14 @@ export default {
   uploadFile(options, int) {
     return new Promise((resolve, reject) => {
       var self = this;
-      if (options.indexOf("//tmp") === -1 && options.indexOf("//temp") === -1) {
+      // #ifdef MP-WEIXIN
+      const isJPG =
+        options.indexOf("//tmp") !== -1 || options.indexOf("//temp") !== -1;
+      // #endif
+      // #ifdef H5
+      const isJPG = true;
+      // #endif
+      if (!isJPG) {
         resolve(options);
         return;
       }
@@ -641,5 +651,117 @@ export default {
     let domain =
       /^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)|   (io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/;
     return domain.test(str);
-  }
+  },
+  isWeixin() {
+    var ua = window.navigator.userAgent.toLowerCase();
+    if (
+      ua.match(/MicroMessenger/i) == "micromessenger" ||
+      ua.match(/_SQ_/i) == "_sq_"
+    ) {
+      return true;
+    } else {
+      return false;
+    }
+  },
+  imageToBase64(url, quality = 0.8) {
+    return new Promise((resolve, reject) => {
+      url = this.splitImgHost(url);
+      // #ifdef MP-WEIXIN
+      let that = this;
+      uni.downloadFile({
+        url,
+        success: (res) => {
+          if (res.statusCode === 200) {
+            that.fileToBase64(res.tempFilePath).then((res) => {
+              resolve(res);
+            });
+          }
+        },
+      });
+      // #endif
+      // #ifdef H5
+      let image = new Image();
+      image.onload = function () {
+        let canvas = document.createElement("canvas");
+        canvas.width = image.width;
+        canvas.height = image.height;
+        let context = canvas.getContext("2d");
+        context.drawImage(image, 0, 0, image.width, image.height);
+        let base64 = canvas.toDataURL("image/jpeg", quality); //将图片格式转为base64
+        resolve(base64);
+      };
+      image.setAttribute("crossOrigin", "Anonymous");
+      image.src = url + "?time=" + Date.now();
+      image.onerror = () => {
+        reject(new Error("urlToBase64 error"));
+      };
+      // #endif
+    });
+  },
+  fileToBase64(url) {
+    return new Promise((resolve, reject) => {
+      // #ifdef MP-WEIXIN
+      let fileSystem = uni.getFileSystemManager();
+      fileSystem.readFile({
+        filePath: url,
+        encoding: "base64",
+        position: 0,
+        success: (res) => {
+          resolve("data:image/jpg;base64," + res.data);
+        },
+        fail(err) {
+          console.error(err, "err");
+        },
+      });
+      // #endif
+      // #ifdef H5
+      let reader = new FileReader();
+      reader.readAsDataURL(url);
+      reader.onload = (e) => {
+        resolve(e.target.result);
+      };
+      // #endif
+    });
+  },
+  isBase64(str) {
+    var reg =
+      /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*?)\s*$/i;
+    return reg.test(str);
+  },
+  isObject(object) {
+    return object !== null && typeof object === "object";
+  },
+  isEmptyObject(object) {
+    return this.isObject(object) && Object.keys(object).length < 1;
+  },
+  checkLock(action = "jxjy") {
+    return new Promise((resolve, reject) => {
+      api
+        .lockLockStatus({
+          action,
+          uuid: this.getUuid(),
+        })
+        .then((res) => {
+          if (res.data.code == 200) {
+            //有其他端在操作,不能学习
+            uni.showModal({
+              title: "提示",
+              content: "有其他端在操作,是否将该用户踢下线?",
+              success: (res) => {
+                if (res.confirm) {
+                  api.offline().then((r) => {
+                    if (r.data.code === 200) {
+                      resolve();
+                    }
+                  });
+                }
+              },
+            });
+          } else if (res.data.code == 500) {
+            //可以学习
+            resolve();
+          }
+        });
+    });
+  },
 };

+ 23 - 1
common/request.js

@@ -2,6 +2,7 @@ import store from "@/store/index.js";
 import config from "@/common/config";
 import method from "@/common/methodTool";
 var num = 1;
+let isLoginLose = false
 //接口api
 export const BASE_URL = config.BASE_URL;
 // #ifdef MP-WEIXIN
@@ -45,7 +46,7 @@ export const myRequest = (options) => {
           uni.hideLoading();
         }
         if (res.data.code == 401) {
-          if (num <= 2) {
+          if (num <= 10) {
             if (!uni.getStorageSync("user_account")) {
               var pages = getCurrentPages(); // 获取栈实例
               let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
@@ -70,6 +71,27 @@ export const myRequest = (options) => {
               uni.removeStorageSync("h5_code");
             }
           }
+        } else if (res.data.code == 409) {
+          if(isLoginLose){
+            return
+          }
+          isLoginLose = true
+          uni.removeStorageSync("user_account");
+          uni.removeStorageSync("token");
+          uni.removeStorageSync("h5_code");
+          uni.showModal({
+            content: "已从其他设备登录,是否重新登录!",
+            showCancel: false,
+            success: (k) => {
+              if (k.confirm) {
+                isLoginLose = false
+                uni.navigateTo({
+                  url: "/pages4/login/login",
+                });
+              }
+            },
+          });
+          reject();
         }
         resolve(res);
       },

+ 340 - 0
components/common/BankBom.vue

@@ -0,0 +1,340 @@
+<template>
+  <div>
+    <view class="bank-control fl_b">
+      <view class="fl_b left">
+        <view class="btn-item" style="" @click="openFooterTab">
+          <image src="/static/icon_sheet.png"></image>
+          <text>答题卡</text>
+        </view>
+        <view class="btn-item" @click="$emit('submit')">
+          <image src="/static/icon_paper.png" mode=""></image>
+          <text @click="$emit('submit')">交卷</text>
+        </view>
+      </view>
+      <view class="fl">
+        <view class="tab up" @click="prev">上一题</view>
+        <view class="tab down" @click="next">下一题</view>
+      </view>
+    </view>
+    <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
+      <view class="popupView">
+        <view class="popupTops">
+          <view class="topIcon"></view>
+          点击编号即可跳转至对应题目
+        </view>
+        <view class="popupContent">
+          <scroll-view scroll-y="true" style="height: 506rpx">
+            <view class="boxSty">
+              <view
+                v-for="(item, index) in questionList"
+                :key="index"
+                @click="changeIndex(index)"
+                :class="{
+                  isRight: bankType == 1 && isRight(item, index),
+                  isWrong: bankType == 1 && isWrong(item, index),
+                  isPart: bankType == 1 && isPart(item, index),
+                  isOver: bankType == 1 && isOver(item, index),
+                  check_ans: bankType == 2 && isCheck(item, index),
+                }"
+                class="liListSty"
+              >
+                {{ index + 1 }}
+              </view>
+            </view>
+          </scroll-view>
+        </view>
+      </view>
+    </u-popup>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "SaasMiniprogramBankBom",
+  props: {
+    questionList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    bankType: {
+      type: Number,
+    },
+    current: {
+      type: Number,
+    },
+  },
+  data() {
+    return {
+      show: false,
+    };
+  },
+  mounted() {},
+  methods: {
+    changeIndex(index) {
+      this.$emit("update:current", index);
+    },
+    prev() {
+      if (this.current == 0) {
+        uni.showToast({
+          icon: "none",
+          title: "已经是第一题了!",
+        });
+        return;
+      }
+      this.changeIndex(this.current - 1);
+    },
+    next() {
+      if (this.current >= this.questionList.length - 1) {
+        uni.showToast({
+          icon: "none",
+          title: "已经是最后一题了!",
+        });
+        return;
+      }
+      this.changeIndex(this.current + 1);
+    },
+    openFooterTab() {
+      this.show = true;
+    },
+    isCheck(item, index) {
+      // 案例题处理
+      let { ques, type, ans } = item;
+      if (type == 4) {
+        return ans.length == ques.length;
+      }
+      if (ques) {
+        return true;
+      }
+    },
+    isRight(item, index) {
+      //单选
+      if (this.questionList[index].ques) {
+        if (item.type == 1) {
+          return this.questionList[index].ques == this.questionList[index].ans;
+          //多选
+        } else if (item.type == 2) {
+          //每一项都相等
+          return this.questionList[index].ans.every((item, i) => {
+            return item == this.questionList[index].ques[i];
+          });
+          //判断
+        } else if (item.type == 3) {
+          return this.questionList[index].ques == this.questionList[index].ans;
+          // } else if (item.type == 5) {
+          // 	if(this.questionList[index].ques.text){
+          // 		return true
+          // 	}else{
+          // 		return false
+          // 	}
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    },
+    isWrong(item, index) {
+      if (this.questionList[index].ques) {
+        //单选
+        if (item.type == 1) {
+          return this.questionList[index].ques != this.questionList[index].ans;
+          //多选
+        } else if (item.type == 2) {
+          //每一项都相等
+          return this.questionList[index].ques.some((item, i) => {
+            return this.questionList[index].ans.indexOf(item) == -1;
+          });
+          //判断
+        } else if (item.type == 3) {
+          return this.questionList[index].ques != this.questionList[index].ans;
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    },
+    isPart(item, index) {
+      if (this.questionList[index].ques) {
+        if (item.type == 2) {
+          let isWrong = this.questionList[index].ques.some((item, i) => {
+            return this.questionList[index].ans.indexOf(item) == -1;
+          });
+
+          let isRight = this.questionList[index].ans.every((item, i) => {
+            return item == this.questionList[index].ques[i];
+          });
+
+          if (!isRight && !isWrong) {
+            return true;
+          }
+        }
+      } else {
+        return false;
+      }
+    },
+    isOver(item, index) {
+      if (this.questionList[index].ques) {
+        if (item.type == 4) {
+          //案例题
+          let isOver = item.jsonStr.every((jsonItem, indexs) => {
+            if (
+              jsonItem.type == 1 ||
+              jsonItem.type == 2 ||
+              jsonItem.type == 3
+            ) {
+              if (item.ques[indexs]) {
+                return true;
+              } else {
+                return false;
+              }
+            } else if (jsonItem.type == 5) {
+              if (
+                item.ques[indexs] &&
+                (item.ques[indexs].text || item.ques[indexs].imageList.length)
+              ) {
+                console.log("chil");
+                return true;
+              } else {
+                return false;
+              }
+            }
+          });
+
+          if (isOver) {
+            return true;
+          } else {
+            return false;
+          }
+        } else if (item.type == 5) {
+          //简答题
+          //每一项都相等
+          if (item.ques && (item.ques.imageList.length || item.ques.text)) {
+            return true;
+          }
+          //判断
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.bank-control {
+  background-color: #fff;
+  z-index: 78;
+  position: fixed;
+  bottom: 0rpx;
+  width: 100%;
+  height: 120rpx;
+  padding: 16rpx 28rpx 16rpx 48rpx;
+  .left {
+    width: 180rpx;
+  }
+  .btn-item {
+    text {
+      color: #333333;
+      font-size: 24rpx;
+      margin-top: 10rpx;
+      display: block;
+    }
+  }
+  image {
+    width: 40rpx;
+    height: 40rpx;
+    display: block;
+    margin: 0 auto;
+  }
+  .tab {
+    height: 88rpx;
+    line-height: 88rpx;
+    text-align: center;
+    border-radius: 16rpx;
+    font-size: 30rpx;
+    padding: 0 56rpx;
+  }
+  .up {
+    background: #e5f1ff;
+    color: #498afe;
+  }
+  .down {
+    background: #498afe;
+    color: #ffffff;
+    margin-left: 28rpx;
+  }
+}
+.popupView {
+  height: 100%;
+  padding-bottom: 100rpx;
+  .popupTops {
+    height: 77rpx;
+    border-bottom: 1rpx solid #eee;
+    text-align: center;
+    line-height: 77rpx;
+    font-size: 24rpx;
+    color: #999;
+    position: relative;
+    .topIcon {
+      position: absolute;
+      top: 10rpx;
+      left: 50%;
+      transform: translateX(-50%);
+      width: 80rpx;
+      height: 8rpx;
+      background-color: #999;
+      border-radius: 4rpx;
+    }
+  }
+  .boxSty {
+    padding: 44rpx 41rpx 0rpx;
+  }
+  .liListSty {
+    border: 1rpx solid #eeeeee;
+    width: 88rpx;
+    height: 88rpx;
+    border-radius: 32rpx;
+    text-align: center;
+    line-height: 88rpx;
+    color: #333;
+    font-size: 32rpx;
+    float: left;
+    margin: 20rpx 23rpx;
+
+    &.isRight {
+      border: 1rpx solid #eeeeee;
+      color: #fff;
+      background: #36c75a;
+    }
+
+    &.isWrong {
+      border: 1rpx solid #eeeeee;
+      color: #fff;
+      background: #ff3b30;
+    }
+
+    &.isPart {
+      border: 1rpx solid #eeeeee;
+      color: #fff;
+      background: #ffc53d;
+    }
+
+    &.isOver {
+      border: 1rpx solid #eeeeee;
+      color: #fff;
+      background: blue;
+    }
+    &.check_ans {
+      border: 1rpx solid #eeeeee;
+      color: #fff;
+      background: #007aff;
+    }
+  }
+}
+</style>

+ 148 - 56
components/course/courseChapter.vue

@@ -1,9 +1,18 @@
 <template>
   <view>
     <view class="title" @click="openChapter(menuItem)">
-      <u-icon name="arrow-down" color="#999" size="24" v-if="!down"></u-icon>
-      <u-icon name="arrow-right" color="#999" size="24" v-if="down"></u-icon>
-      <text class="menu_name">{{ menuItem.name }}</text>
+      <view>
+        <u-icon name="arrow-down" color="#999" size="24" v-if="!down"></u-icon>
+        <u-icon name="arrow-right" color="#999" size="24" v-if="down"></u-icon>
+        <text class="menu_name">{{ menuItem.name }}</text>
+      </view>
+
+      <view
+        class="title_status"
+        :class="['grey', 'blue', 'gre'][learnStatus + 1]"
+      >
+        {{ ["待学习", "学习中", "已学完"][learnStatus + 1] }}
+      </view>
     </view>
     <view v-show="!down">
       <view v-for="(itemM, indexM) in list" :key="indexM">
@@ -25,7 +34,7 @@
             :menuItem="itemM"
             :levelId="levelId + '-' + itemM.sectionId"
             :testType="2"
-            :ChapterSectionExam='sectionExam'
+            :ChapterSectionExam="sectionExam"
             :menuAllList="menuAllList"
           ></courseSection>
           <!-- @togoBack='togoBack()' -->
@@ -129,19 +138,21 @@ export default {
     sectionMaxNum: {
       default: undefined,
     },
-    // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播	
+    // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
     goodsType: {
       type: [Number, String],
       default: 0,
-    }, 
-    menuAllList: { // 课程所有子目录结构列表
-			type: Array,
-			default: () => []
-		},
-    // sectionItem: { // 用户最后一次看的录播的信息
-		// 	type: Object,
-		// 	default: () => {}
-		// },
+    },
+    menuAllList: {
+      // 课程所有子目录结构列表
+      type: Array,
+      default: () => [],
+    },
+    sectionItem: {
+      // 用户最后一次看的录播的信息
+      type: Object,
+      default: () => {},
+    },
   },
   components: {
     courseSection,
@@ -156,8 +167,7 @@ export default {
     };
   },
   onLoad() {},
-  created() {
-  },
+  created() {},
   mounted() {
     // console.log('needOpen:', this.needOpen, this.chapterOpen);
     if (this.needOpen && this.chapterOpen) {
@@ -256,26 +266,29 @@ export default {
     // 新增用户视频学习日志
     studyLog() {
       this.$http({
-        url: '/user/study/log',
-        method: 'post',
+        url: "/user/study/log",
+        method: "post",
         data: {
           goodsId: this.goodsId,
           courseId: this.courseId,
-					moduleId: this.menuItem.moduleId || 0,
-					chapterId: this.menuItem.chapterId || 0,
+          moduleId: this.menuItem.moduleId || 0,
+          chapterId: this.menuItem.chapterId || 0,
           sectionId: this.menuItem.sectionId || this.menuItem.menuId,
           fromPlat: 1, //来源平台 1小程序 2PC网站
           goodsType: this.goodsType, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
           orderGoodsId: this.orderGoodsId,
-        }
+        },
       }).then((res) => {
-        console.log('考试的用户学习日志:', res)
-      })
+        console.log("考试的用户学习日志:", res);
+      });
     },
     /**
      * 去做题
      */
     async toDo(id, goodsId = 0, moduleId = 0, chapterId = 0, item, index) {
+      if (item.doType === 2 && item.learning == 1) {
+        return;
+      }
       // 查询用户商品今天学习节数- /goods/todayStudySectionNum
       let learnNum = await this.goodsTodayStudySectionNum();
       // 检查用户是否学习过节 - /grade/grade/checkGoodsStudy
@@ -313,10 +326,13 @@ export default {
                 chapterId +
                 "&orderGoodsId=" +
                 this.orderGoodsId +
-				        "&type=1" + '&learning=' + item.learning
-                ,
+                "&type=1" +
+                "&learning=" +
+                item.learning +
+                "&isBackVideo=" +
+                1,
             });
-            this.studyLog()
+            this.studyLog();
             //没有答题次数限制
           } else if (item.answerNum == 0) {
             uni.navigateTo({
@@ -335,9 +351,13 @@ export default {
                 chapterId +
                 "&orderGoodsId=" +
                 this.orderGoodsId +
-				        "&type=1" + '&learning=' + item.learning,
+                "&type=1" +
+                "&learning=" +
+                item.learning +
+                "&isBackVideo=" +
+                1,
             });
-            this.studyLog()
+            this.studyLog();
           } else {
             uni.showToast({
               icon: "none",
@@ -352,13 +372,22 @@ export default {
             title: "请按顺序学完视频课程再进行练习和测试",
           });
         }
-      } else if (this.learningOrder == 2 && !item.rebuild) {
-        let canLearn = this.list[index - 1].learning == 1;
-
-        let rows = this.menuAllList
+      } else if (this.learningOrder == 2) {
+        //  !item.rebuild
+        let rows = this.menuAllList;
+        const index = this.menuAllList.findIndex((e) => {
+          let i_sectionId = e.sectionId || 0;
+          let i_chapterId = e.chapterId || 0;
+          let i_moduleId = e.moduleId || 0;
+          return (
+            i_sectionId == item.sectionId &&
+            i_chapterId == item.chapterId &&
+            i_moduleId == item.moduleId
+          );
+        });
         let isStop = false;
         let newRows = [];
-        for (let i = 0; i < rows.length; i++) {
+        for (let i = 0; i < index; i++) {
           let moduleTrue = rows[i].moduleId == moduleId;
           let chapterTrue = rows[i].chapterId == chapterId;
           if (moduleTrue && chapterTrue) {
@@ -381,7 +410,6 @@ export default {
         let isAllLearn = newRows.every((item) => {
           return item.studyStatus == 1;
         });
-
         if (isAllLearn) {
           //之前的都学完了
 
@@ -408,9 +436,13 @@ export default {
                 chapterId +
                 "&orderGoodsId=" +
                 this.orderGoodsId +
-				        "&type=1" + '&learning=' + item.learning,
+                "&type=1" +
+                "&learning=" +
+                item.learning +
+                "&isBackVideo=" +
+                1,
             });
-            this.studyLog()
+            this.studyLog();
             //没有答题次数限制
           } else if (item.answerNum == 0) {
             uni.navigateTo({
@@ -429,9 +461,13 @@ export default {
                 chapterId +
                 "&orderGoodsId=" +
                 this.orderGoodsId +
-				        "&type=1" + '&learning=' + item.learning,
+                "&type=1" +
+                "&learning=" +
+                item.learning +
+                "&isBackVideo=" +
+                1,
             });
-            this.studyLog()
+            this.studyLog();
           } else {
             uni.showToast({
               icon: "none",
@@ -468,9 +504,13 @@ export default {
               chapterId +
               "&orderGoodsId=" +
               this.orderGoodsId +
-              "&type=1" + '&learning=' + item.learning,
+              "&type=1" +
+              "&learning=" +
+              item.learning +
+              "&isBackVideo=" +
+              1,
           });
-          this.studyLog()
+          this.studyLog();
           //没有答题次数限制
         } else if (item.answerNum == 0) {
           uni.navigateTo({
@@ -489,9 +529,13 @@ export default {
               chapterId +
               "&orderGoodsId=" +
               this.orderGoodsId +
-              "&type=1" + '&learning=' + item.learning,
+              "&type=1" +
+              "&learning=" +
+              item.learning +
+              "&isBackVideo=" +
+              1,
           });
-          this.studyLog()
+          this.studyLog();
         } else {
           uni.showToast({
             icon: "none",
@@ -524,20 +568,23 @@ export default {
       if (!this.down && this.list.length == 0) {
         // console.log(item.id, 69);
         //获取章下面所有节试卷列表-course/sectionExamList
-        
-       this.$method.isLogin() && await this.$api.reSectionExamList({
-          chapterId: item.chapterId || item.menuId,
-          courseId: item.courseId,
-          gradeId: item.gradeId
-        }).then((res) => {
-          if (res.data.code == 200) {
-            this.sectionExam = res.data.data || []
-          }
-        })
+
+        this.$method.isLogin() &&
+          (await this.$api
+            .reSectionExamList({
+              chapterId: item.chapterId || item.menuId,
+              courseId: item.courseId,
+              gradeId: item.gradeId,
+            })
+            .then((res) => {
+              if (res.data.code == 200) {
+                this.sectionExam = res.data.data || [];
+              }
+            }));
 
         if (this.isBuy) {
           let moduleId = item.moduleId ? item.moduleId : 0;
-          let chapterId = item.chapterId || item.id
+          let chapterId = item.chapterId || item.id;
           if (this.isRebuild) {
             this.getReSectionList(chapterId, item.courseId, moduleId);
           } else {
@@ -566,7 +613,7 @@ export default {
     },
     getSectionList(chapterId) {
       let self = this;
-    //   url: '/app/common/course/sectionList/'+data,
+      //   url: '/app/common/course/sectionList/'+data,
       this.$api.sectionList(chapterId).then((res) => {
         if (res.data.code == 200) {
           for (let i = 0; i < res.data.data.length; i++) {
@@ -609,6 +656,7 @@ export default {
             for (let i = 0; i < res.data.data.length; i++) {
               let item = res.data.data[i];
               item.id = item.sectionId;
+              item.courseId = courseId;
               item.menuType = 3;
               //判断是否试听
               item.tryListen = false;
@@ -644,6 +692,7 @@ export default {
           if (res.data.code == 200) {
             for (let i = 0; i < res.data.data.length; i++) {
               let item = res.data.data[i];
+              item.courseId = courseId;
               item.id = item.sectionId;
               item.menuType = 3;
               //判断是否试听
@@ -668,7 +717,32 @@ export default {
         });
     },
   },
-  computed: { ...mapGetters(["goodsAuditionConfigIdList", "chapterOpen"]) },
+  computed: {
+    ...mapGetters(["goodsAuditionConfigIdList", "chapterOpen"]),
+    learnStatus() {
+      // console.log(this.menuItem, "this.menuItem");
+      let { id, courseId, moduleId } = this.menuItem;
+      // console.log(this.menuItem, id, courseId, moduleId, "this.menuItem");
+      // console.log(this.sectionItem,)
+      if (
+        this.sectionItem.courseId == courseId &&
+        this.sectionItem.moduleId == (moduleId || 0) &&
+        this.sectionItem.chapterId == id
+      ) {
+        return 0;
+      }
+      const list = this.menuAllList.filter(
+        (e) =>
+          e.courseId == courseId &&
+          e.moduleId == (moduleId || 0) &&
+          e.chapterId == id
+      );
+      const isAllLearn = list.every((item) => {
+        return item.studyStatus == 1;
+      });
+      return isAllLearn ? 1 : -1;
+    },
+  },
 };
 </script>
 
@@ -722,8 +796,9 @@ export default {
   // margin-bottom: 30rpx;
   height: 78rpx;
   display: flex;
+  justify-content: space-between;
   align-items: center;
-  border-bottom: 1rpx solid #EEEEEE;
+  border-bottom: 1rpx solid #eeeeee;
   .menu_name {
     font-size: 24rpx;
     font-family: PingFang SC;
@@ -734,5 +809,22 @@ export default {
     text-overflow: ellipsis;
     margin-left: 8rpx;
   }
+  .title_status {
+    width: 80rpx;
+    height: 28rpx;
+    border-radius: 8rpx;
+    font-size: 20rpx;
+    color: #ffffff;
+    text-align: center;
+  }
+  .gre {
+    background: #34c759;
+  }
+  .blue {
+    background: #409eff;
+  }
+  .grey {
+    background: #909399;
+  }
 }
 </style>

+ 56 - 7
components/course/courseModule.vue

@@ -2,10 +2,18 @@
   <!-- style="margin: 20rpx 0;" -->
   <view>
     <view class="title" @click="openModule(menuItem)">
-      <text class="title_name" style="margin-left: 10rpx">{{
-        menuItem.name
-      }}</text>
-      <view>
+      <text class="title_name" style="margin-left: 10rpx"
+        >{{ menuItem.name }}
+      </text>
+
+      <view class="fl">
+        <view
+          class="title_status"
+          :class="['grey', 'blue', 'gre'][learnStatus + 1]"
+          style="margin-right: 20rpx"
+        >
+          {{ ["待学习", "学习中", "已学完"][learnStatus + 1] }}
+        </view>
         <image src="/static/icon/up.png" class="icon_up" v-if="down"></image>
         <image src="/static/icon/down.png" class="icon_up" v-if="!down"></image>
       </view>
@@ -31,6 +39,7 @@
           :menuItem="itemM"
           :levelId="levelId + '-' + itemM.chapterId"
           :menuAllList="menuAllList"
+          :sectionItem="sectionItem"
         >
         </courseChapter>
         <u-line v-if="indexM < list.length - 1"></u-line>
@@ -58,7 +67,7 @@
             <view v-if="isRebuild || itemM.rebuild > 0" class="tagRe"
               >待重修</view
             >
-            <view v-else> 
+            <view v-else>
               <view
                 :class="{
                   tagGreen: itemM.learning == 1,
@@ -254,6 +263,9 @@ export default {
       item,
       index
     ) {
+      if (item.doType === 2 && item.learning == 1) {
+        return;
+      }
       let newRows = [];
       newRows = this.menuAllList.filter((e) => e.moduleId == moduleId);
       let isAllLearn = newRows.every((item) => {
@@ -278,7 +290,9 @@ export default {
             this.orderGoodsId +
             "&type=3" +
             "&learning=" +
-            item.learning,
+            item.learning +
+            "&isBackVideo=" +
+            1,
         });
       } else {
         uni.showToast({
@@ -288,7 +302,25 @@ export default {
       }
     },
   },
-  computed: { ...mapGetters(["chapterOpen"]) },
+  computed: {
+    ...mapGetters(["chapterOpen"]),
+    learnStatus() {
+      let { id, courseId } = this.menuItem;
+      if (
+        this.sectionItem.courseId == courseId &&
+        this.sectionItem.moduleId == id
+      ) {
+        return 0;
+      }
+      const list = this.menuAllList.filter(
+        (e) => e.courseId == courseId && e.moduleId == id
+      );
+      const isAllLearn = list.every((item) => {
+        return item.studyStatus == 1;
+      });
+      return isAllLearn ? 1 : -1;
+    },
+  },
 };
 </script>
 
@@ -311,6 +343,23 @@ export default {
     width: 24rpx;
     height: 24rpx;
   }
+  .title_status {
+    width: 80rpx;
+    height: 28rpx;
+    border-radius: 8rpx;
+    font-size: 20rpx;
+    color: #ffffff;
+    text-align: center;
+  }
+  .gre {
+    background: #34c759;
+  }
+  .blue {
+    background: #409eff;
+  }
+  .grey {
+    background: #909399;
+  }
 }
 
 .examBox {

+ 7 - 4
components/course/courseSection.vue

@@ -253,7 +253,9 @@ export default {
       this.isRebuild ? "isRebuild" : ""
     }`;
     this.playId = playNextId;
-    // console.log('playNextId:', this.playNextId, 'playId:', this.playId);
+    if(this.playSectionId == this.newId){
+      this.$store.commit("updatePlayNextId", playNextId);
+    }
     uni.$off("playNext" + playNextId); //绑定前先移除之前的事件
     uni.$once("playNext" + playNextId, async (data) => {
       //到时会触发每个节的监听事件,只允许当前节的接收
@@ -446,11 +448,12 @@ export default {
       if (this.$method.isGoLogin()) {
         return;
       }
-      if(this.menuItem.id==this.playSectionId){
-        return
+      if (this.menuItem.id == this.playSectionId) {
+        return;
       }
       this.clickLock = true;
-      if (this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) {
+      // && !this.menuItem.isRebuild
+      if (this.learningOrder == 2 && !this.isLive) {
         //要按从头到尾顺序学习, 且不是重修课程
         if (this.preItem) {
           // let rows = await this.studyRecordMenuAllList();

+ 4 - 18
pages/index/index.vue

@@ -723,25 +723,11 @@ export default {
             url: "/pages2/wd/class",
           });
         } else if (type == "bank") {
-          this.$api
-            .lockLockStatus({
-              action: "bank",
-            })
-            .then((res) => {
-              if (res.data.code == 200) {
-                //有其他端在操作,不能学习
-                uni.showToast({
-                  icon: "none",
-                  title: res.data.msg,
-                  duration: 3000,
-                });
-              } else if (res.data.code == 500) {
-                //可以学习
-                uni.navigateTo({
-                  url: "/pages2/wd/question_bank",
-                });
-              }
+          this.$method.checkLock("bank").then((res) => {
+            uni.navigateTo({
+              url: "/pages2/wd/question_bank",
             });
+          });
         }
       }
     },

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 496 - 482
pages/learn/index.scss


+ 345 - 430
pages/learn/index.vue

@@ -124,7 +124,8 @@
               v-if="bgShow(live.liveStartTime, live.watchStatus)"
               src="/static/learn/living_bg.png"
               class="my_bg"
-            ></image>
+            >
+            </image>
             <image
               v-else
               src="/static/learn/wlive_bg.png"
@@ -142,329 +143,6 @@
             :key="index"
             class="course_item"
           >
-            <view
-              class="titlews"
-              @click="studyIn(item.goodsId, item.gradeId, item, index)"
-            >
-              <view class="cou_titles">{{ item.goodsName }}</view>
-              <view
-                v-if="
-                  item.serviceStartTime &&
-                  item.serviceEndTime &&
-                  !item.externalLinkStatus
-                "
-                class="learn_ranges"
-              >
-                <image
-                  class="l_range"
-                  src="/static/learn/learn_range.png"
-                ></image>
-                学习周期:
-                <text class="l_time"
-                  >{{ item.serviceStartTime | formate("yyyy.mm.dd") }}-{{
-                    item.serviceEndTime | formate("yyyy.mm.dd")
-                  }}</text
-                >
-              </view>
-            </view>
-
-            <!-- 状态 -->
-            <view
-              v-if="item.goodsType == 1"
-              class="all_status"
-              @click="studyIn(item.goodsId, item.gradeId, item, index)"
-            >
-              <template v-if="!item.externalLinkStatus">
-                <!-- 不在学习服务期 -->
-                <template
-                  v-if="
-                    item.serviceStartTime &&
-                    (sysTime < item.serviceStartTime ||
-                      sysTime > item.serviceEndTime)
-                  "
-                >
-                  <view
-                    class="class-warm"
-                    v-if="item.gradeId != 0 && item.gradeStatus == 1"
-                  >
-                    <view class="class-warm__text">
-                      <view class="date"> 不在学习服务期,不可以学习了哦 </view>
-                    </view>
-                  </view>
-                </template>
-
-                <template v-else>
-                  <!-- 班级有效期过了 -->
-                  <template
-                    v-if="item.classEndTime && item.classEndTime < sysTime"
-                  >
-                    <view class="class-warm">
-                      <u-icon
-                        class="class-warm__icon"
-                        size="30"
-                        color="#FF3B30"
-                        name="error-circle-fill"
-                      >
-                      </u-icon>
-                      <view class="class-warm__text">
-                        <view class="date"
-                          >班级有效期:{{
-                            $method.timestampToTime(
-                              item.classStartTime,
-                              true,
-                              true
-                            )
-                          }}
-                          -
-                          {{
-                            $method.timestampToTime(
-                              item.classEndTime,
-                              true,
-                              true
-                            )
-                          }}</view
-                        >
-                        <view class="date">班级状态:已过期 </view>
-                        <!-- <view class="date"
-                          >班级状态:已过期,有疑问请联系
-                          <text @click="call()">020-87085982</text></view
-                        > -->
-                      </view>
-                    </view>
-                  </template>
-
-                  <!-- 班级有效期之前 -->
-                  <template
-                    v-else-if="
-                      item.classStartTime && item.classStartTime > sysTime
-                    "
-                  >
-                    <view class="class-warm">
-                      <u-icon
-                        class="class-warm__icon"
-                        size="30"
-                        color="#FF3B30"
-                        name="error-circle-fill"
-                      >
-                      </u-icon>
-                      <view class="class-warm__text">
-                        <view class="date"
-                          >班级有效期:{{
-                            $method.timestampToTime(
-                              item.classStartTime,
-                              true,
-                              true
-                            )
-                          }}
-                          -
-                          {{
-                            $method.timestampToTime(
-                              item.classEndTime,
-                              true,
-                              true
-                            )
-                          }}</view
-                        >
-                        <view class="date">班级状态:未到学习时间 </view>
-                        <!-- <view class="date"
-                          >班级状态:未到学习时间,有疑问请联系
-                          <text @click="call()">020-87085982</text></view
-                        > -->
-                      </view>
-                    </view>
-                  </template>
-
-                  <!-- 在班级有效期之间或者没有班级有效期 -->
-                  <template v-else>
-                    <view
-                      class="class-warm"
-                      v-if="
-                        item.gradeId != 0 &&
-                        item.gradeStatus == 1 &&
-                        item.classStatus != null
-                      "
-                    >
-                      <view class="class-warm__text">
-                        <view class="date">
-                          班级状态:
-                          <text v-if="item.classStatus == 1">已开班</text>
-                          <text v-if="item.classStatus == 0">未开班</text>
-                        </view>
-                        <view class="date" v-if="item.classStatus == 0"
-                          >教务处正在为您开通班级,请耐心等待</view
-                        >
-                        <view
-                          class="date"
-                          v-if="
-                            item.classStatus == 1 &&
-                            item.classStartTime &&
-                            item.classEndTime
-                          "
-                        >
-                          班级有效期:{{
-                            $method.timestampToTime(
-                              item.classStartTime,
-                              true,
-                              true
-                            )
-                          }}-{{
-                            $method.timestampToTime(
-                              item.classEndTime,
-                              true,
-                              true
-                            )
-                          }}
-                        </view>
-                      </view>
-                    </view>
-                    <!-- 学时审核状态不可审核 -->
-                    <template
-                      v-if="item.periodStatus == -1 || item.periodStatus == 2"
-                    >
-                      <view
-                        class="class-warm"
-                        v-if="
-                          item.classStatus == 1 || item.classStatus === null
-                        "
-                      >
-                        <view class="class-warm__text">
-                          <view class="date">
-                            <template
-                              v-if="
-                                sysTime >= item.serviceStartTime &&
-                                sysTime <= item.serviceEndTime
-                              "
-                            >
-                              学习状态:
-                              <text v-if="item.stuAllNum + item.recordNum == 0"
-                                >未学习</text
-                              >
-                              <text
-                                v-else-if="
-                                  item.stuAllNum + item.recordNum > 0 &&
-                                  item.stuAllNum + item.recordNum <
-                                    item.secAllNum + item.examNum
-                                "
-                                >学习中</text
-                              >
-                              <text
-                                v-else-if="
-                                  item.stuAllNum + item.recordNum >=
-                                  item.secAllNum + item.examNum
-                                "
-                                >已学完</text
-                              >
-                            </template>
-                            <template v-else>
-                              <template v-if="item.serviceStartTime"
-                                >已过学习服务期,不可以学习了哦!</template
-                              >
-                            </template>
-                          </view>
-                        </view>
-                      </view>
-                    </template>
-
-                    <!-- 学时审核状态可以审核 -->
-                    <template v-if="item.periodStatus != -1">
-                      <view class="class-warm">
-                        <view class="class-warm__text">
-                          <view class="date">
-                            <text v-if="item.periodStatus == 0"
-                              >机构审核:学时审核不通过</text
-                            >
-                            <!-- <text v-else-if="item.periodStatus == 2">学时待审核</text> -->
-                            <text v-else-if="item.periodStatus == 3"
-                              >学时审核中</text
-                            >
-                            <text v-else-if="item.periodStatus == 1">
-                              <text v-if="item.periodPlush > 0"
-                                >学时已上报信息中心</text
-                              >
-                              <text v-else>机构审核:学时审核通过</text>
-                            </text>
-                          </view>
-                        </view>
-                      </view>
-
-                      <view
-                        class="class-warm"
-                        v-if="
-                          item.subscribeId != null && item.periodStatus == 1
-                        "
-                      >
-                        <view class="class-warm__text">
-                          <view class="date">
-                            <view v-if="item.subExamStatus === null"
-                              >待预约考试</view
-                            >
-                            <view
-                              v-else-if="
-                                item.subExamStatus === 0 &&
-                                sysTime <
-                                  $method.TimeTotimestamp(
-                                    $method.timestampToTime(
-                                      item.subApplySiteExamTime,
-                                      true
-                                    ) +
-                                      ' ' +
-                                      item.subApplySiteStartTime
-                                  )
-                              "
-                            >
-                              待考试,考试时间:
-                              {{
-                                $method.timestampToTime(
-                                  item.subApplySiteExamTime,
-                                  true
-                                ) +
-                                " " +
-                                item.subApplySiteStartTime
-                              }}
-                              -
-                              {{
-                                $method.timestampToTime(
-                                  item.subApplySiteExamTime,
-                                  true
-                                ) +
-                                " " +
-                                item.subApplySiteEndTime
-                              }}
-                            </view>
-                            <view v-else-if="item.subExamStatus === 0"
-                              >待出考试结果</view
-                            >
-                            <view v-else-if="item.subExamStatus === 1">
-                              <text v-if="item.subResult === null"
-                                >待出考试结果</text
-                              >
-                              <text v-if="item.subResult === 0"
-                                >考试结果:不通过,需补考</text
-                              >
-                              <text v-else-if="item.subResult === 1"
-                                >考试结果:通过,考试成绩为{{
-                                  item.subPerformance
-                                }}</text
-                              >
-                            </view>
-                            <view v-else-if="item.subExamStatus === 2"
-                              >缺考,无成绩,需补考</view
-                            >
-                            <view v-else-if="item.subExamStatus === 3"
-                              >作弊,无成绩,需补考</view
-                            >
-                            <view v-else-if="item.subExamStatus === 4"
-                              >替考,无成绩,需补考</view
-                            >
-                          </view>
-                        </view>
-                      </view>
-                    </template>
-                  </template>
-                </template>
-              </template>
-            </view>
-
             <view
               class="c_downs"
               @click="studyIn(item.goodsId, item.gradeId, item, index)"
@@ -478,23 +156,9 @@
                 <view v-if="item.goodsType == 6" class="live_icon">直播</view>
               </view>
               <view class="rights">
-                <template
-                  v-if="
-                    item.externalLinkStatus ||
-                    (item.gradeStatus == 1 &&
-                      item.status == 1 &&
-                      item.serviceEndTime > sysTime &&
-                      item.serviceStartTime < sysTime &&
-                      item.classEndTime &&
-                      item.classEndTime < sysTime &&
-                      (item.periodStatus == 0 || item.periodStatus == -1) &&
-                      item.studyCount > 0)
-                  "
-                >
-                </template>
-                <view v-else class="learn_progress">
+                <view class="learn_progress">
                   <view class="progress_up">
-                    <!-- 学习进度 (已做试卷+已做节)/(试卷数+节数) -->
+                    <view class="cou_titles line2">{{ item.goodsName }}</view>
                     <view class="classHour">
                       <text
                         >{{
@@ -512,31 +176,185 @@
                       >
                       <text>{{ item.secAllNum + item.examNum || "-" }}节</text>
                     </view>
-                    <view class="scheduling">
-                      <view class="sche_bar">
-                        进度:{{ item.stuAllNum + item.recordNum }}/{{
-                          item.secAllNum + item.examNum
-                        }}
-                      </view>
-                      <view class="progress_bar">
-                        <u-line-progress
-                          :showText="false"
-                          height="22"
-                          active-color="#ff9900"
-                          :show-percent="false"
-                          :percent="
-                            ((item.stuAllNum + item.recordNum) /
-                              (item.secAllNum + item.examNum)) *
-                            100
-                          "
-                        ></u-line-progress>
-                      </view>
+                  </view>
+                </view>
+              </view>
+            </view>
+            <view class="course_item_info" v-if="item.goodsType !== 6">
+              <view>
+                <text>学习状态:</text>
+                <view
+                  style="display: inline-block; font-size: 24rpx"
+                  v-html="backLearStatusText(item)"
+                ></view>
+              </view>
+              <view>
+                <text>学习进度:</text>
+                <text>
+                  {{ item.stuAllNum + item.recordNum }}/{{
+                    item.secAllNum + item.examNum
+                  }}
+                </text>
+              </view>
+              <view>
+                <text>学习服务:</text>
+                <text>
+                  {{
+                    $method.formDate(item.serviceStartTime, "yyyy/mm/dd")
+                  }}至{{
+                    $method.formDate(item.serviceEndTime, "yyyy/mm/dd")
+                  }}</text
+                >
+              </view>
+              <view>
+                <text>班级状态:</text>
+                <text>
+                  {{ classStatusCompt(item, sysTime) }}
+                </text>
+              </view>
+              <view>
+                <text>班级有效:</text>
+                <template v-if="item.classEndTime">
+                  <text>
+                    {{ $method.formDate(item.classEndTime, "yyyy/mm/dd") }}
+                  </text>
+                  <text class="eb"
+                    >(剩余{{
+                      $method.GetRTime(item.classEndTime) > 0
+                        ? $method.GetRTime(item.classEndTime)
+                        : 0
+                    }}天)</text
+                  >
+                </template>
+                <text v-else>——</text>
+              </view>
+              <view
+                class="class-warm"
+                v-if="item.subscribeId != null && item.periodStatus == 1"
+              >
+                <view class="class-warm__text">
+                  <view class="date">
+                    <view v-if="item.subExamStatus === null">待预约考试</view>
+                    <view
+                      v-else-if="
+                        item.subExamStatus === 0 &&
+                        sysTime <
+                          $method.TimeTotimestamp(
+                            $method.timestampToTime(
+                              item.subApplySiteExamTime,
+                              true
+                            ) +
+                              ' ' +
+                              item.subApplySiteStartTime
+                          )
+                      "
+                    >
+                      待考试,考试时间:
+                      {{
+                        $method.timestampToTime(
+                          item.subApplySiteExamTime,
+                          true
+                        ) +
+                        " " +
+                        item.subApplySiteStartTime
+                      }}
+                      -
+                      {{
+                        $method.timestampToTime(
+                          item.subApplySiteExamTime,
+                          true
+                        ) +
+                        " " +
+                        item.subApplySiteEndTime
+                      }}
                     </view>
+                    <view v-else-if="item.subExamStatus === 0"
+                      >待出考试结果</view
+                    >
+                    <view v-else-if="item.subExamStatus === 1">
+                      <text v-if="item.subResult === null">待出考试结果</text>
+                      <text v-if="item.subResult === 0"
+                        >考试结果:不通过,需补考</text
+                      >
+                      <text v-else-if="item.subResult === 1"
+                        >考试结果:通过,考试成绩为{{
+                          item.subPerformance
+                        }}</text
+                      >
+                    </view>
+                    <view v-else-if="item.subExamStatus === 2"
+                      >缺考,无成绩,需补考</view
+                    >
+                    <view v-else-if="item.subExamStatus === 3"
+                      >作弊,无成绩,需补考</view
+                    >
+                    <view v-else-if="item.subExamStatus === 4"
+                      >替考,无成绩,需补考</view
+                    >
                   </view>
                 </view>
               </view>
             </view>
-
+            <view class="study_tips">
+              <div
+                v-if="
+                  item.erJianErZao && !item.classEndTime && !item.classStartTime
+                "
+              >
+                温馨提示:当前班级正在申请中,正式开班后方可进行学习,请耐心等待
+              </div>
+              <div
+                v-if="
+                  $method.GetRTime(item.serviceEndTime) <= 20 &&
+                  $method.GetRTime(item.serviceEndTime) >= 0 &&
+                  (item.periodStatus == 0 || item.periodStatus == -1)
+                "
+              >
+                温馨提示:当前学习服务期至{{
+                  $method.timestampToTime(item.serviceEndTime)
+                }},超期学时无效,为防审核异常请于{{
+                  $method.timestampToTime(item.serviceEndTime - 864000, false)
+                }}
+                前完成学习,当前剩余有效学习时间为{{
+                  $method.GetRTime(item.serviceEndTime) < 0
+                    ? 0
+                    : $method.GetRTime(item.serviceEndTime)
+                }}天。
+              </div>
+              <div
+                v-if="
+                  item.gradeStatus == 1 &&
+                  item.status == 1 &&
+                  item.serviceEndTime > sysTime &&
+                  item.serviceStartTime < sysTime &&
+                  item.classEndTime &&
+                  item.classEndTime < sysTime &&
+                  (item.periodStatus == 0 || item.periodStatus == -1)
+                "
+              >
+                <span v-if="item.studyCount > 0"
+                  >温馨提示:班级已过期,如需重新学习,请点击右侧“选班重学”按钮。</span
+                >
+                <span v-else
+                  >温馨提示:班级已过期,您的重学次数已用完,如有疑问请联系{{
+                    $store.state.userInfo.eduPhone
+                  }}</span
+                >
+              </div>
+              <div v-if="item.serviceEndTime && item.serviceEndTime < sysTime">
+                温馨提示:学习服务期已截至,如有疑问请联系:{{
+                  $store.state.userInfo.eduPhone
+                }}
+              </div>
+              <div v-if="item.periodStatus === 2">
+                温馨提示:您已完成本课程所有学时学习,我校将对学时进行审核,审核及推送时长预估15个工作日,如有疑问请联系:{{
+                  $store.state.userInfo.eduPhone
+                }},学时查询网址:http://gdzczx.gdcic.net
+              </div>
+              <div v-if="item.periodStatus === 1">
+                温馨提示:您的班级学习初审已通过,待广东省建设信息中心归集学时,归集完成即为完成本次继续教育学习。归集学时需约10-15个工作日,具体以广东省建设执业资格注册服务平台的“继续教育学时查询”公布学时记录为准,学时查询网址:http://gdzczx.gdcic.net
+              </div>
+            </view>
             <!-- 按钮 -->
             <view class="study_btns">
               <template
@@ -818,6 +636,68 @@ export default {
     allCourse() {
       return this.courseLists.length || this.livingLists.length ? true : false;
     },
+    eduPhone() {
+      return this.userInfo.eduPhone;
+    },
+    backLearStatusText() {
+      return ({
+        periodStatus,
+        stuAllNum,
+        recordNum,
+        secAllNum,
+        examNum,
+        periodPlush,
+      }) => {
+        let text = "";
+        let color = "";
+        if (periodStatus === -1) {
+          const stuAll = stuAllNum + recordNum;
+          const secAll = secAllNum + examNum;
+          let index = 0;
+          if (stuAll == 0) {
+            index = 0;
+          } else if (stuAll > 0 && stuAll < secAll) {
+            index = 1;
+          } else if (stuAll >= secAll) {
+            index = 2;
+          }
+          text = ["未开始", "学习中", "已学完"][index];
+          color = ["#EB5757", "#498AFE", "#498AFE"][index];
+        } else {
+          text = [
+            "审核不通过",
+            periodPlush > 0 ? "学时已上报信息中心" : "学时审核通过",
+            "待审核",
+            "初审完成",
+          ][periodStatus];
+          color = ["#EB5757", "#F67205", "#F67205", "#F67205"][periodStatus];
+        }
+        return `<span style='color: ${color}'>${text}</span>`;
+      };
+    },
+    classStatusCompt: function () {
+      return function (item, sysTime) {
+        var str = "未开班";
+        if (item.classEndTime && item.classEndTime < sysTime) {
+          str = "已过期";
+        } else if (item.classStartTime && item.classStartTime > sysTime) {
+          str = "未开始";
+        } else if (
+          item.gradeId &&
+          item.gradeStatus == 1 &&
+          item.classStatus === 1
+        ) {
+          str = "已开班";
+        } else if (
+          item.gradeId &&
+          item.gradeStatus == 1 &&
+          item.classStatus === 0
+        ) {
+          str = "未开班";
+        }
+        return str;
+      };
+    },
   },
   onLoad() {
     // 1668873600 ,2022.11.20的时间戳
@@ -839,7 +719,7 @@ export default {
     this.getCourseLiveQues();
   },
   onReachBottom() {
-    if (this.courseLists.length <= this.total) {
+    if (this.courseLists.length < this.total) {
       this.paramC.pageNum++;
       this.getCourseList();
     }
@@ -1045,11 +925,10 @@ export default {
           });
           return;
         } else {
-          // ,有疑问,请联系020-87085982
+          const text = this.eduPhone ? ",有疑问,请联系" + this.eduPhone : "";
           uni.showModal({
             showCancel: false,
-            content:
-              "您的学习账号未开通,请稍后再尝试,有疑问!",
+            content: "您的学习账号未开通,请稍后再尝试" + text,
           });
           return;
         }
@@ -1105,21 +984,19 @@ export default {
         title: "拼命加载中...",
         mask: true,
       });
-      var confirmDetail = true;
-      if (item.educationName == "继续教育") {
-        if (
-          item.officialName &&
-          item.businessName == "二级" &&
-          item.projectName == "建造师"
-        ) {
-          confirmDetail = await this.userConfirmInfoDetail();
-        }
-      }
-
-      if (!confirmDetail) {
-        return;
-      }
-
+      // var confirmDetail = true;
+      // if (item.educationName == "继续教育") {
+      //   if (
+      //     item.officialName &&
+      //     item.businessName == "二级" &&
+      //     item.projectName == "建造师"
+      //   ) {
+      //     confirmDetail = await this.userConfirmInfoDetail();
+      //   }
+      // }
+      // if (!confirmDetail) {
+      //   return;
+      // }
       this.itemIndex = index;
       if (
         item.gradeStatus == 1 &&
@@ -1150,56 +1027,90 @@ export default {
         return;
       }
 
-      // /lock/lockStatus
-      this.$api
-        .lockLockStatus({
-          action: "jxjy",
-          uuid: this.$method.getUuid(),
-        })
-        .then((res) => {
+      this.$method.checkLock().then(() => {
+        this.$http({
+          url: "/course/courseList",
+          method: "get",
+          data: {
+            pageNum: 1,
+            pageSize: 100,
+            goodsId: item.goodsId,
+            gradeId: item.gradeId,
+            orderGoodsId: item.orderGoodsId,
+          },
+          noLoading: true,
+        }).then((res) => {
           if (res.data.code == 200) {
-            //有其他端在操作,不能学习
+            if (res.data.total > 1) {
+              // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
+              uni.navigateTo({
+                url: `/pages3/polyv/detail?id=''&goodsId=${
+                  item.goodsId
+                }&orderGoodsId=${item.orderGoodsId}&gradeId=${
+                  item.gradeId
+                }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
+              });
+            } else if (res.data.total == 1) {
+              uni.navigateTo({
+                url: `/pages3/polyv/detail?id=${
+                  res.data.rows[0].courseId
+                }&goodsId=${item.goodsId}&orderGoodsId=${
+                  item.orderGoodsId
+                }&gradeId=${item.gradeId}&periodWaitTime=${
+                  item.periodWaitTime ? "" : 1
+                }`,
+              });
+            } else {
+              uni.showToast({
+                icon: "none",
+                title: "暂无可观看的视频课程",
+              });
+            }
+          }
+        });
+      });
+    },
+    toDetail() {
+      this.$http({
+        url: "/course/courseList",
+        method: "get",
+        data: {
+          pageNum: 1,
+          pageSize: 100,
+          goodsId: item.goodsId,
+          gradeId: item.gradeId,
+          orderGoodsId: item.orderGoodsId,
+        },
+        noLoading: true,
+      }).then((res) => {
+        if (res.data.code == 200) {
+          if (res.data.total > 1) {
+            // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
+            uni.navigateTo({
+              url: `/pages3/polyv/detail?id=''&goodsId=${
+                item.goodsId
+              }&orderGoodsId=${item.orderGoodsId}&gradeId=${
+                item.gradeId
+              }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
+            });
+          } else if (res.data.total == 1) {
+            uni.navigateTo({
+              url: `/pages3/polyv/detail?id=${
+                res.data.rows[0].courseId
+              }&goodsId=${item.goodsId}&orderGoodsId=${
+                item.orderGoodsId
+              }&gradeId=${item.gradeId}&periodWaitTime=${
+                item.periodWaitTime ? "" : 1
+              }`,
+            });
+          } else {
             uni.showToast({
               icon: "none",
-              title: res.data.msg,
-              mask: true,
-              duration: 3000,
+              title: "暂无可观看的视频课程",
             });
-          } else if (res.data.code == 500) {
-            //可以学习
-            this.$http({
-              url: "/course/courseList",
-              method: "get",
-              data: {
-                pageNum: 1,
-                pageSize: 100,
-                goodsId: item.goodsId,
-                gradeId: item.gradeId,
-                orderGoodsId: item.orderGoodsId,
-              },
-              noLoading: true,
-            }).then((res) => {
-              if (res.data.code == 200) {
-                if (res.data.total > 1) {
-                  // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-                  uni.navigateTo({
-                    url: `/pages3/polyv/detail?id=''&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
-                  });
-                } else if (res.data.total == 1) {
-                  uni.navigateTo({
-                    url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
-                  });
-                } else {
-                  uni.showToast({
-                    icon: "none",
-                    title: "暂无可观看的视频课程",
-                  });
-                }
-              }
-            });
-            return;
           }
-        });
+        }
+      });
     },
     /**
      * @param {Object} goodsId 商品id
@@ -1244,12 +1155,13 @@ export default {
             if (res.data.data.pushInfo) {
               resolve(true);
             } else {
-              // ,有疑问,请联系020-87085982
+              const text = this.eduPhone
+                ? ",有疑问,请联系" + this.eduPhone
+                : "";
               uni.showModal({
                 showCancel: false,
                 title: "提示",
-                content:
-                  "开通信息推送不成功,无法进入学习!",
+                content: "开通信息推送不成功,无法进入学习" + text,
               });
               resolve(false);
             }
@@ -1375,12 +1287,13 @@ export default {
                   title: "提交成功",
                 });
               } else {
-                // ,有疑问,请联系020-87085982
+                const text = this.eduPhone
+                  ? ",有疑问,请联系" + this.eduPhone
+                  : "";
                 uni.showModal({
                   showCancel: false,
                   title: "提示",
-                  content:
-                    "开通信息推送不成功,无法进入学习!",
+                  content: "开通信息推送不成功,无法进入学!" + text,
                 });
               }
               this.showUserConfirmInfo = false;
@@ -1399,9 +1312,11 @@ export default {
       clearInterval(this.confirmTimer);
     },
     call() {
+      // #ifdef MP-WEIXIN
       uni.makePhoneCall({
         phoneNumber: "020-87085982", //仅为示例
       });
+      // #endif
     },
     closePop() {
       this.appointTestShow = false;

+ 21 - 37
pages/questionBank/index.vue

@@ -198,43 +198,27 @@ export default {
       });
     },
     toDailyPractice(item, child) {
-      this.$api
-        .lockLockStatus({
-          action: "bank",
-          uuid: this.$method.getUuid(),
-        })
-        .then((res) => {
-          if (res.data.code == 200) {
-            //有其他端在操作,不能学习
-            uni.showToast({
-              icon: "none",
-              title: res.data.msg,
-              duration: 3000,
-            });
-          } else if (res.data.code == 500) {
-            //可以学习
-
-            if (child.paperName == "每日一练") {
-              uni.navigateTo({
-                url:
-                  "/pages2/dailyPractice/index?goodsId=" +
-                  item.goodsId +
-                  "&orderGoodsId=" +
-                  item.orderGoodsId,
-              });
-            } else if (child.paperName == "随机练习") {
-              uni.navigateTo({
-                url:
-                  "/pages2/randomPractice/index?goodsId=" +
-                  item.goodsId +
-                  "&orderGoodsId=" +
-                  item.orderGoodsId,
-              });
-            } else {
-              this.studyques(item, child);
-            }
-          }
-        });
+      this.$method.checkLock("bank").then((res) => {
+        if (child.paperName == "每日一练") {
+          uni.navigateTo({
+            url:
+              "/pages2/dailyPractice/index?goodsId=" +
+              item.goodsId +
+              "&orderGoodsId=" +
+              item.orderGoodsId,
+          });
+        } else if (child.paperName == "随机练习") {
+          uni.navigateTo({
+            url:
+              "/pages2/randomPractice/index?goodsId=" +
+              item.goodsId +
+              "&orderGoodsId=" +
+              item.orderGoodsId,
+          });
+        } else {
+          this.studyques(item, child);
+        }
+      });
     },
     // 进入练习
     studyques(item, child) {

+ 5 - 21
pages/wd/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <view style="height:100%">
+  <view style="height: 100%">
     <nav-logo title="我的"></nav-logo>
     <view v-if="isLogin" class="imgs_bg">
       <view class="infos">
@@ -143,7 +143,6 @@
       </view>
       <view class="logout" @click="logout">退出</view>
     </view>
-
   </view>
 </template>
 
@@ -196,26 +195,11 @@ export default {
       });
     },
     goBank() {
-      this.$api
-        .lockLockStatus({
-          action: "bank",
-        })
-        .then((res) => {
-          if (res.data.code == 200) {
-            //有其他端在操作,不能学习
-            uni.showToast({
-              icon: "none",
-              title: res.data.msg,
-              duration: 3000,
-            });
-          } else if (res.data.code == 500) {
-            //可以学习
-
-            uni.navigateTo({
-              url: "/pages2/wd/question_bank",
-            });
-          }
+      this.$method.checkLock("bank").then((res) => {
+        uni.navigateTo({
+          url: "/pages2/wd/question_bank",
         });
+      });
     },
     getNums() {
       this.$api.getinfoAttached().then((res) => {

+ 1 - 2
pages2/appointment/index.vue

@@ -154,8 +154,7 @@ export default {
           res.data.data.applyStatus = res.data.data.applyStatus.split(",");
         }
         this.listData = res.data.data;
-        this.reportStatus = res.data.data.reportStatus
-        console.log('reportStatus', this.reportStatus)
+        // this.reportStatus = res.data.data.reportStatus
       });
     },
     next() {

+ 34 - 81
pages2/class/questionBank.vue

@@ -25,7 +25,17 @@
               <view style="color: #666; font-size: 28rpx">{{
                 countdown(lastTime)
               }}</view>
-              <view class="leftLetters"></view>
+              <view
+                class="leftLetters"
+                @click="collect(collectList[bankIndex], bankIndex)"
+                style="justify-content: flex-end"
+              >
+                <image
+                  v-if="collectList[bankIndex]"
+                  src="/static/icon_star_sel.png"
+                ></image>
+                <image v-else src="/static/icon_star.png"></image>
+              </view>
             </view>
             <view class="titles">
               <rich-text :nodes="bank.content"></rich-text>
@@ -662,44 +672,16 @@
               </template>
             </view>
           </template>
-
-          <view class="footer_btn">
-            <!-- <view class="collect">
-              <view v-if="collectList[bankIndex]">
-                <image src="/static/icon/collected.png" mode=""></image>
-                <view>取消收藏</view>
-              </view>
-            </view> -->
-            <view
-              class="collect show"
-              @click="collect(collectList[bankIndex], bankIndex)"
-            >
-              <view v-if="collectList[bankIndex]">
-                <image src="/static/icon/collected.png" mode=""></image>
-                <view>取消收藏</view>
-              </view>
-              <view v-if="!collectList[bankIndex]">
-                <image src="/static/icon/collect.png" mode=""></image>
-                <view>收藏</view>
-              </view>
-            </view>
-            <view class="flex_center" @click="openFooterTab">
-              <view class="up-icon">
-                <image src="/static/up.png"></image>
-              </view>
-              答题卡
-            </view>
-            <view class="collect show" @click="pdsubmit">
-              <view>
-                <image src="/static/jj.png" mode=""></image>
-                <view>交卷</view>
-              </view>
-            </view>
-          </view>
         </view>
       </swiper-item>
     </swiper>
-
+    <bank-bom
+      v-if="questionList.length"
+      :questionList="questionList"
+      :bankType="bankType"
+      :current.sync="current"
+      @submit="pdsubmit"
+    ></bank-bom>
     <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
       <view class="popupView">
         <view class="popupTops">
@@ -911,9 +893,11 @@
 
 <script>
 import PopupPhoto from "@/components/popup/index.vue";
+import BankBom from "../../components/common/BankBom.vue";
 export default {
   components: {
     PopupPhoto,
+    BankBom,
   },
   data() {
     return {
@@ -967,6 +951,7 @@ export default {
       // h5
       faceUrl: "",
       simulateExamId: undefined,
+      isBackVideo: "",
     };
   },
   watch: {
@@ -982,7 +967,7 @@ export default {
   async onLoad(option) {
     this.examType = option.type;
     this.id = option.id;
-    this.goodsId = option.goodsid;
+    this.goodsId = option.goodsid || "";
     this.chapterId = option.chapterId;
     this.courseId = option.courseId;
     this.sectionId = option.sectionId;
@@ -991,7 +976,7 @@ export default {
     this.gradeId = option.gradeId || "";
     this.orderGoodsId = Number(option.orderGoodsId);
     let isBack = option.isback;
-
+    this.isBackVideo = option.isBackVideo;
     let showDialog = uni.getStorageSync("showDialog");
 
     if (showDialog) {
@@ -2286,26 +2271,16 @@ export default {
               setTimeout(() => {
                 uni.redirectTo({
                   url:
-                    "/pages2/class/question_report?rightQuestionNum=" +
-                    form.rightQuestionNum +
-                    "&doWrongQuestionNum=" +
-                    form.questionIds.length +
-                    "&score=" +
-                    form.performance +
-                    "&totalScore=" +
-                    form.totalScore +
-                    "&reportStatus=" +
-                    form.reportStatus +
-                    "&lessQuestionNum=" +
-                    form.lessQuestionNum +
-                    "&examId=" +
-                    this.id +
-                    "&recordId=" +
+                    "/pages2/class/question_report?recordId=" +
                     this.recordId +
                     "&type=" +
                     this.examType +
                     "&orderGoodsId=" +
-                    this.orderGoodsId,
+                    this.orderGoodsId +
+                    "&isBackVideo=" +
+                    this.isBackVideo +
+                    "&bankType=" +
+                    this.bankType,
                 });
               }, 1000);
             }
@@ -3144,6 +3119,11 @@ export default {
     color: #007aff;
     margin-right: 15rpx;
   }
+  image {
+    width: 40rpx;
+    height: 40rpx;
+    padding-right: 8rpx;
+  }
 }
 
 .firstLetter {
@@ -3248,33 +3228,6 @@ export default {
       }
     }
   }
-
-  .collect {
-    visibility: hidden;
-    width: 100rpx;
-
-    &.show {
-      visibility: visible;
-    }
-
-    > view {
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-
-      image {
-        width: 32rpx;
-        height: 32rpx;
-        margin-bottom: 6rpx;
-      }
-
-      view {
-        font-size: 24rpx;
-        color: #999999;
-      }
-    }
-  }
 }
 
 .boxSty {

+ 9 - 10
pages2/class/question_report.vue

@@ -95,6 +95,7 @@
         </navigator>
         <view
           class="btnACs"
+          v-if="score < totalScore * 0.6 || bankType == 1"
           @click="
             doRepeat(
               reportdata.examId,
@@ -105,6 +106,9 @@
           "
           >重新做题</view
         >
+        <navigator v-if="isBackVideo" open-type="navigateBack">
+          <view class="btnACs">返回学习</view>
+        </navigator>
         <!-- <view class="btnACs" v-if="nextExamId" @click="backBank">继续做题</view> -->
       </view>
     </view>
@@ -200,6 +204,8 @@ export default {
       reportdata: {},
       examType: 0, // 3-模块,1-章,2-节
       orderGoodsId: "",
+      bankType: "",
+      isBackVideo: "",
     };
   },
   onPullDownRefresh() {
@@ -239,15 +245,8 @@ export default {
     this.recordId = option.recordId;
     this.examId = option.examId;
     this.orderGoodsId = option.orderGoodsId;
-    // this.examTime = option.examTime;
-    // this.doTime = option.doTime;
-    // this.reportStatus = option.reportStatus;
-    // this.rightQuestionNum = +option.rightQuestionNum;
-    // this.doWrongQuestionNum = +option.doWrongQuestionNum;
-    // this.score = +option.score;
-    // this.lessQuestionNum = option.lessQuestionNum;
-    // this.totalScore = +option.totalScore;
-    // this.hideBtns = Boolean(option.hideBtns);
+    this.bankType = option.bankType;
+    this.isBackVideo = option.isBackVideo;
     this.bankReport();
   },
   methods: {
@@ -425,7 +424,7 @@ export default {
       // answerNum==0没有答题次数限制
       if (answerNum == 0 || (answerNum - count > 0 && answerNum > 0)) {
         const { courseId, gradeId, sectionId } = this.reportdata;
-        uni.navigateTo({
+        uni.redirectTo({
           url:
             "/pages2/class/questionBank?courseId=" +
             courseId +

+ 2 - 2
pages2/exam/exam_appointment.vue

@@ -54,12 +54,12 @@
 							</view>
 						</view>
 						<!-- applyReportStatus是否显示签署承诺书 1是,0否 v-if="item.applyReportStatus == 0"-->
-						<view v-if="item.applyReportStatus == 1" class="item" @click="toSign(item)">
+						<!-- <view v-if="item.applyReportStatus == 1" class="item" @click="toSign(item)">
 							<view class="left">疫情防控承诺书</view>
 							<view class="right unSign" >
 								{{ item.reportStatus == 1 ? '已签署' : item.reportStatus == 0 ? '未签署' : '' }}
 							</view>
-						</view>
+						</view> -->
 					</view>
 				</view>
 			</view>

+ 7 - 0
pages2/invoice/index.vue

@@ -55,6 +55,9 @@
                   v-model="form.invoiceTitle"
                 />
               </u-form-item>
+              <u-form-item label="发票备注" label-width="150">
+                <u-input placeholder="请输入发票备注" v-model="form.invoiceRemark" />
+              </u-form-item>
               <u-form-item label="邮箱" label-width="150" required prop="email">
                 <u-input placeholder="请输入邮箱" v-model="form.email" />
               </u-form-item>
@@ -178,6 +181,9 @@
                   v-model="form.invoiceTitle"
                 />
               </u-form-item>
+              <u-form-item label="发票备注" label-width="150">
+                <u-input placeholder="请输入发票备注" v-model="form.invoiceRemark" />
+              </u-form-item>
               <u-form-item label="邮箱" label-width="150" required prop="email">
                 <u-input placeholder="请输入邮箱" v-model="form.email" />
               </u-form-item>
@@ -741,6 +747,7 @@ export default {
         taxRegistryNumber: "",
         companyAddress: "",
         email: "",
+        invoiceRemark:"",
         phone: "",
         bankName: "",
         bankAccount: "",

+ 2 - 2
pages2/learn/details.vue

@@ -14,7 +14,7 @@
       </view>
       <view class="detailsItem" v-for="(item, index) in listData" :key="index">
         <view class="head">
-          <view class="tap">{{ getTypeName(item.type) }}</view>
+          <view class="tap">{{ getTypeName(item.sectionType) }}</view>
           <view class="title">{{ item.name }}</view>
         </view>
         <!-- <u-line color="#EEEEEE" />
@@ -204,7 +204,7 @@ export default {
     },
     getTypeName(int) {
       if (int === 0) {
-        return "试";
+        return "试";
       }
       if (int === 1) {
         return "视频";

+ 28 - 47
pages2/learn/my_learn.vue

@@ -321,56 +321,37 @@ export default {
       //int 1.课程学习 2.预约考试 3.进入刷题 4.查看详情 5.重修目录
       if (int === 1 || int === 5) {
         // /lock/lockStatus
-        this.$api
-          .lockLockStatus({
-            action: "jxjy",
-            uuid: this.$method.getUuid(),
-          })
-          .then((res) => {
+        this.$method.checkLock().then((res) => {
+          this.$http({
+            url: "/course/courseList",
+            method: "get",
+            data: {
+              pageNum: 1,
+              pageSize: 100,
+              goodsId: v.goodsId,
+              gradeId: v.gradeId,
+              orderGoodsId: v.orderGoodsId,
+            },
+            noLoading: true,
+          }).then((res) => {
             if (res.data.code == 200) {
-              //有其他端在操作,不能学习
-              uni.showToast({
-                icon: "none",
-                title: res.data.msg,
-                mask: true,
-                duration: 3000,
-              });
-            } else if (res.data.code == 500) {
-              //可以学习
-              this.$http({
-                url: "/course/courseList",
-                method: "get",
-                data: {
-                  pageNum: 1,
-                  pageSize: 100,
-                  goodsId: v.goodsId,
-                  gradeId: v.gradeId,
-                  orderGoodsId: v.orderGoodsId,
-                },
-                noLoading: true,
-              }).then((res) => {
-                if (res.data.code == 200) {
-                  if (res.data.total > 1) {
-                    uni.navigateTo({
-                      url: `/pages3/polyv/detail?id=''&goodsId=${v.goodsId}&orderGoodsId=${v.orderGoodsId}&gradeId=${v.gradeId}`,
-                    });
-                  } else if (res.data.total == 1) {
-                    uni.navigateTo({
-                      url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${v.goodsId}&orderGoodsId=${v.orderGoodsId}&gradeId=${v.gradeId}`,
-                    });
-                  } else {
-                    uni.showToast({
-                      icon: "none",
-                      title: "暂无可观看的视频课程",
-                    });
-                  }
-                }
-              });
+              if (res.data.total > 1) {
+                uni.navigateTo({
+                  url: `/pages3/polyv/detail?id=''&goodsId=${v.goodsId}&orderGoodsId=${v.orderGoodsId}&gradeId=${v.gradeId}`,
+                });
+              } else if (res.data.total == 1) {
+                uni.navigateTo({
+                  url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${v.goodsId}&orderGoodsId=${v.orderGoodsId}&gradeId=${v.gradeId}`,
+                });
+              } else {
+                uni.showToast({
+                  icon: "none",
+                  title: "暂无可观看的视频课程",
+                });
+              }
             }
           });
-        // this.$navTo.togo(
-        //   `/pages2/wd/course?id=${v.goodsId}&gid=${v.gradeId}&orderGoodsId=${v.orderGoodsId}`
-        // );
+        });
       }
       if (int === 2) {
         var data = {

+ 13 - 38
pages2/order/confirm_list.vue

@@ -65,17 +65,6 @@
             </view>
           </view>
         </view>
-        <!-- <view v-if="detail.templateType!=null&&detail.goodsType==1">
-						<u-line color="#D6D6DB" />
-						<view v-if="detail.templateType=='class'" style="display: flex;justify-content: space-between;align-items: center;height: 80rpx;padding:16rpx;" @click="openPopup(0)">
-							<view style="color: #666666;font-size: 24rpx;">{{gradeIndex < 0 ?'选择班级':gradeList[gradeIndex].className}}</view>
-							<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
-						</view>
-						<view v-if="detail.templateType=='apply'"  style="display: flex;justify-content: space-between;align-items: center;height: 80rpx;padding:16rpx;" @click="openPopup(1)">
-							<view style="color: #666666;font-size: 24rpx;" >{{!applyAreas.areaName?'报考地区':examDate.examineName+'-'+applyAreas.areaName+'-'+applyAreas.cityName}}</view>
-							<view><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
-						</view>
-					</view> -->
       </view>
       <!-- </view> -->
     </view>
@@ -227,8 +216,8 @@ export default {
   components: { ClassTimeTip },
   data() {
     return {
-      gradeValue: -1,
-      gradeIndex: -1,
+      gradeValue: 0,
+      gradeIndex: 0,
       id: 0,
       indicatorStyle: `height: 50px;`,
       showArea: true,
@@ -328,6 +317,7 @@ export default {
         this.show1 = false;
       }
     },
+    
     checkAreaData() {
       if (this.examine.length == 0) {
         uni.showModal({
@@ -337,22 +327,6 @@ export default {
         });
         return false;
       }
-      // if(this.provinceList.length==0){
-      // 	uni.showModal({
-      // 		title: "提示",
-      // 		content: '请选择报考地区',
-      // 		showCancel: false
-      // 	})
-      // 	return false
-      // }
-      // if(this.cityList.length==0){
-      // 	uni.showModal({
-      // 		title: "提示",
-      // 		content: '请选择报考地区',
-      // 		showCancel: false
-      // 	})
-      // 	return false
-      // }
       return true;
     },
     isAble() {
@@ -412,19 +386,17 @@ export default {
       console.log(e);
     },
     goodsGradeList() {
-      let self = this;
       this.$api.goodsGradeList({ goodsId: this.id }).then((res) => {
         if (res.data.code == 200) {
-          self.gradeList = res.data.rows;
-
-          if (self.gradeList.length == 0) {
+          this.gradeList = res.data.rows;
+          if (this.gradeList.length == 0) {
             let item = {
               className: "系统分班",
               gradeId: 0,
             };
-            self.gradeList.push(item);
+            this.gradeList.push(item);
           } else {
-            let isGradeFull = self.gradeList.every(
+            let isGradeFull = this.gradeList.every(
               (item) =>
                 item.studentNum > 0 && item.studentNum == item.studentUpper
             );
@@ -434,9 +406,10 @@ export default {
                 className: "系统分班",
                 gradeId: 0,
               };
-              self.gradeList.unshift(item);
+              this.gradeList.unshift(item);
             }
           }
+          this.detail.gradObj = this.gradeList[this.gradeIndex];
         }
       });
     },
@@ -475,6 +448,9 @@ export default {
       this.$api.commonGoodsDetail(this.id).then((res) => {
         if (res.data.code == 200) {
           self.detail = res.data.data;
+          if (self.detail.templateType != null && self.detail.goodsType == 1) {
+            this.goodsGradeList();
+          }
           self.getExamine(self.detail.projectId);
         }
       });
@@ -510,10 +486,9 @@ export default {
     openPopup(index) {
       if (index == 0) {
         this.show = true;
-        this.goodsGradeList();
       } else {
+        this.getProvinceList()
         this.show1 = true;
-        this.getProvinceList();
       }
     },
     closePop(index) {

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 324 - 467
pages2/verify/input.vue


+ 475 - 394
pages2/verify/input2.vue

@@ -1,439 +1,520 @@
 <template>
-	<view style="padding: 30rpx;">
-		<nav-bar title="填写审核资料"></nav-bar>
-		<view class="topBox">
-			<view>
-				<u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
-				<text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text>
-			</view>
-			<view style="color: #007AFF;" @click="backPage">稍后再填</view>
-		</view>
-		<u-collapse v-if="remarkStatus" :item-style="itemStyle" event-type="close">
-			<u-collapse-item title="审核结果反馈">
-				<view style="padding-bottom: 30rpx;">
-					<text class="collapse-item">{{ remark }}</text>
-				</view>
-			</u-collapse-item>
-		</u-collapse>
-		<view class="bodyBox" style="margin-top: 30rpx;padding:0 20rpx;">
-			<u-form :model="form" ref="uForm">
-				<template v-for="(item, index) in listData">
-					<u-form-item
-						v-if="item.inputType == 4"
-						:key="index"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-						label-position="top"
-					>
-						<text style="color: #007AFF;position: absolute;top: 20rpx;left: 180rpx;text-decoration: underline;" @click="downDocx(item.url)">点击下载</text>
-						<view class="dis_stys"><text style="color: #999999;">下载承诺书进行填写并签名盖章后上传(≤2M)</text></view>
-						<image v-if="!form[item.fieldKey]" style="width: 169rpx; height: 169rpx;" @click="getChast" src="@/static/info_4.png"></image>
-						<view class="quzw" v-if="form[item.fieldKey]">
-							<view v-if="form[item.fieldKey].split('.').splice(-1)[0] == 'docx' || form[item.fieldKey].split('.').splice(-1)[0] == 'doc'" class="borsrs">
-								<image src="@/static/icon/jy_icon.png" style="width: 168rpx; height: 168rpx;"></image>
-								<text>{{ titleName }}</text>
-							</view>
-							<image v-else :src="form[item.fieldKey]" style="width: 100%; height: 100%;" mode="aspectFit" @click="seePhotos(form[item.fieldKey])"></image>
-							<u-icon name="close-circle-fill" color="red" size="44" class="optionsAbs" @click="clearWord"></u-icon>
-						</view>
-					</u-form-item>
-				</template>
-			</u-form>
-		</view>
-		<view @click="submits" class="submit_btn">提交资料</view>
-		<u-action-sheet :list="list" v-model="showTableDown" @click="clickIndex"></u-action-sheet>
-	</view>
+  <view style="padding: 30rpx">
+    <nav-bar title="填写审核资料"></nav-bar>
+    <view class="topBox">
+      <view>
+        <u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
+        <text style="color: #ff3b30; margin-left: 10rpx"
+          >学习前请提交完整审核资料</text
+        >
+      </view>
+      <view style="color: #007aff" @click="backPage">稍后再填</view>
+    </view>
+    <u-collapse v-if="remarkStatus" :item-style="itemStyle" event-type="close">
+      <u-collapse-item title="审核结果反馈">
+        <view style="padding-bottom: 30rpx">
+          <text class="collapse-item">{{ remark }}</text>
+        </view>
+      </u-collapse-item>
+    </u-collapse>
+    <view class="bodyBox" style="margin-top: 30rpx; padding: 0 20rpx">
+      <u-form :model="form" ref="uForm">
+        <template v-for="(item, index) in listData">
+          <u-form-item
+            v-if="item.inputType == 4"
+            :key="index"
+            :label="item.fieldName"
+            :required="item.required"
+            :label-width="auto"
+            :prop="item.required ? item.fieldKey : ''"
+            label-position="top"
+          >
+            <text
+              style="
+                color: #007aff;
+                position: absolute;
+                top: 20rpx;
+                left: 180rpx;
+                text-decoration: underline;
+              "
+              @click="downDocx(item.url)"
+              >点击下载</text
+            >
+            <div>
+              <view class="dis_stys">
+                <text style="color: #999999">
+                  下载承诺书进行填写并签名盖章后上传(≤2M)
+                </text>
+              </view>
+              <image
+                v-if="!form[item.fieldKey]"
+                style="width: 169rpx; height: 169rpx"
+                @click="getChast"
+                src="@/static/info_4.png"
+              ></image>
+              <view class="quzw" v-if="form[item.fieldKey]">
+                <view
+                  v-if="
+                    form[item.fieldKey].split('.').splice(-1)[0] == 'docx' ||
+                    form[item.fieldKey].split('.').splice(-1)[0] == 'doc'
+                  "
+                  class="borsrs"
+                >
+                  <image
+                    src="@/static/icon/jy_icon.png"
+                    style="width: 168rpx; height: 168rpx"
+                  ></image>
+                  <text>{{ titleName }}</text>
+                </view>
+                <image
+                  v-else
+                  :src="form[item.fieldKey]"
+                  style="width: 100%; height: 100%"
+                  mode="aspectFit"
+                  @click="seePhotos(form[item.fieldKey])"
+                ></image>
+                <u-icon
+                  name="close-circle-fill"
+                  color="red"
+                  size="44"
+                  class="optionsAbs"
+                  @click="clearWord"
+                ></u-icon>
+              </view>
+            </div>
+          </u-form-item>
+        </template>
+      </u-form>
+    </view>
+    <view @click="submits" class="submit_btn">提交资料</view>
+    <u-action-sheet
+      :list="list"
+      v-model="showTableDown"
+      @click="clickIndex"
+    ></u-action-sheet>
+  </view>
 </template>
 
 <script>
 export default {
-	data() {
-		return {
-			showTableDown: false,
-			list: [
-				{
-					text: '上传图片'
-				},
-				// {
-				// 	text: '上传文件'
-				// }
-			],
-			isUploading:false,
-			itemStyle: {
-				marginTop: '20px',
-				backgroundColor: '#fff',
-				borderRadius: '24rpx',
-				padding: '0rpx 20rpx'
-			},
-			form: {
-				commitment_seal: ''
-			},
-			goodsId: null,
-			fileList1: [],
-			id: null, //id有值的话就是修改页面
-			listData: {}, //页面数据
-			openVerify: false, // 控制是否手动验证
-			nextStatus: false, //是否有下一步
-			titleName: '文件名称居中对齐过长换行', //word名称
-			remark: '', //反馈文本
-			remarkStatus: false, //是否存在审核结果反馈
-			rules: {
-				commitment_seal: [
-					{
-						required: true,
-						message: '请上传承诺书盖章',
-						trigger: ['change', 'blur']
-					}
-				]
-			},
-			orderGoodsId:0
-		};
-	},
-	created() {},
-	onLoad(option) {
-		this.orderGoodsId = Number(option.orderGoodsId)
-		this.goodsId = Number(option.id);
-		this.getInfo();
-	},
-	onReady() {
-		this.$refs.uForm.setRules(this.rules);
-	},
-	methods: {
-		backPage() {
-			uni.navigateBack();
-		},
-		seePhotos(url) {
-			uni.previewImage({
-				urls: [url]
-			});
-		},
-		downDocx(url) {
-			this.$api.addWordbaseprofileStamp({ goodsId: this.goodsId }).then(res => {
-				uni.downloadFile({
-					url: this.$method.splitImgHost(res.data.msg),
-					success: result => {
-						if (result.statusCode === 200) {
-							const filePath = result.tempFilePath
-							console.log(this.$method.splitImgHost(res.data.msg));
-							this.$method.showToast('下载成功');
-							uni.saveImageToPhotosAlbum({
-								filePath: filePath,
-								success: function (errMsg) {
-								uni.showToast({
-								  mask: true,
-								  title: '保存成功'
-								  });
-								},
-								fail:(errMsg)=>{
-									uni.showToast({
-										mask: true,
-										title: '保存失败'
-										});
-									},
-									complete:(errMsg)=>{
-													
-									}
-								});     
-						}
-					}
-				});
-			});
-		},
-		clearWord() {
-			this.$set(this.form, 'commitment_seal', '');
-			this.titleName = '';
-		},
-		clickIndex(inds){
-			if(inds === 0){
-				this.uploadImgs()
-			}
-			if(inds === 1){
-				this.uploadFieds()
-			}
-		},
-		getChast(){
-			this.showTableDown = true;
-		},
-		uploadImgs(){
-			var self = this
-			uni.chooseImage({
-			    count: 1, //默认9
-			    sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-			    success: function (res) {
-			        if (res.tempFiles[0].size > 2097152) {
-			        	self.$method.showToast('上传图片不得大于2M');
-			        	return;
-			        } else {
-			        	var type = res.tempFiles[0].path.split('.').splice(-1);
-			        	if (type[0] != 'jpg' && type[0] != 'png' && type[0] != 'jpeg') {
-			        		self.$method.showToast('请上传图片格式');
-			        		return;
-			        	}
-			        	self.$set(self.form, 'commitment_seal', res.tempFiles[0].path);
-			        	self.$nextTick(function() {
-			        		this.resultForm();
-			        	});
-			        }
-			    }
-			});
-		},
-		uploadFieds() {
-			var self = this;
-			wx.chooseMessageFile({
-				count: 1,
-				size: 2097152,
-				type: 'file',
-				success(res) {
-					if (res.tempFiles[0].size > 2097152) {
-						self.$method.showToast('上传文件不得大于2M');
-						return;
-					} else {
-						var type = res.tempFiles[0].path.split('.').splice(-1);
-						if (type[0] != 'jpg' && type[0] != 'png' && type[0] != 'jpeg' && type[0] != 'docx' && type[0] != 'doc') {
-							self.$method.showToast('请上传word文档或图片');
-							return;
-						}
-						self.titleName = res.tempFiles[0].name;
-						self.$set(self.form, 'commitment_seal', res.tempFiles[0].path);
-						self.$nextTick(function() {
-							this.resultForm();
-						});
-					}
-				}
-			});
-		},
-		//提交表单
-		async submitApi() {
-			var data = JSON.parse(JSON.stringify(this.form));
-			if (data['commitment_seal']) {
-				data.commitment_seal = await this.$method.uploadFile(data.commitment_seal, 0);
-			}
-			this.optionChanges(data);
-		},
-		optionChanges(data) {
-			var self = this;
-			var objs = {};
-			for (let k in data) {
-				objs[k] = {
-					fieldKey: k,
-					value: data[k],
-					fieldName: (function() {
-						for (let i = 0; i < self.listData.length; i++) {
-							if (self.listData[i].fieldKey == k) {
-								return self.listData[i].fieldName;
-							}
-						}
-					})(),
-					status: self.remarkStatus ? 1 : 0
-				};
-			}
-			var datas = {
-				orderGoodsId:this.orderGoodsId,
-				goodsId: self.goodsId,
-				keyValue: JSON.stringify(objs)
-			};
-			if (self.remarkStatus) {
-				datas.id = self.id;
-				self.$api.editbaseprofileStamp(datas).then(res => {
-					this.isUploading = false;
-					if (res.data.code === 200) {
-						self.$method.showToast('提交成功');
-						setTimeout(() => {
-							console.log('延迟')
-							uni.navigateBack();
-						}, 1500)
-					}
-				});
-			} else {
-				self.$api.addbaseprofileStamp(datas).then(res => {
-					this.isUploading = false;
-					if (res.data.code === 200) {
-						self.$method.showToast('提交成功');
-						setTimeout(() => {
-							console.log('延迟')
-							uni.navigateBack();
-						}, 1500)
-					}
-				});
-			}
-		},
-		//验证表单
-		resultForm(int) {
-			if (this.openVerify) {
-				for (let i = 0; i < this.listData.length; i++) {
-					if (this.listData[i].fieldKey === 'commitment_seal' && !this.listData[i].required) {
-						this.submitApi();
-						return;
-					}
-				}
-				this.$refs.uForm.validate(valid => {
-					if (valid) {
-						if (int === 1) {
-							this.submitApi();
-						}
-					} else {
-						this.isUploading = false;
-						console.log('验证失败');
-					}
-				});
-			}
-		},
-		submits() {
-			if(this.isUploading) {
-				return;
-			}
-			this.isUploading = true;
-			this.openVerify = true;
-			this.resultForm(1);
-		},
-		async changePhotoListHeader1(lists, name) {
-			if (lists.length) {
-				this.fileList1 = lists;
-				this.form.commitment_seal = await this.$method.imageInfos(lists[0].url);
-			} else {
-				this.fileList1 = [];
-				this.$set(this.form, 'commitment_seal', '');
-			}
-			this.$nextTick(function() {
-				this.resultForm();
-			});
-		},
+  data() {
+    return {
+      showTableDown: false,
+      list: [
+        {
+          text: "上传图片",
+        },
+        // {
+        // 	text: '上传文件'
+        // }
+      ],
+      isUploading: false,
+      itemStyle: {
+        marginTop: "20px",
+        backgroundColor: "#fff",
+        borderRadius: "24rpx",
+        padding: "0rpx 20rpx",
+      },
+      form: {
+        commitment_seal: "",
+      },
+      goodsId: null,
+      fileList1: [],
+      id: null, //id有值的话就是修改页面
+      listData: {}, //页面数据
+      openVerify: false, // 控制是否手动验证
+      nextStatus: false, //是否有下一步
+      titleName: "文件名称居中对齐过长换行", //word名称
+      remark: "", //反馈文本
+      remarkStatus: false, //是否存在审核结果反馈
+      rules: {
+        commitment_seal: [
+          {
+            required: true,
+            message: "请上传承诺书盖章",
+            trigger: ["change", "blur"],
+          },
+        ],
+      },
+      orderGoodsId: 0,
+      auto: "180rpx",
+    };
+  },
+  created() {},
+  onLoad(option) {
+    this.orderGoodsId = Number(option.orderGoodsId);
+    this.goodsId = Number(option.id);
+    this.getInfo();
+  },
+  onReady() {
+    this.$refs.uForm.setRules(this.rules);
+  },
+  methods: {
+    backPage() {
+      uni.navigateBack();
+    },
+    seePhotos(url) {
+      uni.previewImage({
+        urls: [url],
+      });
+    },
+    downDocx(url) {
+      this.$api
+        .addWordbaseprofileStamp({ goodsId: this.goodsId })
+        .then((res) => {
+          // #ifdef H5
+          window.location.href = this.$method.splitImgHost(res.data.msg);
+          // #endif
+          // #ifdef MP-WEIXIN
+          uni.downloadFile({
+            url: this.$method.splitImgHost(res.data.msg),
+            success: (result) => {
+              if (result.statusCode === 200) {
+                const filePath = result.tempFilePath;
+                console.log(this.$method.splitImgHost(res.data.msg), 111);
+                this.$method.showToast("下载成功");
+                uni.saveImageToPhotosAlbum({
+                  filePath: filePath,
+                  success: function (errMsg) {
+                    uni.showToast({
+                      mask: true,
+                      title: "保存成功",
+                    });
+                  },
+                  fail: (errMsg) => {
+                    uni.showToast({
+                      mask: true,
+                      title: "保存失败",
+                    });
+                  },
+                  complete: (errMsg) => {},
+                });
+              }
+            },
+          });
+          // #endif
+        });
+    },
+    clearWord() {
+      this.$set(this.form, "commitment_seal", "");
+      this.titleName = "";
+    },
+    clickIndex(inds) {
+      console.log(inds, 789);
+      if (inds === 0) {
+        this.uploadImgs();
+      }
+      if (inds === 1) {
+        this.uploadFieds();
+      }
+    },
+    getChast() {
+      this.showTableDown = true;
+    },
+    uploadImgs() {
+      var self = this;
+      uni.chooseImage({
+        count: 1, //默认9
+        sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+        success: function (res) {
+          if (res.tempFiles[0].size > 2097152) {
+            self.$method.showToast("上传图片不得大于2M");
+            return;
+          } else {
+            // #ifdef MP-WEIXIN
+            var type = res.tempFiles[0].path.split(".").splice(-1);
+            // #endif
+            // #ifdef H5
+            var type = res.tempFiles[0].type.split("/").splice(-1);
+            // #endif
+            if (type[0] != "jpg" && type[0] != "png" && type[0] != "jpeg") {
+              self.$method.showToast("请上传图片格式");
+              return;
+            }
+            console.log(res.tempFiles[0].path, "res.tempFiles[0].path");
+            self.$set(self.form, "commitment_seal", res.tempFiles[0].path);
+            self.$nextTick(function () {
+              this.resultForm();
+            });
+          }
+        },
+      });
+    },
+    uploadFieds() {
+      var self = this;
+      wx.chooseMessageFile({
+        count: 1,
+        size: 2097152,
+        type: "file",
+        success(res) {
+          if (res.tempFiles[0].size > 2097152) {
+            self.$method.showToast("上传文件不得大于2M");
+            return;
+          } else {
+            var type = res.tempFiles[0].path.split(".").splice(-1);
+            if (
+              type[0] != "jpg" &&
+              type[0] != "png" &&
+              type[0] != "jpeg" &&
+              type[0] != "docx" &&
+              type[0] != "doc"
+            ) {
+              self.$method.showToast("请上传word文档或图片");
+              return;
+            }
+            self.titleName = res.tempFiles[0].name;
+            self.$set(self.form, "commitment_seal", res.tempFiles[0].path);
+            self.$nextTick(function () {
+              this.resultForm();
+            });
+          }
+        },
+      });
+    },
+    //提交表单
+    async submitApi() {
+      var data = JSON.parse(JSON.stringify(this.form));
+      if (data["commitment_seal"]) {
+        data.commitment_seal = await this.$method.uploadFile(
+          data.commitment_seal,
+          0
+        );
+      }
+      this.optionChanges(data);
+    },
+    optionChanges(data) {
+      var self = this;
+      var objs = {};
+      for (let k in data) {
+        objs[k] = {
+          fieldKey: k,
+          value: data[k],
+          fieldName: (function () {
+            for (let i = 0; i < self.listData.length; i++) {
+              if (self.listData[i].fieldKey == k) {
+                return self.listData[i].fieldName;
+              }
+            }
+          })(),
+          status: self.remarkStatus ? 1 : 0,
+        };
+      }
+      var datas = {
+        orderGoodsId: this.orderGoodsId,
+        goodsId: self.goodsId,
+        keyValue: JSON.stringify(objs),
+      };
+      if (self.remarkStatus) {
+        datas.id = self.id;
+        self.$api.editbaseprofileStamp(datas).then((res) => {
+          this.isUploading = false;
+          if (res.data.code === 200) {
+            self.$method.showToast("提交成功");
+            setTimeout(() => {
+              console.log("延迟");
+              uni.navigateBack();
+            }, 1500);
+          }
+        });
+      } else {
+        self.$api.addbaseprofileStamp(datas).then((res) => {
+          this.isUploading = false;
+          if (res.data.code === 200) {
+            self.$method.showToast("提交成功");
+            setTimeout(() => {
+              console.log("延迟");
+              uni.navigateBack();
+            }, 1500);
+          }
+        });
+      }
+    },
+    //验证表单
+    resultForm(int) {
+      if (this.openVerify) {
+        for (let i = 0; i < this.listData.length; i++) {
+          if (
+            this.listData[i].fieldKey === "commitment_seal" &&
+            !this.listData[i].required
+          ) {
+            this.submitApi();
+            return;
+          }
+        }
+        this.$refs.uForm.validate((valid) => {
+          if (valid) {
+            if (int === 1) {
+              this.submitApi();
+            }
+          } else {
+            this.isUploading = false;
+            console.log("验证失败");
+          }
+        });
+      }
+    },
+    submits() {
+      if (this.isUploading) {
+        return;
+      }
+      this.isUploading = true;
+      this.openVerify = true;
+      this.resultForm(1);
+    },
+    async changePhotoListHeader1(lists, name) {
+      if (lists.length) {
+        this.fileList1 = lists;
+        this.form.commitment_seal = await this.$method.imageInfos(lists[0].url);
+      } else {
+        this.fileList1 = [];
+        this.$set(this.form, "commitment_seal", "");
+      }
+      this.$nextTick(function () {
+        this.resultForm();
+      });
+    },
 
-		getInfo() {
-			var self = this;
-			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
-				var ast = JSON.parse(res.data.data.keyValue2);
-				self.listData = ast;
-				self.$api.getbaseprofileStampgetInfo({ goodsId: self.goodsId,orderGoodsId:self.orderGoodsId }).then(result => {
-					if (result.data.code === 200) {
-						if (result.data.data && result.data.data.status === 3) {
-							self.remark = result.data.data.text;
-							self.remarkStatus = true;
-							self.id = result.data.data.id;
-						} else if (result.data.data && (result.data.data.status === 1 || result.data.data.status === 2)) {
-							uni.showModal({
-								showCancel: false,
-								content:
-									result.data.data.status === 1
-										? '该商品审核资料已通过,不可重复提交资料'
-										: result.data.data.status === 2
-										? '该商品审核资料处于待审核状态,不可重复提交资料'
-										: '请联系管理员',
-								success: function(k) {
-									if (k.confirm) {
-										uni.navigateBack();
-									}
-								}
-							});
-						}
-					}
-				});
-			});
-		}
-	}
+    getInfo() {
+      var self = this;
+      this.$api.getbaseprofiletpId(this.goodsId).then((res) => {
+        var ast = JSON.parse(res.data.data.keyValue2);
+        self.listData = ast;
+        self.$api
+          .getbaseprofileStampgetInfo({
+            goodsId: self.goodsId,
+            orderGoodsId: self.orderGoodsId,
+          })
+          .then((result) => {
+            if (result.data.code === 200) {
+              if (result.data.data && result.data.data.status === 3) {
+                self.remark = result.data.data.text;
+                self.remarkStatus = true;
+                self.id = result.data.data.id;
+              } else if (
+                result.data.data &&
+                (result.data.data.status === 1 || result.data.data.status === 2)
+              ) {
+                uni.showModal({
+                  showCancel: false,
+                  content:
+                    result.data.data.status === 1
+                      ? "该商品审核资料已通过,不可重复提交资料"
+                      : result.data.data.status === 2
+                      ? "该商品审核资料处于待审核状态,不可重复提交资料"
+                      : "请联系管理员",
+                  success: function (k) {
+                    if (k.confirm) {
+                      uni.navigateBack();
+                    }
+                  },
+                });
+              }
+            }
+          });
+      });
+    },
+  },
 };
 </script>
 <style>
 page {
-	background: #eaeef1;
+  background: #eaeef1;
 }
 </style>
-<style scope>
+<style scopelang="scss">
 /deep/ .u-collapse-title {
-	color: #FF3B30;
-	font-size: 24rpx;
+  color: #ff3b30;
+  font-size: 24rpx;
 }
 .collapse-item {
-	color: #666;
-	font-size: 24rpx;
-	padding-bottom: 30rpx;
+  color: #666;
+  font-size: 24rpx;
+  padding-bottom: 30rpx;
 }
 .quzw {
-	width: 638rpx;
-	height: 638rpx;
-	position: relative;
-	border: 2rpx solid #eee;
-	border-radius: 8rpx;
+  width: 638rpx;
+  height: 638rpx;
+  position: relative;
+  border: 2rpx solid #eee;
+  border-radius: 8rpx;
 }
 .borsrs {
-	width: 640rpx;
-	height: 640rpx;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	justify-content: center;
+  width: 640rpx;
+  height: 640rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
 }
 .optionsAbs {
-	position: absolute;
-	z-index: 99;
-	top: 10rpx;
-	right: 10rpx;
+  position: absolute;
+  z-index: 99;
+  top: 10rpx;
+  right: 10rpx;
 }
 .dis_stys {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
+  /* display: flex;
+  align-items: center;
+  justify-content: space-between; */
 }
 .handCenter {
-	background: #f7f7f7;
-	border: 2rpx solid #eeeeee;
-	border-radius: 24rpx;
+  background: #f7f7f7;
+  border: 2rpx solid #eeeeee;
+  border-radius: 24rpx;
 }
 .headerSDels {
-	height: 58rpx;
-	padding: 0rpx 24rpx;
-	font-weight: bold;
-	display: flex;
-	align-items: center;
-	flex-direction: row-reverse;
+  height: 58rpx;
+  padding: 0rpx 24rpx;
+  font-weight: bold;
+  display: flex;
+  align-items: center;
+  flex-direction: row-reverse;
 }
 .listBox {
-	margin: 24rpx 32rpx 0rpx;
-	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
-	border-radius: 32rpx;
-	background-color: #fff;
-	overflow: hidden;
+  margin: 24rpx 32rpx 0rpx;
+  box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+  border-radius: 32rpx;
+  background-color: #fff;
+  overflow: hidden;
 }
 .imgBoxs {
-	width: 156rpx;
-	height: 203rpx;
+  width: 156rpx;
+  height: 203rpx;
 }
 .imgBoxs2 {
-	width: 171rpx;
-	height: 108rpx;
+  width: 171rpx;
+  height: 108rpx;
 }
 .submit_btn {
-	width: 526rpx;
-	height: 80rpx;
-	background: #007aff;
-	border-radius: 40rpx;
-	text-align: center;
-	line-height: 80rpx;
-	color: #ffffff;
-	margin: 30rpx auto;
+  width: 526rpx;
+  height: 80rpx;
+  background: #007aff;
+  border-radius: 40rpx;
+  text-align: center;
+  line-height: 80rpx;
+  color: #ffffff;
+  margin: 30rpx auto;
 }
 .picker {
-	text-align: right;
+  text-align: right;
 }
 input {
-	text-align: right;
+  text-align: right;
 }
 .bodyBox {
-	background: #ffffff;
-	border-radius: 24rpx;
-	width: 100%;
+  background: #ffffff;
+  border-radius: 24rpx;
+  width: 100%;
 }
 .topBox {
-	height: 80rpx;
-	background: #ffffff;
-	border-radius: 24rpx;
-	width: 100%;
-	display: flex;
-	justify-content: space-between;
-	line-height: 80rpx;
-	padding: 0 20rpx;
-	font-size: 24rpx;
+  height: 80rpx;
+  background: #ffffff;
+  border-radius: 24rpx;
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+  line-height: 80rpx;
+  padding: 0 20rpx;
+  font-size: 24rpx;
 }
 </style>

+ 26 - 82
pages2/wd/class.vue

@@ -659,8 +659,7 @@ export default {
                 uni.showModal({
                   showCancel: false,
                   title: "提示",
-                  content:
-                    "开通信息推送不成功,无法进入学习!",
+                  content: "开通信息推送不成功,无法进入学习!",
                 });
                 resolve(false);
               }
@@ -693,8 +692,7 @@ export default {
                 uni.showModal({
                   showCancel: false,
                   title: "提示",
-                  content:
-                    "开通信息推送不成功,无法进入学习!",
+                  content: "开通信息推送不成功,无法进入学习!",
                 });
               }
               this.showUserConfirmInfo = false;
@@ -798,8 +796,7 @@ export default {
           // ,请联系020-87085982
           uni.showModal({
             showCancel: false,
-            content:
-              "您的学习账号未开通,请稍后再尝试,有疑问!",
+            content: "您的学习账号未开通,请稍后再尝试,有疑问!",
           });
           return;
         }
@@ -909,83 +906,30 @@ export default {
       }
 
       // if (item.educationName == '继续教育') {
-      this.$api
-        .lockLockStatus({
-          action: "jxjy",
-          uuid: this.$method.getUuid(),
-        })
-        .then((res) => {
-          if (res.data.code == 200) {
-            //有其他端在操作,不能学习
-            uni.showToast({
-              icon: "none",
-              title: res.data.msg,
-              mask: true,
-              duration: 3000,
-            });
-          } else if (res.data.code == 500) {
-            //可以学习
-
-            if (item.courseNum == 1) {
-              this.$api
-                .courseCourseList({
-                  pageNum: 1,
-                  pageSize: 1,
-                  goodsId: item.goodsId,
-                  gradeId: item.gradeId,
-                  orderGoodsId: item.orderGoodsId,
-                })
-                .then((res) => {
-                  if (res.data.code == 200) {
-                    // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-                    // 	this.userConfirmInfoDetail().then(() => {
-                    // 			uni.navigateTo({
-                    // 					url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-                    // 				})
-                    // 	})
-                    // } else {
-                    uni.navigateTo({
-                      url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`,
-                    });
-                    // }
-                  }
+      this.$method.checkLock("jxjy").then((res) => {
+        //可以学习
+        if (item.courseNum == 1) {
+          this.$api
+            .courseCourseList({
+              pageNum: 1,
+              pageSize: 1,
+              goodsId: item.goodsId,
+              gradeId: item.gradeId,
+              orderGoodsId: item.orderGoodsId,
+            })
+            .then((res) => {
+              if (res.data.code == 200) {
+                uni.navigateTo({
+                  url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`,
                 });
-              return;
-            }
-
-            // if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-            // 	// this.userConfirmInfoDetail().then(() => {
-            // 			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-            // 	// })
-            // } else {
-            this.$navTo.togo(
-              `/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`
-            );
-            // }
-          }
-        });
-      // } else {
-      // 	if (item.courseNum == 1) {
-
-      // 		this.$api.courseCourseList({
-      // 			pageNum: 1,
-      // 			pageSize: 1,
-      // 			goodsId: item.goodsId,
-      // 			gradeId: item.gradeId,
-      // 			orderGoodsId: item.orderGoodsId,
-      // 		}).then(res => {
-      // 			if (res.data.code == 200) {
-      // 				uni.navigateTo({
-      // 						url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-      // 					})
-
-      // 			}
-      // 		});
-      // 		return;
-      // 	}
-      // 	this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-
-      // }
+              }
+            });
+          return;
+        }
+        this.$navTo.togo(
+          `/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`
+        );
+      });
     },
     /**
      * @param {Object} goodsId 商品id

+ 45 - 119
pages2/wd/course.vue

@@ -47,7 +47,7 @@
               size="mini"
               @click.stop="jump(item, index)"
               >进入学习</u-button> -->
-            </view>
+          </view>
         </view>
       </view>
     </view>
@@ -69,30 +69,31 @@ export default {
       },
       businessData: {},
       itemIndex: "",
-      informId: '', //消息id,从公众号消息模板进来的才有
+      informId: "", //消息id,从公众号消息模板进来的才有
       options: {},
     };
   },
   onLoad(option) {
-    console.log('onload的', option)
-    this.options = option
+    console.log("onload的", option);
+    this.options = option;
     this.goodsId = Number(option.id);
     this.gradeId = Number(option.gid);
     this.orderGoodsId = Number(option.orderGoodsId);
     // 公众号模板消息的数据埋点
     if (option.informId) {
-      this.informId = option.informId
+      this.informId = option.informId;
       // this.clickOfficial()
     }
-    
+
     this.$store.getters.dictObj;
   },
   onShow(option) {
-    if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
+    if (this.$method.isGoLogin()) {
+      // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
     this.courseCourseList();
-    this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
+    this.informId && this.clickOfficial(); // 从公众号消息点击进来上报一次
     if (this.itemIndex !== "") {
       this.refreshByIndex();
     }
@@ -107,14 +108,14 @@ export default {
     // 新增微信公众号模板消息点击数据
     clickOfficial() {
       this.$http({
-        url: '/data/click',
-        method: 'post',
-        data: { informId: this.informId }
+        url: "/data/click",
+        method: "post",
+        data: { informId: this.informId },
       }).then((res) => {
         if (res.data.code == 200) {
-          console.log('埋点')
+          console.log("埋点");
         }
-      })
+      });
     },
     /**
      * 返回刷新之前进入的课程数据
@@ -142,7 +143,7 @@ export default {
       });
     },
     jump(item, index) {
-      console.log('00000000')
+      console.log("00000000");
       this.itemIndex = index;
 
       if (index == 0) {
@@ -160,38 +161,13 @@ export default {
         this.$api.courseDetail(item.courseId).then((res) => {
           if (res.data.code == 200) {
             // if (res.data.data.educationName == "继续教育") {
-            this.$api
-              .lockLockStatus({
-                action: "jxjy",
-                uuid: this.$method.getUuid(),
-              })
-              .then((res) => {
-                if (res.data.code == 200) {
-                  //有其他端在操作,不能学习
-                  uni.showToast({
-                    icon: "none",
-                    title: res.data.msg,
-                    mask: true,
-                    duration: 3000,
-                  });
-                } else if (res.data.code == 500) {
-                  //可以学习
-                  this.$navTo.togo("/pages3/polyv/detail", {
-                    id: item.courseId,
-                    goodsId: this.goodsId,
-                    orderGoodsId: this.orderGoodsId,
-                  });
-                }
+            this.$method.checkLock().then((res) => {
+              this.$navTo.togo("/pages3/polyv/detail", {
+                id: item.courseId,
+                goodsId: this.goodsId,
+                orderGoodsId: this.orderGoodsId,
               });
-
-            // websocket.sendMsg("doCourse");
-            // } else {
-            //   this.$navTo.togo("/pages3/polyv/detail", {
-            //     id: item.courseId,
-            //     goodsId: this.goodsId,
-            //     orderGoodsId: this.orderGoodsId,
-            //   });
-            // }
+            });
           }
         });
       } else {
@@ -216,38 +192,13 @@ export default {
             this.$api.courseDetail(item.courseId).then((res) => {
               if (res.data.code == 200) {
                 // if (res.data.data.educationName == "继续教育") {
-                this.$api
-                  .lockLockStatus({
-                    action: "jxjy",
-                    uuid: this.$method.getUuid(),
-                  })
-                  .then((res) => {
-                    if (res.data.code == 200) {
-                      //有其他端在操作,不能学习
-                      uni.showToast({
-                        icon: "none",
-                        title: res.data.msg,
-                        duration: 2000,
-                      });
-                    } else if (res.data.code == 500) {
-                      //可以学习
-
-                      this.$navTo.togo("/pages3/polyv/detail", {
-                        id: item.courseId,
-                        goodsId: this.goodsId,
-                        orderGoodsId: this.orderGoodsId,
-                      });
-                    }
+                this.$method.checkLock().then((res) => {
+                  this.$navTo.togo("/pages3/polyv/detail", {
+                    id: item.courseId,
+                    goodsId: this.goodsId,
+                    orderGoodsId: this.orderGoodsId,
                   });
-
-                // websocket.sendMsg("doCourse");
-                // } else {
-                //   this.$navTo.togo("/pages3/polyv/detail", {
-                //     id: item.courseId,
-                //     goodsId: this.goodsId,
-                //     orderGoodsId: this.orderGoodsId,
-                //   });
-                // }
+                });
               }
             });
           } else {
@@ -271,38 +222,13 @@ export default {
           this.$api.courseDetail(item.courseId).then((res) => {
             if (res.data.code == 200) {
               // if (res.data.data.educationName == "继续教育") {
-              this.$api
-                .lockLockStatus({
-                  action: "jxjy",
-                  uuid: this.$method.getUuid(),
-                })
-                .then((res) => {
-                  if (res.data.code == 200) {
-                    //有其他端在操作,不能学习
-                    uni.showToast({
-                      icon: "none",
-                      title: res.data.msg,
-                      duration: 2000,
-                    });
-                  } else if (res.data.code == 500) {
-                    //可以学习
-
-                    this.$navTo.togo("/pages3/polyv/detail", {
-                      id: item.courseId,
-                      goodsId: this.goodsId,
-                      orderGoodsId: this.orderGoodsId,
-                    });
-                  }
+              this.$method.checkLock().then((res) => {
+                this.$navTo.togo("/pages3/polyv/detail", {
+                  id: item.courseId,
+                  goodsId: this.goodsId,
+                  orderGoodsId: this.orderGoodsId,
                 });
-
-              // websocket.sendMsg("doCourse");
-              //        } else {
-              // 	this.$navTo.togo("/pages3/polyv/detail", {
-              // 	  id: item.courseId,
-              // 	  goodsId: this.goodsId,
-              // 	  orderGoodsId: this.orderGoodsId,
-              // 	});
-              // }
+              });
             }
           });
         }
@@ -352,16 +278,16 @@ page {
   margin: 0 auto;
   padding: 20rpx;
   .learing_bt {
-			width: 165rpx;
-			height: 48rpx;
-			line-height: 48rpx;
-			background: #FFB102;
-			border-radius: 16rpx;
-			font-size: 24rpx;
-			font-weight: 400;
-			color: #FFFFFF;
-			text-align: center;
-		}
+    width: 165rpx;
+    height: 48rpx;
+    line-height: 48rpx;
+    background: #ffb102;
+    border-radius: 16rpx;
+    font-size: 24rpx;
+    font-weight: 400;
+    color: #ffffff;
+    text-align: center;
+  }
 }
 .content_box {
   display: flex;
@@ -386,7 +312,7 @@ page {
   padding: 20rpx 20rpx 30rpx 20rpx;
   z-index: 999;
   position: relative;
-  background: #FFFFFF;
-  box-shadow: 0px 0px 20px 1px rgba(1,99,235,0.1000);
+  background: #ffffff;
+  box-shadow: 0px 0px 20px 1px rgba(1, 99, 235, 0.1);
 }
 </style>

+ 28 - 46
pages3/course/detail.vue

@@ -1157,55 +1157,37 @@ export default {
         });
         return;
       }
-
-      // /lock/lockStatus
-      this.$api
-        .lockLockStatus({
-          action: "jxjy",
-          uuid: this.$method.getUuid(),
-        })
-        .then((res) => {
+      this.$method.checkLock().then((res) => {
+        this.$http({
+          url: "/course/courseList",
+          method: "get",
+          data: {
+            pageNum: 1,
+            pageSize: 1,
+            goodsId: item.goodsId,
+            gradeId: item.gradeId,
+            orderGoodsId: item.orderGoodsId,
+          },
+        }).then((res) => {
           if (res.data.code == 200) {
-            //有其他端在操作,不能学习
-            uni.showToast({
-              icon: "none",
-              title: res.data.msg,
-              mask: true,
-              duration: 3000,
-            });
-          } else if (res.data.code == 500) {
-            //可以学习
-            this.$http({
-              url: "/course/courseList",
-              method: "get",
-              data: {
-                pageNum: 1,
-                pageSize: 1,
-                goodsId: item.goodsId,
-                gradeId: item.gradeId,
-                orderGoodsId: item.orderGoodsId,
-              },
-            }).then((res) => {
-              if (res.data.code == 200) {
-                if (res.data.total > 1) {
-                  // this.$navTo.togo(`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}&orderGoodsId=${item.orderGoodsId}`);
-                  uni.navigateTo({
-                    url: `/pages3/polyv/detail?id=''&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
-                  });
-                } else if (res.data.total == 1) {
-                  uni.navigateTo({
-                    url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
-                  });
-                } else {
-                  uni.showToast({
-                    icon: "none",
-                    title: "暂无可观看的视频课程",
-                  });
-                }
-              }
-            });
+            if (res.data.total > 1) {
+              // this.$navTo.togo(`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}&orderGoodsId=${item.orderGoodsId}`);
+              uni.navigateTo({
+                url: `/pages3/polyv/detail?id=''&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
+              });
+            } else if (res.data.total == 1) {
+              uni.navigateTo({
+                url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
+              });
+            } else {
+              uni.showToast({
+                icon: "none",
+                title: "暂无可观看的视频课程",
+              });
+            }
           }
         });
+      });
     },
     toLive(item) {
       this.$api

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 575 - 454
pages3/live/detail.vue


+ 417 - 257
pages3/polyv/detail.vue

@@ -178,67 +178,73 @@
             v-for="(item, index) in menuList"
             :key="index"
           >
-            <!--模块 -->
-            <view v-if="item.type == 1"
-              ><courseModule
-                v-if="reStart"
-                :orderGoodsId="orderGoodsId"
-                :sectionMaxNum="goodsData.sectionMaxNum"
-                :needOpen="menuIndex[0] === index ? true : false"
-                :courseId="courseId"
-                :preItem="menuList[index - 1]"
-                :learningOrder="businessData.goodsLearningOrder"
-                :goodsId="goodsId"
-                :gradeId="gradeId"
-                :isBuy="true"
-                :menuItem="item"
-                :levelId="item.menuId"
-                :goodsType="1"
-                :menuAllList="menuAllList"
-                :sectionItem="sectionItem"
-              ></courseModule
-            ></view>
-            <!--章 -->
-            <view v-if="item.type == 2"
-              ><courseChapter
-                v-if="reStart"
-                :orderGoodsId="orderGoodsId"
-                :sectionMaxNum="goodsData.sectionMaxNum"
-                :needOpen="menuIndex[0] === index ? true : false"
-                :courseId="courseId"
-                :preItem="menuList[index - 1]"
-                @playEnd="sectionPlayEnd($event, index)"
-                :learningOrder="businessData.goodsLearningOrder"
-                :goodsId="goodsId"
-                :gradeId="gradeId"
-                :isBuy="true"
-                :menuItem="item"
-                :levelId="'0-' + item.menuId"
-                :goodsType="1"
-                :menuAllList="menuAllList"
-              ></courseChapter
-            ></view>
-            <!--节 -->
-            <view v-if="item.type == 3"
-              ><courseSection
-                ref="MoudleSection"
-                v-if="reStart"
-                :orderGoodsId="orderGoodsId"
-                :sectionMaxNum="goodsData.sectionMaxNum"
-                @playEnd="sectionPlayEnd($event, index)"
-                :courseId="courseId"
-                :preItem="menuList[index - 1]"
-                :learningOrder="businessData.goodsLearningOrder"
-                :goodsId="goodsId"
-                :gradeId="gradeId"
-                :isBuy="true"
-                :menuItem="item"
-                :levelId="'0-0-' + item.menuId"
-                :goodsType="1"
-                :testType="3"
-                :menuAllList="menuAllList"
-              ></courseSection
-            ></view>
+            <template v-if="!$method.isEmptyObject(sectionItem)">
+              <!--模块 -->
+              <view v-if="item.type == 1"
+                ><courseModule
+                  v-if="reStart"
+                  :orderGoodsId="orderGoodsId"
+                  :sectionMaxNum="goodsData.sectionMaxNum"
+                  :needOpen="sectionItem.moduleId == item.menuId"
+                  :courseId="courseId"
+                  :preItem="menuList[index - 1]"
+                  :learningOrder="orderNum"
+                  :goodsId="goodsId"
+                  :gradeId="gradeId"
+                  :isBuy="true"
+                  :menuItem="item"
+                  :levelId="item.menuId"
+                  :goodsType="1"
+                  :menuAllList="menuAllList"
+                  :sectionItem="sectionItem"
+                ></courseModule
+              ></view>
+              <!--章 -->
+              <view v-if="item.type == 2"
+                ><courseChapter
+                  v-if="reStart"
+                  :orderGoodsId="orderGoodsId"
+                  :sectionMaxNum="goodsData.sectionMaxNum"
+                  :needOpen="
+                    !sectionItem.moduleId &&
+                    sectionItem.chapterId == item.menuId
+                  "
+                  :courseId="courseId"
+                  :preItem="menuList[index - 1]"
+                  @playEnd="sectionPlayEnd($event, index)"
+                  :learningOrder="orderNum"
+                  :goodsId="goodsId"
+                  :gradeId="gradeId"
+                  :isBuy="true"
+                  :menuItem="item"
+                  :levelId="'0-' + item.menuId"
+                  :goodsType="1"
+                  :menuAllList="menuAllList"
+                  :sectionItem="sectionItem"
+                ></courseChapter
+              ></view>
+              <!--节 -->
+              <view v-if="item.type == 3"
+                ><courseSection
+                  ref="MoudleSection"
+                  v-if="reStart"
+                  :orderGoodsId="orderGoodsId"
+                  :sectionMaxNum="goodsData.sectionMaxNum"
+                  @playEnd="sectionPlayEnd($event, index)"
+                  :courseId="courseId"
+                  :preItem="menuList[index - 1]"
+                  :learningOrder="orderNum"
+                  :goodsId="goodsId"
+                  :gradeId="gradeId"
+                  :isBuy="true"
+                  :menuItem="item"
+                  :levelId="'0-0-' + item.menuId"
+                  :goodsType="1"
+                  :testType="3"
+                  :menuAllList="menuAllList"
+                ></courseSection
+              ></view>
+            </template>
             <!-- @togoBack="togoBack($event)" -->
           </view>
         </view>
@@ -365,6 +371,7 @@
                 :orderGoodsId="orderGoodsId"
                 :sectionMaxNum="goodsData.sectionMaxNum"
                 :courseId="courseId"
+                :learningOrder="orderNum"
                 :goodsId="goodsId"
                 :gradeId="gradeId"
                 :isRebuild="true"
@@ -381,6 +388,7 @@
               <courseChapter
                 :orderGoodsId="orderGoodsId"
                 :courseId="courseId"
+                :learningOrder="orderNum"
                 :sectionMaxNum="goodsData.sectionMaxNum"
                 @playEnd="sectionPlayEnd($event, index)"
                 :gradeId="gradeId"
@@ -398,6 +406,7 @@
               <courseSection
                 :orderGoodsId="orderGoodsId"
                 :courseId="courseId"
+                :learningOrder="orderNum"
                 :sectionMaxNum="goodsData.sectionMaxNum"
                 @playEnd="sectionPlayEnd($event, index)"
                 :gradeId="gradeId"
@@ -644,7 +653,24 @@
         </view>
       </view>
     </u-popup>
-
+    <!-- 倒计时提交 -->
+    <u-popup
+      v-model="noticeShow1"
+      class="notice_modal"
+      mode="center"
+      border-radius="28"
+      width="650rpx"
+      height="262rpx"
+      :mask-close-able="false"
+    >
+      <view class="content">
+        <view class="title">提示</view>
+        <view class="had_read">
+          <text v-if="CountTo1 >= 0">视频学习时长不达标,请等待</text>
+          <text v-if="CountTo1 >= 0">{{ " " + CountTo1 + "s" }}</text>
+        </view>
+      </view>
+    </u-popup>
     <u-modal
       v-model="showMark"
       title="提示"
@@ -889,12 +915,13 @@ export default {
       prendreAutoCarme: false, // 是否发起授权相机
       studyTimer: null, // 学习记录定时器
       CountTo: 30, // 倒计时
+      CountTo1: 0,
       handoutTipLength: 0,
       menuAllList: [],
       popupPhotoShow: false,
       curPlayIndex: 0, // 正在播放的节的下标
       // h5
-      vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJs: "https://player.polyv.net/resp/vod-player/latest/player.js",
       player: "",
       H5isAllowSeek: "on",
       // stream: null,
@@ -904,6 +931,7 @@ export default {
       pauseTimer: null,
       barTimer: null,
       isReach: false,
+      noticeShow1: false,
     };
   },
   computed: {
@@ -917,6 +945,9 @@ export default {
     playSecIsLearn() {
       return this.sectionItem.learning != 1;
     },
+    orderNum() {
+      return this.businessData.goodsLearningOrder;
+    },
   },
   watch: {
     showSet(n) {
@@ -966,12 +997,14 @@ export default {
     if (this.$method.isGoLogin()) {
       return;
     }
+    this.closePhoto();
     this.courseCourseList();
   },
   onUnload() {
     console.log("onUnloadonUnloadonUnloadonUnload");
     this.originUnload();
     this.clears();
+    clearInterval(this.lockTimer);
   },
   onHide() {
     this.originUnload();
@@ -1182,11 +1215,11 @@ export default {
     },
     // 原来onshow里面的内容
     originOnShow() {
-      this.getbaseprofiletplists().then((res) => {
+      this.getbaseprofiletplists().then(async (res) => {
         this.courseDetail();
         this.getGoodsDetail();
         this.getAnswerList();
-        this.studyRecordMenuAllList();
+        await this.studyRecordMenuAllList();
         // this.answerTimer = setInterval(() => {
         //   this.getAnswerList();
         // }, 5000);
@@ -1293,12 +1326,17 @@ export default {
     },
     clearPauseTimer() {
       if (this.pauseTimer) {
-        console.log(this.pauseTimer, "清除定时器");
         this.pauseTime = 0;
         clearInterval(this.pauseTimer);
         this.pauseTimer = null;
       }
     },
+    clearBarTimer() {
+      if (this.barTimer) {
+        clearInterval(this.barTimer);
+        this.barTimer = null;
+      }
+    },
     // 原来onUnload里面的内容
     originUnload() {
       if (this.playSectionId > 0 && this.hasStart) {
@@ -1321,10 +1359,7 @@ export default {
         this.hasStart = false;
       }
       this.clearPauseTimer();
-      if (this.barTimer) {
-        clearInterval(this.barTimer);
-        this.barTimer = null;
-      }
+      this.clearBarTimer();
       this.timer && clearInterval(this.timer);
       if (this.lockTimer) {
         clearInterval(this.lockTimer);
@@ -1378,36 +1413,15 @@ export default {
         this.$api.courseDetail(item.courseId).then((res) => {
           if (res.data.code == 200) {
             // if (res.data.data.educationName == "继续教育") {
-            this.$api
-              .lockLockStatus({
-                action: "jxjy",
-                uuid: this.$method.getUuid(),
-              })
-              .then((res) => {
-                if (res.data.code == 200) {
-                  //有其他端在操作,不能学习
-                  uni.showToast({
-                    icon: "none",
-                    title: res.data.msg,
-                    mask: true,
-                    duration: 3000,
-                  });
-                } else if (res.data.code == 500) {
-                  //可以学习
-                  // this.$navTo.togo("/pages3/polyv/detail", {
-                  //   id: item.courseId,
-                  //   goodsId: this.goodsId,
-                  //   orderGoodsId: this.orderGoodsId,
-                  // });
-                  this.courseId = item.courseId;
-                  this.originOnShow();
-                  this.originMounted();
-                }
-              });
+            this.$method.checkLock().then((res) => {
+              this.courseId = item.courseId;
+              this.originOnShow();
+              this.originMounted();
+            });
           }
         });
       } else {
-        if (this.businessData.goodsLearningOrder == 2) {
+        if (this.orderNum == 2) {
           //学习顺序是从头到尾学习,没学完上一课不能学习下一课
           let prevItem = this.courseList[index - 1]; //上一课
           if (prevItem.stuAllNum == prevItem.secAllNum) {
@@ -1427,32 +1441,11 @@ export default {
             this.$api.courseDetail(item.courseId).then((res) => {
               if (res.data.code == 200) {
                 // if (res.data.data.educationName == "继续教育") {
-                this.$api
-                  .lockLockStatus({
-                    action: "jxjy",
-                    uuid: this.$method.getUuid(),
-                  })
-                  .then((res) => {
-                    if (res.data.code == 200) {
-                      //有其他端在操作,不能学习
-                      uni.showToast({
-                        icon: "none",
-                        title: res.data.msg,
-                        duration: 2000,
-                      });
-                    } else if (res.data.code == 500) {
-                      //可以学习
-
-                      // this.$navTo.togo("/pages3/polyv/detail", {
-                      //   id: item.courseId,
-                      //   goodsId: this.goodsId,
-                      //   orderGoodsId: this.orderGoodsId,
-                      // });
-                      this.courseId = item.courseId;
-                      this.originOnShow();
-                      this.originMounted();
-                    }
-                  });
+                this.$method.checkLock().then((res) => {
+                  this.courseId = item.courseId;
+                  this.originOnShow();
+                  this.originMounted();
+                });
               }
             });
           } else {
@@ -1477,31 +1470,11 @@ export default {
           this.$api.courseDetail(item.courseId).then((res) => {
             if (res.data.code == 200) {
               // if (res.data.data.educationName == "继续教育") {
-              this.$api
-                .lockLockStatus({
-                  action: "jxjy",
-                  uuid: this.$method.getUuid(),
-                })
-                .then((res) => {
-                  if (res.data.code == 200) {
-                    //有其他端在操作,不能学习
-                    uni.showToast({
-                      icon: "none",
-                      title: res.data.msg,
-                      duration: 2000,
-                    });
-                  } else if (res.data.code == 500) {
-                    //可以学习
-                    // this.$navTo.togo("/pages3/polyv/detail", {
-                    //   id: item.courseId,
-                    //   goodsId: this.goodsId,
-                    //   orderGoodsId: this.orderGoodsId,
-                    // });
-                    this.courseId = item.courseId;
-                    this.originOnShow();
-                    this.originMounted();
-                  }
-                });
+              this.$method.checkLock().then((res) => {
+                this.courseId = item.courseId;
+                this.originOnShow();
+                this.originMounted();
+              });
             }
           });
         }
@@ -1615,6 +1588,71 @@ export default {
           this.updateLiveLast(res.data.data);
         });
     },
+    async initPlayVideo(sectionItem) {
+      console.log(sectionItem, "this.sectionItem", this.menuList);
+      this.moduleId = sectionItem.moduleId;
+      this.chapterId = sectionItem.chapterId;
+      this.sectionItem = sectionItem;
+      if (sectionItem.sectionType == 1) {
+        //录播
+        this.$store.commit("setPlaySectionId", {
+          playSectionId: sectionItem.sectionId,
+        });
+        this.$store.commit("setPlayVID", {
+          playVID: sectionItem.recordingUrl,
+        });
+        await this.getPhotoLastRecord(); // 获取拍照历史
+        this.playVideo(sectionItem);
+      } else if (sectionItem.sectionType == 2) {
+        //直播
+        this.studyRecordGetLastLive();
+      } else if (sectionItem.sectionType == 3) {
+        //回放
+        this.$store.commit("setPlaySectionId", {
+          playSectionId: sectionItem.sectionId,
+        });
+        this.$store.commit("setPlayVID", {
+          playVID: sectionItem.recordingUrl,
+        });
+        this.playVideo(sectionItem);
+      } else if (sectionItem.doType == 2) {
+        uni.showModal({
+          title: "温馨提示",
+          content: "当前节视频已学完,是否进入考试?",
+          success: (res) => {
+            if (res.confirm) {
+              this.toQuestionBank(sectionItem);
+            }
+          },
+        });
+        return;
+      }
+    },
+    toQuestionBank(sectionItem) {
+      uni.navigateTo({
+        url:
+          "/pages2/class/questionBank?courseId=" +
+          this.courseId +
+          "&gradeId=" +
+          this.gradeId +
+          "&isFromVideo=1&id=" +
+          sectionItem.id +
+          "&goodsid=" +
+          this.goodsId +
+          "&moduleId=" +
+          (sectionItem.moduleId || 0) +
+          "&chapterId=" +
+          (sectionItem.chapterId || 0) +
+          "&orderGoodsId=" +
+          this.orderGoodsId +
+          "&type=" +
+          (sectionItem.type == 4 ? 1 : 3) +
+          "&learning=" +
+          sectionItem.studyStatus +
+          "&isBackVideo=" +
+          1,
+      });
+    },
     studyRecordQueryLiveLast() {
       // /study/record/queryLiveLast
       this.$api
@@ -1623,50 +1661,17 @@ export default {
           orderGoodsId: this.orderGoodsId,
           courseId: this.courseId,
         })
-        .then(async (res) => {
-          if (res.data.data) {
-            this.moduleId = res.data.data.moduleId;
-            this.chapterId = res.data.data.chapterId;
-            if (res.data.data.sectionType == 1) {
-              //录播
-              this.$store.commit("setPlaySectionId", {
-                playSectionId: res.data.data.sectionId,
-              });
-              this.$store.commit("setPlayVID", {
-                playVID: res.data.data.recordingUrl,
-              });
-
-              this.sectionItem = res.data.data;
-              await this.getPhotoLastRecord(); // 获取拍照历史
-              this.playVideo(res.data.data);
-            } else if (res.data.data.sectionType == 2) {
-              //直播
-              this.studyRecordGetLastLive();
-            } else if (res.data.data.sectionType == 3) {
-              //回放
-              this.$store.commit("setPlaySectionId", {
-                playSectionId: res.data.data.sectionId,
-              });
-              this.$store.commit("setPlayVID", {
-                playVID: res.data.data.recordingUrl,
-              });
-              this.sectionItem = res.data.data;
-              this.playVideo(res.data.data);
+        .then((res) => {
+          let { data } = res.data;
+          if (!data.sectionId) {
+            data = this.menuAllList[0];
+          } else {
+            if (data.learning == 1 && this.orderNum == 2) {
+              let next = this.menuAllList.find((e) => e.studyStatus != 1);
+              next && (data = next);
             }
-
-            // 查询用户最后一次看的录播的信息
-            this.$http({
-              url: "/study/record/getUserWatchLast",
-              method: "get",
-              data: {
-                orderGoodsId: this.orderGoodsId,
-              },
-            }).then((res) => {
-              if (res.data.code == 200) {
-                this.sectionItem = res.data.data || {};
-              }
-            });
           }
+          this.initPlayVideo(data);
         });
     },
     /**
@@ -1898,8 +1903,8 @@ export default {
     },
     studyRecordMenuAllList() {
       // study/record/menuAllList
-      this.$api
-        .studyRecordMenuAllList({
+      return this.$api
+        .studMenuAllList({
           courseId: this.courseId,
           gradeId: this.gradeId,
           goodsId: this.goodsId,
@@ -1907,16 +1912,114 @@ export default {
         .then((res) => {
           let nowTime = Number(new Date().getTime() / 1000).toFixed(0);
           if (res.data.data) {
-            this.menuAllList = res.data.data;
-            // console.log('======0', this.sectionItem);
+            this.menuAllList = res.data.data.filter(
+              (e) => e.doType != 1 || (e.doType == 2 && e.studyStatus == 1)
+            );
             this.livingItem = res.data.data.find(
               (item) =>
                 item.liveStartTime <= nowTime && item.liveEndTime > nowTime
             );
           }
+          return Promise.resolve();
         });
     },
-    getbaseprofiletplists() {
+    async getbaseprofiletplists() {
+      // #ifdef MP-WEIXIN
+      this.getCameraSetting();
+      // #endif
+      let {
+        data: { code, rows },
+      } = await this.$api.getbaseprofiletplists({
+        goodsId: this.goodsId,
+        orderGoodsId: this.orderGoodsId,
+      });
+      if (code === 200 && rows.length && rows[0].keyValue) {
+        let baseRes = await this.$api.getbaseprofiletpId(this.goodsId);
+        if (baseRes.data.code === 200 && baseRes.data.data) {
+          let {
+            data: { code, data },
+          } = await this.$api.getbaseprofiletpgetInfo({
+            goodsId: this.goodsId,
+            orderGoodsId: this.orderGoodsId,
+          });
+          if (
+            code === 200 &&
+            (!data || (data.status === 3 && data.changeStatus === 1))
+          ) {
+            this.needProfileModal = true;
+            uni.showModal({
+              content: !data
+                ? "请前往填写资料"
+                : "资料审核不通过,请前往重新填写",
+              cancelText: "返回",
+              success: (resultst) => {
+                if (resultst.confirm) {
+                  this.$navTo.togo("/pages2/verify/input", {
+                    id: this.goodsId,
+                    orderGoodsId: this.orderGoodsId,
+                  });
+                }
+                if (resultst.cancel) {
+                  uni.navigateBack();
+                }
+              },
+            });
+            return Promise.reject();
+          } else if (data.status === 1 && JSON.parse(rows[0].keyValue2)[0]) {
+            let {
+              data: { code, data },
+            } = await this.$api.getbaseprofileStampgetInfo({
+              goodsId: this.goodsId,
+              orderGoodsId: this.orderGoodsId,
+            });
+            if (
+              code === 200 &&
+              (!data || (data.status === 3 && data.changeStatus === 1))
+            ) {
+              this.needProfileModal = true;
+              uni.showModal({
+                content: !data
+                  ? "请前往填写盖章资料"
+                  : "资料盖章审核不通过,请前往重新填写",
+                cancelText: "返回",
+                success: (resultst) => {
+                  if (resultst.confirm) {
+                    this.$navTo.togo("/pages2/verify/input2", {
+                      id: this.goodsId,
+                      orderGoodsId: this.orderGoodsId,
+                    });
+                  }
+                  if (resultst.cancel) {
+                    uni.navigateBack();
+                  }
+                },
+              });
+              return Promise.reject();
+            }
+          }
+        }
+      }
+      let detail = await this.$api.goodsDetail(this.goodsId);
+      if (detail.data.data.erJianErZao) {
+        let info = await this.$api.userConfirmInfoDetail({
+          orderGoodsId: this.orderGoodsId,
+        });
+        if (!info.data.data || info.data.data.pushInfo !== 1) {
+          uni.showModal({
+            showCancel: false,
+            title: "提示",
+            content: "开通信息推送不成功,无法进入学习!",
+            success: (resultst) => {
+              uni.navigateBack();
+            },
+          });
+          return Promise.reject();
+        }
+      }
+      return Promise.resolve();
+    },
+
+    getbaseprofiletplists1() {
       return new Promise((resolve) => {
         let self = this;
         // #ifdef MP-WEIXIN
@@ -1929,6 +2032,7 @@ export default {
           })
           .then((res) => {
             if (res.data.code === 200 && res.data.rows.length) {
+              console.log(res.data.rows[0], 987);
               if (res.data.rows[0].keyValue) {
                 self.$api.getbaseprofiletpId(self.goodsId).then((baseRes) => {
                   if (baseRes.data.code === 200) {
@@ -1941,6 +2045,7 @@ export default {
                         })
                         .then((result) => {
                           if (result.data.code === 200) {
+                            // status 1通过 2是待审 3是不通过
                             if (
                               !result.data.data ||
                               (result.data.data.status === 3 &&
@@ -2060,6 +2165,7 @@ export default {
                 resolve();
               }
             } else {
+              // 调用推送是否成功
               resolve();
             }
           });
@@ -2071,15 +2177,6 @@ export default {
         }
       });
     },
-
-    // /**
-    //  * 获取业务层次详情
-    //  */
-    // courseBusiness() {
-    //   this.$api.courseBusiness(this.goodsData.businessId).then((res) => {
-    //     this.businessData = res.data.data;
-    //   });
-    // },
     /**
      * 计算tabs宽度
      */
@@ -2473,7 +2570,7 @@ export default {
         clearInterval(this.timer);
       }
       // #ifdef H5
-      await this.clears();
+      // await this.clears();
       // #endif
       if (this.vid) {
         //切换视频
@@ -2737,7 +2834,7 @@ export default {
         PlayDuration = polyvPlayerContext.j2s_realPlayVideoTime(); //本次看的时长
         // #endif
       }
-      if (currentTime < 15) {
+      if (currentTime < 10 && !this.ossAvatarUrl) {
         return;
       }
       if (this.playChannelId > 0) {
@@ -2760,6 +2857,7 @@ export default {
         videoCurrentTime: parseInt(
           currentTime > 0 ? currentTime : self.studyDuration
         ),
+        erJianErZao: this.erJianErZao,
       };
       if (this.ossAvatarUrl) {
         data.similarity = this.compareFaceData; // 相似度
@@ -2773,7 +2871,7 @@ export default {
           .studyRecord(data)
           .then((res) => {
             console.log(res, "记录返回");
-            let { code } = res.data;
+            let { code, msg } = res.data;
             if (code == 200) {
               if (status > 0) {
                 this.studyRecordMenuAllList();
@@ -2788,6 +2886,27 @@ export default {
                 uni.$emit("playNext" + playNextId); //通知播放结束
               }
               self.ossAvatarUrl = "";
+            } else if (code == 600) {
+              uni.showModal({
+                showCancel: false,
+                title: "提示",
+                content: msg,
+                success: (resultst) => {
+                  uni.navigateBack();
+                },
+              });
+            } else if (code == 558) {
+              this.CountTo1 = msg.split(",")[1];
+              this.noticeShow1 = true;
+              var timer = setInterval(() => {
+                this.CountTo1--;
+                if (this.CountTo1 < 0) {
+                  this.noticeShow1 = false;
+                  clearInterval(timer);
+                  this.postStudyRecord(1);
+                }
+              }, 1000);
+              reject("中断执行");
             } else {
               this.uploadLock = false;
               uni.showToast({
@@ -3113,14 +3232,38 @@ export default {
         //第二个弹窗
         uni.showModal({
           title: "温馨提示",
-          content: "当前最后一节视频已学完 请检查所有章节是否学习完成?",
-          showCancel: false,
+          content:
+            "恭喜您课程学习全部完成,教务会在1-3个工作日内完成学习初审,请耐心等待。",
+          showCancel: !this.erJianErZao,
           success: (res) => {
             if (res.confirm) {
+              uni.switchTab({
+                url: "/pages/learn/index",
+              });
             }
           },
         });
       } else {
+        if (data.doType == 2) {
+          if (data.studyStatus == 1) {
+            uni.showToast({
+              title: "试卷已合格!",
+              duration: 2000,
+              icon: "none",
+            });
+            return;
+          }
+          uni.showModal({
+            title: "温馨提示",
+            content: "当前节视频已学完,是否进入考试?",
+            success: (res) => {
+              if (res.confirm) {
+                this.toQuestionBank(data);
+              }
+            },
+          });
+          return;
+        }
         uni.showModal({
           title: "温馨提示",
           content: "当前节视频已学完,继续学习下一节?",
@@ -3404,7 +3547,8 @@ export default {
       canvas.width = 400;
       canvas.height = 400;
       const context = canvas.getContext("2d");
-      const video = document.querySelector("video");
+      const box = document.querySelector(".photo_v");
+      const video = box.querySelector("video");
       context.drawImage(video, 0, 0, 400, 400);
       this.faceUrl = canvas.toDataURL("image/png");
       this.isTaking = false;
@@ -3420,13 +3564,12 @@ export default {
     //关闭相机
     closePhoto() {
       this.photoPopup = false;
-      self.enableAutoRotation = true;
+      this.enableAutoRotation = true;
     },
     /**
      * 进入全屏
      */
     fullscreenchange(event) {
-      console.log(event.detail.direction, 666);
       if (event.detail.direction == "vertical") {
         this.navShow = true;
       } else if (event.detail.direction == "horizontal") {
@@ -3456,16 +3599,14 @@ export default {
     },
     getGoodsDetail() {
       let self = this;
-      // '/goods/'+ data,
       this.$api.goodsDetail(this.goodsId).then(async (res) => {
         this.goodsData = res.data.data;
-        await this.checkFinishRequiredCourse();
+        this.option.periodWaitTime && (await this.checkFinishRequiredCourse());
         if (self.goodsData.buyNote) {
           this.baseHandoutTipList();
         }
         self.gradeId = self.goodsData.gradeId;
         self.erJianErZao = self.goodsData.erJianErZao;
-
         this.courseBusiness(this.goodsData.businessId);
         self.getMenuList();
         self.getReMenuList(); //获取重修目录
@@ -3480,11 +3621,9 @@ export default {
         if (self.goodsData.goodsPlayConfig) {
           self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
           if (self.goodsPlayConfig.autoPlay > 0) {
-            // #ifdef H5
             self.autoplay = true;
-            // #endif
           }
-          if (self.goodsPlayConfig.drag > 0) {
+          if (self.goodsPlayConfig.drag > 0 && !self.erJianErZao) {
             // #ifdef MP-WEIXIN
             self.isAllowSeek = "yes";
             // #endif
@@ -3693,11 +3832,8 @@ export default {
     loadPlayer() {
       const polyvPlayer = window.polyvPlayer;
       this.$api.polyvVideoSign(this.vid).then(async (res) => {
-        this.player = await polyvPlayer({
-          wrap: "#player",
-          width: "100%",
+        let option = {
           showLine: "off",
-          height: 218,
           ban_history_time: "on",
           vid: this.vid,
           forceH5: true,
@@ -3710,53 +3846,75 @@ export default {
           watchStartTime: this.recordObj.videoCurrentTime, // 播放开始时间,表示视频从第几秒开始播放,参数值需小于视频时长
           ts: res.data.data.ts, // 移动播放加密视频需传入的时间戳。
           sign: res.data.data.sign, // 移动端播放加密视频所需的签名
-          // playsafe: (vid, next) => { // PC端播放加密视频所需的授权凭证
-          // console.log('111111111111', vid);
-          //   // this.$api.obtainpolyvvideopcsign(vid).then((res) => {
-          //   //   console.log('请求完后', res);
-          //   //   next(res.data.data);
-          //   // });
-          // },
-        });
-
-        polyvPlayerContext = this.player;
-
-        this.player.on("s2j_onPlayStart", async (vid) => {
+        };
+        if (polyvPlayerContext) {
+          polyvPlayerContext.changeVid(option);
+        } else {
+          option = {
+            wrap: "#player",
+            width: "100%",
+            height: 218,
+            ...option,
+          };
+          polyvPlayerContext = await polyvPlayer(option);
+        }
+        // polyvPlayerContext = await polyvPlayer({
+        //   wrap: "#player",
+        //   width: "100%",
+        //   showLine: "off",
+        //   height: 218,
+        //   ban_history_time: "on",
+        //   vid: this.vid,
+        //   forceH5: true,
+        //   autoplay: this.autoplay, // 自动播放
+        //   ban_seek: this.H5isAllowSeek, // 是否禁止拖拽进度条
+        //   speed: this.playbackRate, // 倍数
+        //   teaser_show: 1,
+        //   tail_show: 1,
+        //   hideSwitchPlayer: true,
+        //   watchStartTime: this.recordObj.videoCurrentTime, // 播放开始时间,表示视频从第几秒开始播放,参数值需小于视频时长
+        //   ts: res.data.data.ts, // 移动播放加密视频需传入的时间戳。
+        //   sign: res.data.data.sign, // 移动端播放加密视频所需的签名
+        // });
+        // polyvPlayerContext = this.player;
+        polyvPlayerContext.on("s2j_onPlayStart", async (vid) => {
           // 视频初次播放时触发
           console.log("视频初次播放时触发:");
           // #ifdef H5
           // h5禁止拖动进度条
-          clearInterval(this.barTimer);
-          this.barTimer = null;
-          let originTime = this.recordObj.videoCurrentTime || 0;
-          if (this.H5isAllowSeek == "on" && !this.barTimer) {
-            this.barTimer = setInterval(function () {
-              const currentTime = polyvPlayerContext.j2s_getCurrentTime();
-              if (
-                currentTime - originTime > 1 ||
-                currentTime - originTime < 0
-              ) {
-                polyvPlayerContext.j2s_seekVideo(originTime);
-              } else {
-                originTime = currentTime;
-              }
-            }, 500);
+          if (!this.$method.isWeixin()) {
+            this.clearBarTimer();
+            let originTime = this.recordObj.videoCurrentTime || 0;
+            if (this.H5isAllowSeek == "on") {
+              this.barTimer = setInterval(() => {
+                const currentTime = polyvPlayerContext.j2s_getCurrentTime();
+                // console.log(currentTime, originTime, 789);
+                if (
+                  currentTime - originTime > 15 ||
+                  currentTime - originTime < 0
+                ) {
+                  polyvPlayerContext.j2s_seekVideo(originTime);
+                } else {
+                  originTime = currentTime;
+                }
+              }, 2000);
+            }
           }
+
           // #endif
           this.loadedmetadata();
           this.postStudyRecord(0);
         });
-
-        this.player.on("s2j_onVideoPause", () => {
+        polyvPlayerContext.on("s2j_onVideoPause", () => {
           // 视频暂停时触发
           console.log("视频暂停时触发", this.vid);
           this.erJianErZaoPauseTip();
 
+          this.clearBarTimer();
           clearInterval(this.studyTimer);
           clearInterval(this.timer);
         });
-
-        this.player.on("s2j_onVideoPlay", () => {
+        polyvPlayerContext.on("s2j_onVideoPlay", () => {
           // 视频初次播放或由暂停恢复播放时触发
           console.log("视频初次播放或由暂停恢复播放时触发");
           if (this.needSeek) {
@@ -3788,10 +3946,10 @@ export default {
             this.postStudyRecord(0, this.playSectionId);
           }, 15000);
         });
-
-        this.player.on("s2j_onPlayOver", async () => {
+        polyvPlayerContext.on("s2j_onPlayOver", async () => {
           // 当前视频播放完毕时触发
           this.hasStart = false;
+          this.clearBarTimer();
           clearInterval(this.studyTimer);
           clearInterval(this.timer);
           uni.showToast({
@@ -3806,7 +3964,8 @@ export default {
     clears() {
       return new Promise((resolve, reject) => {
         this.vid = "";
-        this.player && this.player.destroy();
+        polyvPlayerContext && polyvPlayerContext.destroy();
+        polyvPlayerContext = null;
         resolve();
       });
     },
@@ -3866,7 +4025,8 @@ export default {
       this.enableAutoRotation = false;
 
       this.$nextTick(() => {
-        const video = document.querySelector("video");
+        const box = document.querySelector(".photo_v");
+        const video = box.querySelector("video");
         console.log("video:", video);
         video.srcObject = stream;
         video.play();

+ 24 - 317
pages5/examBank/index.vue

@@ -768,56 +768,16 @@
               </template>
             </view>
           </template>
-
-          <view class="footer_btn">
-            <view class="collect"> </view>
-            <view class="flex_center" @click="openFooterTab">
-              <view class="up-icon">
-                <image src="/static/up.png"></image>
-              </view>
-              答题卡
-            </view>
-            <view class="collect show" @click="pdsubmit">
-              <view>
-                <image src="/static/jj.png" mode=""></image>
-                <view>交卷</view>
-              </view>
-            </view>
-          </view>
         </view>
       </swiper-item>
     </swiper>
-
-    <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
-      <view class="popupView">
-        <view class="popupTops">
-          <view class="topIcon"></view>
-          点击编号即可跳转至对应题目
-        </view>
-        <view class="popupContent">
-          <scroll-view scroll-y="true" style="height: 506rpx">
-            <view class="boxSty">
-              <view
-                v-for="(item, index) in questionList"
-                :key="index"
-                @click="changeIndex(index)"
-                :class="{
-                  isRight: bankType == 1 && isRight(item, index),
-                  isWrong: bankType == 1 && isWrong(item, index),
-                  isPart: bankType == 1 && isPart(item, index),
-                  isOver: bankType == 1 && isOver(item, index),
-                  check_ans: bankType == 2 && isCheck(item, index),
-                }"
-                class="liListSty"
-              >
-                {{ index + 1 }}
-              </view>
-            </view>
-          </scroll-view>
-        </view>
-      </view>
-    </u-popup>
-
+    <bank-bom
+      :isShowCollect="false"
+      :questionList="questionList"
+      :bankType="bankType"
+      :current.sync="current"
+      @submit="pdsubmit"
+    ></bank-bom>
     <view class="dialog" v-if="showDialog">
       <image class="pointer" src="/static/pointer.png" mode=""></image>
       <view class="text">左右滑动切换上下题</view>
@@ -906,10 +866,8 @@
 
 <script>
 import { mapGetters, mapActions } from "vuex";
+import BankBom from "../../components/common/BankBom.vue";
 export default {
-  computed: {
-    ...mapGetters(["sysTime"]),
-  },
   data() {
     return {
       subscribeId: 0,
@@ -921,7 +879,6 @@ export default {
       judge: ["正确", "错误"],
       ans: [],
       ques: [],
-      show: false,
       showDialog: false,
       bankList: [],
       collectList: [],
@@ -951,8 +908,6 @@ export default {
     };
   },
   async onLoad(option) {
-    console.log(option);
-
     this.examStartTime = option.examStartTime;
     this.examEndTime = option.examEndTime;
     this.subscribeId = option.subscribeId || "";
@@ -1764,17 +1719,15 @@ export default {
         });
 
       //错题集id提交(客观题)
-      if (doWrongQuestionIds.length) {
-        this.$api
-          .mockWrongRecord({
-            eachExamId: this.eachExamId,
-            examId: this.examId,
-            questionIds: form.questionIds,
-            recordId: this.recordId,
-            doMode: this.doMode,
-          })
-          .then((res) => {});
-      }
+      this.$api
+        .mockWrongRecord({
+          eachExamId: this.eachExamId,
+          examId: this.examId,
+          questionIds: form.questionIds,
+          recordId: this.recordId,
+          doMode: this.doMode,
+        })
+        .then((res) => {});
     },
 
     /**
@@ -2016,44 +1969,6 @@ export default {
       this.isDoOver();
     },
 
-    isCheck(item, index) {
-      // 案例题处理
-      let { ques, type, ans } = item;
-      if (type == 4) {
-        return ans.length == ques.length;
-      }
-      if (ques) {
-        return true;
-      }
-    },
-    isRight(item, index) {
-      //单选
-      if (this.questionList[index].ques) {
-        if (item.type == 1) {
-          return this.questionList[index].ques == this.questionList[index].ans;
-          //多选
-        } else if (item.type == 2) {
-          //每一项都相等
-          return this.questionList[index].ans.every((item, i) => {
-            return item == this.questionList[index].ques[i];
-          });
-          //判断
-        } else if (item.type == 3) {
-          return this.questionList[index].ques == this.questionList[index].ans;
-          // } else if (item.type == 5) {
-          // 	if(this.questionList[index].ques.text){
-          // 		return true
-          // 	}else{
-          // 		return false
-          // 	}
-        } else {
-          return false;
-        }
-      } else {
-        return false;
-      }
-    },
-
     right(bankIndex, ansIndex, option) {
       if (
         this.questionList[bankIndex].ques[ansIndex] &&
@@ -2098,99 +2013,14 @@ export default {
       }
     },
 
-    isWrong(item, index) {
-      if (this.questionList[index].ques) {
-        //单选
-        if (item.type == 1) {
-          return this.questionList[index].ques != this.questionList[index].ans;
-          //多选
-        } else if (item.type == 2) {
-          //每一项都相等
-          return this.questionList[index].ques.some((item, i) => {
-            return this.questionList[index].ans.indexOf(item) == -1;
-          });
-          //判断
-        } else if (item.type == 3) {
-          return this.questionList[index].ques != this.questionList[index].ans;
-        } else {
-          return false;
-        }
-      } else {
-        return false;
-      }
-    },
-    isPart(item, index) {
-      if (this.questionList[index].ques) {
-        if (item.type == 2) {
-          let isWrong = this.questionList[index].ques.some((item, i) => {
-            return this.questionList[index].ans.indexOf(item) == -1;
-          });
-
-          let isRight = this.questionList[index].ans.every((item, i) => {
-            return item == this.questionList[index].ques[i];
-          });
-
-          if (!isRight && !isWrong) {
-            return true;
-          }
-        }
-      } else {
-        return false;
-      }
-    },
-    isOver(item, index) {
-      if (this.questionList[index].ques) {
-        if (item.type == 4) {
-          //案例题
-          let isOver = item.jsonStr.every((jsonItem, indexs) => {
-            if (
-              jsonItem.type == 1 ||
-              jsonItem.type == 2 ||
-              jsonItem.type == 3
-            ) {
-              if (item.ques[indexs]) {
-                return true;
-              } else {
-                return false;
-              }
-            } else if (jsonItem.type == 5) {
-              if (
-                item.ques[indexs] &&
-                (item.ques[indexs].text || item.ques[indexs].imageList.length)
-              ) {
-                console.log("chil");
-                return true;
-              } else {
-                return false;
-              }
-            }
-          });
-
-          if (isOver) {
-            return true;
-          } else {
-            return false;
-          }
-        } else if (item.type == 5) {
-          //简答题
-          //每一项都相等
-          if (item.ques && (item.ques.imageList.length || item.ques.text)) {
-            return true;
-          }
-          //判断
-        } else {
-          return false;
-        }
-      } else {
-        return false;
-      }
-    },
-
     tabSelect(index, bankindex) {
       this.$set(this.questionList[bankindex], "current", index);
     },
 
     showPhoto(contentStr) {
+      // #ifdef H5
+      return;
+      // #endif
       if (contentStr && typeof contentStr == "string") {
         let reg = /<img[^>]*src[=\'\"\s]+([^\'\"]*)[\'\"]?[^>]*>/gi;
         let strArr = contentStr.match(reg);
@@ -2221,11 +2051,15 @@ export default {
     },
   },
   computed: {
+    ...mapGetters(["sysTime"]),
     doMode() {
       // 做题模式 1章卷 2随机练习 3模拟组卷
       return this.examData.simulateStatus ? 3 : undefined;
     },
   },
+  components: {
+    BankBom,
+  },
 };
 </script>
 
@@ -2452,29 +2286,6 @@ export default {
   align-items: center;
   margin-bottom: 30rpx;
 }
-.popupView {
-  height: 100%;
-  padding-bottom: 100rpx;
-  .popupTops {
-    height: 77rpx;
-    border-bottom: 1rpx solid #eee;
-    text-align: center;
-    line-height: 77rpx;
-    font-size: 24rpx;
-    color: #999;
-    position: relative;
-    .topIcon {
-      position: absolute;
-      top: 10rpx;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 80rpx;
-      height: 8rpx;
-      background-color: #999;
-      border-radius: 4rpx;
-    }
-  }
-}
 .pageContent {
   position: relative;
   background-color: #eaeef1;
@@ -2503,111 +2314,7 @@ export default {
   color: #666;
   font-size: 30rpx;
 }
-.footer_btn {
-  background-color: #fff;
-  z-index: 10078;
-  position: fixed;
-  bottom: 0rpx;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  width: 100%;
-  height: 98rpx;
-  padding: 0rpx 38rpx;
-  border-top: 1rpx solid #eee;
 
-  .flex_center {
-    flex: 1;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    flex-direction: column;
-    margin: 0 200rpx;
-    font-size: 24rpx;
-    color: #999999;
-
-    .up-icon {
-      margin-bottom: 18rpx;
-      width: 100%;
-      display: flex;
-      justify-content: center;
-      image {
-        width: 58rpx;
-        height: 21rpx;
-      }
-    }
-  }
-  .collect {
-    visibility: hidden;
-    width: 100rpx;
-
-    &.show {
-      visibility: visible;
-    }
-
-    > view {
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-
-      image {
-        width: 32rpx;
-        height: 32rpx;
-        margin-bottom: 6rpx;
-      }
-
-      view {
-        font-size: 24rpx;
-        color: #999999;
-      }
-    }
-  }
-}
-.boxSty {
-  padding: 44rpx 41rpx 0rpx;
-}
-.liListSty {
-  border: 1rpx solid #eeeeee;
-  width: 88rpx;
-  height: 88rpx;
-  border-radius: 32rpx;
-  text-align: center;
-  line-height: 88rpx;
-  color: #333;
-  font-size: 32rpx;
-  float: left;
-  margin: 20rpx 23rpx;
-
-  &.isRight {
-    border: 1rpx solid #eeeeee;
-    color: #fff;
-    background: #36c75a;
-  }
-
-  &.isWrong {
-    border: 1rpx solid #eeeeee;
-    color: #fff;
-    background: #ff3b30;
-  }
-
-  &.isPart {
-    border: 1rpx solid #eeeeee;
-    color: #fff;
-    background: #ffc53d;
-  }
-
-  &.isOver {
-    border: 1rpx solid #eeeeee;
-    color: #fff;
-    background: blue;
-  }
-  &.check_ans {
-    border: 1rpx solid #eeeeee;
-    color: #fff;
-    background: #007aff;
-  }
-}
 .answerInfos {
   padding: 25rpx 25rpx 25rpx 23rpx;
 }

+ 3 - 4
pages5/examReport/index.vue

@@ -57,7 +57,7 @@
           </view>
         </view>
       </view>
-      <view class="dis_fst">
+      <!-- <view class="dis_fst">
         <navigator
           hover-class="none"
           :url="
@@ -115,7 +115,7 @@
             去做题
           </button>
         </navigator>
-      </view>
+      </view> -->
     </view>
     <view class="bottom">
       <view class="circle-wrap">
@@ -556,8 +556,7 @@ export default {
     },
     mockSubscribeInfo() {
       this.$api.mockSubscribeInfo(this.subscribeId).then((res) => {
-        console.log("subscribeInfo", this.subscribeInfo);
-        this.subscribeInfo = res.data.data;
+        this.subscribeInfo = res.data.data || {};
       });
     },
     openRemind() {

+ 484 - 355
pages5/mockExam/examApply.vue

@@ -1,56 +1,83 @@
 <template>
-<!-- 模考报名页面 -->
-    <view class="exam_apply">
-        <nav-bar title="模考报名" class="navbar"></nav-bar>
-        <!-- background="{ background: '#498AFE' }" -->
-        <image class="mock_bg" src="../static/mock_bg.png"></image>
-		<!-- <u-navbar :is-back="false" title="模考报名" :border-bottom="false"  title-color="#fff" back-icon-color="#ffffff" background="{ background: '#498AFE' }">
+  <!-- 模考报名页面 -->
+  <view class="exam_apply">
+    <nav-bar title="模考报名" class="navbar"></nav-bar>
+    <!-- background="{ background: '#498AFE' }" -->
+    <image class="mock_bg" src="../static/mock_bg.png"></image>
+    <!-- <u-navbar :is-back="false" title="模考报名" :border-bottom="false"  title-color="#fff" back-icon-color="#ffffff" background="{ background: '#498AFE' }">
 		</u-navbar> -->
-        
-        <!-- <u-line color="#D6D6DB" /> -->
-        <view class="mains">
-            <u-form :model="examform" ref="uForm" :rules="rules" label-width='74'>
-                <view class="items">
-                    <view class="item_title">
-                        <text class="star_red">*</text>
-                        <text class="number">01</text>
-                        <text class="category">姓名</text>
-                    </view>
-                    <u-form-item label=" " label-width="74" prop="userName" :border-bottom='false'>
-                        <view class="inputs">
-                            <input v-model.trim="examform.userName" class="uni-input" placeholder="请输入" />
-                        </view>
-                    </u-form-item>
-                </view>
 
-                <view class="items">
-                    <view class="item_title">
-                        <text class="star_red">*</text>
-                        <text class="number">02</text>
-                        <text class="category">性别</text>
-                    </view>
-                    <u-form-item label=" " label-width="74" prop="userSex" :border-bottom='false'>
-                        <u-radio-group v-model="examform.userSex" :wrap='true' @change="radioGroupChange">
-                            <u-radio value="1" name='1'>男</u-radio>
-                            <u-radio value="2" name='2'>女</u-radio>
-                        </u-radio-group>
-                    </u-form-item>
-                </view>
+    <!-- <u-line color="#D6D6DB" /> -->
+    <view class="mains">
+      <u-form :model="examform" ref="uForm" :rules="rules" label-width="74">
+        <view class="items">
+          <view class="item_title">
+            <text class="star_red">*</text>
+            <text class="number">01</text>
+            <text class="category">姓名</text>
+          </view>
+          <u-form-item
+            label=" "
+            label-width="74"
+            prop="userName"
+            :border-bottom="false"
+          >
+            <view class="inputs">
+              <input
+                v-model.trim="examform.userName"
+                class="uni-input"
+                placeholder="请输入"
+              />
+            </view>
+          </u-form-item>
+        </view>
 
-                <view class="items">
-                    <view class="item_title">
-                        <text class="star_red">*</text>
-                        <text class="number">03</text>
-                        <text class="category">企业名称</text>
-                    </view>
-                    <u-form-item label=" " label-width="74" prop="companyName" :border-bottom='false'>
-                        <view class="inputs">
-                            <input v-model.trim="examform.companyName" class="uni-input" placeholder="请输入" />
-                        </view>
-                    </u-form-item>
-                </view>
+        <view class="items">
+          <view class="item_title">
+            <text class="star_red">*</text>
+            <text class="number">02</text>
+            <text class="category">性别</text>
+          </view>
+          <u-form-item
+            label=" "
+            label-width="74"
+            prop="userSex"
+            :border-bottom="false"
+          >
+            <u-radio-group
+              v-model="examform.userSex"
+              :wrap="true"
+              @change="radioGroupChange"
+            >
+              <u-radio value="1" name="1">男</u-radio>
+              <u-radio value="2" name="2">女</u-radio>
+            </u-radio-group>
+          </u-form-item>
+        </view>
+
+        <view class="items">
+          <view class="item_title">
+            <!-- <text class="star_red">*</text> -->
+            <text class="number">03</text>
+            <text class="category">企业名称</text>
+          </view>
+          <u-form-item
+            label=" "
+            label-width="74"
+            prop="companyName"
+            :border-bottom="false"
+          >
+            <view class="inputs">
+              <input
+                v-model.trim="examform.companyName"
+                class="uni-input"
+                placeholder="请输入"
+              />
+            </view>
+          </u-form-item>
+        </view>
 
-                <!-- <view class="items">
+        <!-- <view class="items">
                     <view class="item_title">
                         <text class="star_red">*</text>
                         <text class="number">04</text>
@@ -63,7 +90,7 @@
                     </u-form-item>
                 </view> -->
 
-                <!-- <view class="items">
+        <!-- <view class="items">
                     <view class="item_title">
                         <text class="star_red">*</text>
                         <text class="number">04</text>
@@ -75,343 +102,445 @@
                         </view>
                     </u-form-item>
                 </view> -->
-                <view class="items">
-                    <view class="item_title">
-                        <text class="star_red">*</text>
-                        <text class="number">04</text>
-                        <text class="category">报考专业</text>
-                    </view>
-                    <u-form-item label=" " label-width="74" prop="majorId" :border-bottom='false'>
-                        <view class="inputs">
-                            <view class="item_box">
-                                <picker class="picker" mode="selector" :range="majorList" range-key="majorName" :value="examform.majorId"
-                                 @change="majorChange">
-                                    <view class="pick_con" style="fontSize: 40rpx">{{ majorName }}</view>
-                                </picker>
-                                <u-icon class="icon" name="arrow-down"></u-icon>
-                            </view>
-                        </view>
-                    </u-form-item>
-                </view>
-                <view class="items">
-                    <view class="item_title">
-                        <text class="star_red">*</text>
-                        <text class="number">05</text>
-                        <text class="category">报考科目</text>
-                    </view>
-                    <u-form-item label=" " label-width="74" prop="userMajors" :border-bottom='false'>
-                        <template v-if="subjectLists.length">
-                            <u-checkbox-group :wrap='true' @change="checkboxGroupChange">
-                                <u-checkbox v-model="item.checked" v-for="(item, index) in subjectLists" :key="index" :name="item.subjectId">
-                                    {{ item.name }}
-                                </u-checkbox>
-                            </u-checkbox-group>
-                        </template>
-                        <template v-else>
-                            <view class="grays">请先选择报考专业</view>
-                        </template>
-                    </u-form-item>
-                </view>
-            </u-form>
-            <!-- 提交按钮 -->
-            <view class="btns">
-                <view v-if="endTime <= sysTime" class="submits disable">提交</view>
-                <view v-else class="submits" @click="submit()">
-                    提交
-                </view>
+        <view class="items">
+          <view class="item_title">
+            <text class="star_red">*</text>
+            <text class="number">04</text>
+            <text class="category">报考专业</text>
+          </view>
+          <u-form-item
+            label=" "
+            label-width="74"
+            prop="majorId"
+            :border-bottom="false"
+          >
+            <view class="inputs">
+              <view class="item_box">
+                <picker
+                  class="picker"
+                  mode="selector"
+                  :range="majorList"
+                  range-key="majorName"
+                  :value="examform.majorId"
+                  @change="majorChange"
+                >
+                  <view class="pick_con" style="fontsize: 40rpx">{{
+                    majorName
+                  }}</view>
+                </picker>
+                <u-icon class="icon" name="arrow-down"></u-icon>
+              </view>
             </view>
+          </u-form-item>
+        </view>
+        <view class="items">
+          <view class="item_title">
+            <text class="star_red">*</text>
+            <text class="number">05</text>
+            <text class="category">报考科目</text>
+          </view>
+          <u-form-item
+            label=" "
+            label-width="74"
+            prop="userMajors"
+            :border-bottom="false"
+          >
+            <template v-if="subjectLists.length">
+              <u-checkbox-group :wrap="true" @change="checkboxGroupChange">
+                <u-checkbox
+                  v-model="item.checked"
+                  v-for="(item, index) in subjectLists"
+                  :key="index"
+                  :name="item.subjectId"
+                >
+                  {{ item.name }}
+                </u-checkbox>
+              </u-checkbox-group>
+            </template>
+            <template v-else>
+              <view class="grays">请先选择报考专业</view>
+            </template>
+          </u-form-item>
         </view>
+      </u-form>
+      <!-- 提交按钮 -->
+      <view class="btns">
+        <view v-if="endTime <= sysTime" class="submits disable">提交</view>
+        <view v-else class="submits" @click="submit()"> 提交 </view>
+      </view>
     </view>
+  </view>
 </template>
 
 <script>
+import { tenantId, BASE_URL } from "@/common/request.js";
 export default {
-    name: 'examApply',
-    
-    data() {
-        var validatorMajor = (rule, value, callback) => {
-            if (value.length) {
-                callback()
-            } else {
-                callback(new Error("请选择报考科目"))
-            }
+  name: "examApply",
+
+  data() {
+    var validatorMajor = (rule, value, callback) => {
+      if (value.length) {
+        callback();
+      } else {
+        callback(new Error("请选择报考科目"));
+      }
+    };
+    var validatorMajorId = (rule, value, callback) => {
+      if (value) {
+        callback();
+      } else {
+        callback(new Error("请选择专业"));
+      }
+    };
+    return {
+      examform: {
+        userName: "",
+        userSex: "",
+        companyName: "",
+        // userIdCard: '',
+        // userPhone: '',
+        userMajors: [],
+        majorId: "",
+      },
+      rules: {
+        userName: [
+          {
+            required: true,
+            message: "请输入姓名",
+            trigger: ["blur", "change"],
+          },
+        ],
+        userSex: [
+          {
+            required: true,
+            message: "请选择性别",
+            trigger: ["blur", "change"],
+          },
+        ],
+        // companyName: [
+        //   {
+        //     required: true,
+        //     message: "请输入企业名称",
+        //     trigger: ["blur", "change"],
+        //   },
+        // ],
+        // userIdCard: [{ required: true, message: '请输入身份证号', trigger: ['blur', 'change']}],
+        majorId: [{ validator: validatorMajorId, trigger: ["change", "blur"] }],
+        userMajors: [
+          { validator: validatorMajor, trigger: ["blur", "change"] },
+        ],
+      },
+      checkboxList: [],
+      activityId: "", // 活动id
+      subLoading: true,
+      majorList: [], // 专业
+      subjectLists: [], // 科目
+      majorName: "",
+      startTime: "",
+      endTime: "",
+      sysTime: "", // 当前时间
+    };
+  },
+  onLoad(option) {
+    this.sysTime = +this.$method.timest();
+    // console.log('option--: ', option)
+    if (option.scene) {
+      let tid = decodeURIComponent(option.scene);
+      this.activityId = tid.split("=")[1];
+      // this.getActivity()
+    } else {
+      this.activityId = option.tid;
+      // this.getActivity()
+    }
+  },
+  onShow() {
+    console.log("activityId: ", this.activityId);
+    if (!uni.getStorageSync("user_account")) {
+      // 未登录
+      console.log("未登录");
+      uni.navigateTo({
+        url: "/pages4/login/login?isBack=true",
+      });
+      return;
+    } else {
+      // 已登录
+      console.log("已登录");
+      this.getActivity1();
+    }
+  },
+  // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+  onReady() {
+    this.$refs.uForm.setRules(this.rules);
+  },
+  methods: {
+    // 获取活动信息(专业和科目)
+    getActivity() {
+      this.$http({
+        url: `/apply/activity/detail/${this.activityId}`,
+        method: "get",
+      }).then((res) => {
+        if (res.data.code == 200) {
+          this.hadCheck();
+          let data = res.data.data || {};
+          const { majorList, subjectList, endTime, startTime } = data;
+          this.majorList = majorList || [];
+          this.startTime = startTime;
+          this.endTime = endTime;
+          if (subjectList) {
+            this.checkboxList = subjectList.map((item) => {
+              return {
+                name: "《" + item.subjectName + "》",
+                checked: false,
+                ...item,
+              };
+            });
+            console.log("checkboxList:", this.checkboxList);
+          }
         }
-        var validatorMajorId = (rule, value, callback) => {
-            if (value) {
-                callback()
-            } else {
-                callback(new Error("请选择专业"))
+      });
+    },
+    getActivity1() {
+      let token = uni.getStorageSync("token");
+      token &&
+        uni.request({
+          url: BASE_URL + `/apply/activity/detail/${this.activityId}`,
+          method: "get",
+          data: {},
+          header: {
+            AuthorizationToken: "WX " + token,
+            TenantId: tenantId,
+          },
+          success: (res) => {
+            if (res.data.code == 200) {
+              this.hadCheck();
+              let data = res.data.data || {};
+              const { majorList, subjectList, endTime, startTime } = data;
+              this.majorList = majorList || [];
+              this.startTime = startTime;
+              this.endTime = endTime;
+              if (subjectList) {
+                this.checkboxList = subjectList.map((item) => {
+                  return {
+                    name: "《" + item.subjectName + "》",
+                    checked: false,
+                    ...item,
+                  };
+                });
+                console.log("checkboxList:", this.checkboxList);
+              }
+            } else if (res.data.code == 401) {
+              uni.navigateTo({
+                url: "/pages4/login/login?isBack=true",
+              });
             }
-        }
-        return {
-            examform: {
-                userName: '',
-                userSex: '',
-                companyName: '',
-                // userIdCard: '',
-                // userPhone: '',
-                userMajors: [],
-                majorId: '',
-            },
-            rules: {
-                userName: [{ required: true, message: '请输入姓名', trigger: ['blur', 'change']}],
-                userSex: [{ required: true, message: '请选择性别', trigger: ['blur', 'change']}],
-                companyName: [{ required: true, message: '请输入企业名称', trigger: ['blur', 'change']}],
-                // userIdCard: [{ required: true, message: '请输入身份证号', trigger: ['blur', 'change']}],
-                majorId: [{ validator: validatorMajorId, trigger: ['change','blur']}],
-                userMajors: [{ validator: validatorMajor, trigger: ['blur', 'change']}],
-            },
-            checkboxList: [],
-            activityId: '', // 活动id
-            subLoading: true,
-            majorList: [], // 专业
-            subjectLists: [], // 科目
-            majorName: '',
-            startTime: '',
-            endTime: '',
-            sysTime: '', // 当前时间
-        }
+          },
+          fail: (err) => {
+            uni.showToast({
+              title: "请求接口失败",
+              icon: "none",
+            });
+          },
+        });
     },
-    onLoad(option) {
-        this.sysTime = +this.$method.timest()
-        // console.log('option--: ', option)
-        if (option.scene) {
-            let tid = decodeURIComponent(option.scene)
-            this.activityId = tid.split('=')[1]
-            // this.getActivity()
-        } else {
-            this.activityId = option.tid
-            // this.getActivity()
+    // 校验用户是否已报名
+    hadCheck() {
+      this.$http({
+        url: `/apply/activity/check/${this.activityId}`,
+        method: "get",
+      }).then((res) => {
+        if (res.data.data) {
+          // 已经报名
+          uni.navigateTo({
+            url:
+              "/pages5/mockExam/registrationSuccess?endTime=" +
+              this.endTime +
+              "&startTime=" +
+              this.startTime +
+              "&activityId=" +
+              this.activityId,
+          });
         }
+      });
     },
-    onShow() {
-        console.log('activityId: ', this.activityId)
-        if (!uni.getStorageSync('user_account')) { // 未登录
-            console.log('未登录')
-			uni.navigateTo({
-				url: '/pages4/login/login?isBack=true'
-			})
-			return
-		} else {
-            // 已登录
-            console.log('已登录')
-            this.getActivity()
-        }
+    checkboxGroupChange(e) {
+      this.examform.userMajors = e;
     },
-    // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
-	onReady() {
-		this.$refs.uForm.setRules(this.rules)
-	},
-    methods: {
-        // 获取活动信息(专业和科目)
-        getActivity() {
-            this.$http({
-                url: `/apply/activity/detail/${this.activityId}`,
-                method: 'get',
-            }).then((res) => {
-                if (res.data.code == 200) {
-                    this.hadCheck()
-                    let data = res.data.data || {}
-                    const { majorList, subjectList, endTime, startTime} = data
-                    this.majorList = majorList || []
-                    this.startTime = startTime
-                    this.endTime = endTime
-                    if (subjectList) {
-                        this.checkboxList = subjectList.map((item) => {
-                            return {
-                                name: '《' + item.subjectName + '》',
-                                checked: false,
-                                ...item
-                            }
-                        })
-                        console.log('checkboxList:', this.checkboxList)
-                    }
-                }
-            })
-        },
-        // 校验用户是否已报名
-        hadCheck() {
-            this.$http({
-                url: `/apply/activity/check/${this.activityId}`,
-                method: 'get',
-            }).then((res) => {
-                if (res.data.data) {
-                    // 已经报名
-                    uni.navigateTo({
-                        url: '/pages5/mockExam/registrationSuccess?endTime=' + this.endTime + '&startTime=' + this.startTime 
-                        + '&activityId=' + this.activityId
-                    })
-                }
-            })
-        },
-		checkboxGroupChange(e) {
-            this.examform.userMajors = e
-		},
-		radioGroupChange(e) {
-			console.log(e, this.examform.userSex);
-		},
-        majorChange(e) {
-            let index = e.detail.value
-            const { majorName, majorId, mockMajorId } = this.majorList[index]
-            this.majorName = majorName
-            this.examform.majorId = majorId
-            // console.log('1111majorId', this.examform.majorId)
-            this.subjectLists = this.checkboxList.filter(e => e.mockMajorId == mockMajorId)
-            this.examform.userMajors = []
-            this.subjectLists = this.subjectLists.map((item) => {
-                return {
-                    name: '《' + item.subjectName + '》',
-                    checked: false,
-                    ...item
-                }
+    radioGroupChange(e) {
+      console.log(e, this.examform.userSex);
+    },
+    majorChange(e) {
+      let index = e.detail.value;
+      const { majorName, majorId, mockMajorId } = this.majorList[index];
+      this.majorName = majorName;
+      this.examform.majorId = majorId;
+      // console.log('1111majorId', this.examform.majorId)
+      this.subjectLists = this.checkboxList.filter(
+        (e) => e.mockMajorId == mockMajorId
+      );
+      this.examform.userMajors = [];
+      this.subjectLists = this.subjectLists.map((item) => {
+        return {
+          name: "《" + item.subjectName + "》",
+          checked: false,
+          ...item,
+        };
+      });
+    },
+    submit() {
+      this.$refs.uForm.validate((valid) => {
+        if (valid) {
+          if (!this.subLoading) {
+            return;
+          }
+          this.subLoading = false;
+          const { userName, userSex, companyName, majorId, userMajors } =
+            this.examform;
+          let arrs = [];
+          userMajors.forEach((item, index) => {
+            let findItem = this.subjectLists.find((e) => e.subjectId == item);
+            if (findItem) {
+              arrs.push(findItem);
+            }
+          });
+          let mockSubjectIds = arrs.map((e) => e.subjectId).join(",");
+          let mockMajorSubjectIds = arrs
+            .map((e) => e.mockMajorSubjectId)
+            .join(",");
+          let params = {
+            activityId: this.activityId,
+            userName: userName,
+            userSex: userSex,
+            companyName: companyName,
+            mockMajorId: majorId,
+            mockSubjectIds: mockSubjectIds,
+            mockMajorSubjectIds: mockMajorSubjectIds,
+          };
+          // console.log('eret', params)
+          this.$http({
+            url: "/apply/activity/launch",
+            method: "post",
+            data: params,
+            // noToken: true,
+          })
+            .then((res) => {
+              this.subLoading = true;
+              if (res.data.code == 200) {
+                let data = res.data.data;
+                uni.navigateTo({
+                  url:
+                    "/pages5/mockExam/registrationSuccess?endTime=" +
+                    data.endTime +
+                    "&startTime=" +
+                    data.startTime +
+                    "&activityId=" +
+                    this.activityId,
+                });
+              }
             })
-        },
-        submit() {
-            this.$refs.uForm.validate(valid => {
-				if (valid) {
-                    if (!this.subLoading) {
-                        return
-                    }
-                    this.subLoading = false
-                    const { userName, userSex, companyName, majorId, userMajors} = this.examform
-                    let arrs = []
-                    userMajors.forEach((item, index) => {
-                        let findItem = this.subjectLists.find(e => e.subjectId == item)
-                        if (findItem) {
-                            arrs.push(findItem)
-                        }
-                    })
-                    let mockSubjectIds = arrs.map(e => e.subjectId).join(',')
-                    let mockMajorSubjectIds = arrs.map(e => e.mockMajorSubjectId).join(',')
-                    let params = {
-                        activityId: this.activityId,
-                        userName: userName,
-                        userSex: userSex,
-                        companyName: companyName,
-                        mockMajorId: majorId,
-                        mockSubjectIds: mockSubjectIds,
-                        mockMajorSubjectIds: mockMajorSubjectIds, 
-                    }
-                    // console.log('eret', params)
-                    this.$http({
-                        url: '/apply/activity/launch',
-                        method: 'post',
-                        data: params,
-                        // noToken: true,
-                    }).then((res) => {
-                        this.subLoading = true
-                        if (res.data.code == 200) {
-                            let data = res.data.data
-                            uni.navigateTo({
-                                url: '/pages5/mockExam/registrationSuccess?endTime=' + data.endTime + '&startTime=' + data.startTime 
-                                + '&activityId=' + this.activityId
-                            })
-                        }
-                    }).catch((err) => {
-                        this.subLoading = true
-                    })
-				} else {
-					console.log('验证失败');
-				}
-			})
-            
+            .catch((err) => {
+              this.subLoading = true;
+            });
+        } else {
+          console.log("验证失败");
         }
+      });
     },
-}
+  },
+};
 </script>
 
 <style>
 page {
-    background: linear-gradient(90deg, #EDF1FF 0%, #D9F0FF 100%);
+  background: linear-gradient(90deg, #edf1ff 0%, #d9f0ff 100%);
 }
 </style>
 <style lang="scss" scoped>
 .exam_apply {
+  width: 100%;
+  height: 100%;
+  .mock_bg {
     width: 100%;
-    height: 100%;
-    .mock_bg {
-        width: 100%;
-        height: 760rpx;
-        z-index: -999;
-        top: 0;
+    height: 760rpx;
+    z-index: -999;
+    top: 0;
+  }
+  .navbar {
+    background-color: #498afe;
+  }
+  .mains {
+    padding: 16rpx;
+    position: relative;
+    top: -270rpx;
+  }
+  .items {
+    padding: 40rpx 0rpx 40rpx 24rpx;
+    background-color: #fff;
+    border-radius: 16rpx;
+    margin-bottom: 16rpx;
+    .star_red {
+      color: #f84b39;
     }
-    .navbar {
-        background-color: #498AFE;
+    .number {
+      font-size: 32rpx;
+      font-weight: 800;
+      color: #222222;
+      margin: 0rpx 20rpx 0rpx 4rpx;
     }
-    .mains {
-        padding: 16rpx;
-        position: relative;
-        top: -270rpx;
+    .category {
+      font-size: 32rpx;
+      font-weight: 400;
+      color: #222222;
     }
-    .items {
-        padding: 40rpx 0rpx 40rpx 24rpx;
-        background-color: #fff;
-        border-radius: 16rpx;
-        margin-bottom: 16rpx;
-        .star_red {
-            color: #F84B39;
-        }
-        .number {
-            font-size: 32rpx;
-            font-weight: 800;
-            color: #222222;
-            margin: 0rpx 20rpx 0rpx 4rpx;
-        }
-        .category {
-            font-size: 32rpx;
-            font-weight: 400;
-            color: #222222;
-        }
-        .inputs {
-            width: 580rpx;
-            height: 88rpx;
-            background: #FFFFFF;
-            border-radius: 8rpx;
-            border: 2rpx solid #C2C2C2;
-            display: flex;
-            align-items: center;
-            padding-left: 24rpx;
-        }
-        .item_box {
-            height: 86rpx;
-            display: flex;
-            align-items: center;
-            .pick_con {
-                width: 500rpx;
-                height: 86rpx;
-                // font-size: 32rpx;
-            }
-            .text {
-                flex:1;
-                display: flex;
-                align-items: center;
-            }
-        }
-        .grays {
-            color: #999;
-            font-size: 28rpx;
-        }
+    .inputs {
+      width: 580rpx;
+      height: 88rpx;
+      background: #ffffff;
+      border-radius: 8rpx;
+      border: 2rpx solid #c2c2c2;
+      display: flex;
+      align-items: center;
+      padding-left: 24rpx;
     }
-    .btns {
-        width: 100%;
+    .item_box {
+      height: 86rpx;
+      display: flex;
+      align-items: center;
+      .pick_con {
+        width: 500rpx;
+        height: 86rpx;
+        // font-size: 32rpx;
+      }
+      .text {
+        flex: 1;
         display: flex;
         align-items: center;
-        justify-items: center;
+      }
     }
-    .submits {
-        width: 686rpx;
-        height: 96rpx;
-        line-height: 96rpx;
-        text-align: center;
-        background: #3F8DFD;
-        border-radius: 16rpx;
-        font-size: 32rpx;
-        font-weight: 500;
-        color: #FFFFFF;
+    .grays {
+      color: #999;
+      font-size: 28rpx;
     }
-    .disable {
-		background: #498AFE;
-		opacity: 0.5;
-	}
+  }
+  .btns {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-items: center;
+  }
+  .submits {
+    width: 686rpx;
+    height: 96rpx;
+    line-height: 96rpx;
+    text-align: center;
+    background: #3f8dfd;
+    border-radius: 16rpx;
+    font-size: 32rpx;
+    font-weight: 500;
+    color: #ffffff;
+  }
+  .disable {
+    background: #498afe;
+    opacity: 0.5;
+  }
 }
-</style>
+</style>

+ 1 - 1
pages5/mockExam/registrationSuccess.vue

@@ -26,7 +26,7 @@
                 </view>
             </view>
             <view class="time_down">
-                <view class="look_mock" @click="toLookMock()">立即查看模考</view>
+                <view class="look_mock" @click="toLookMock()">立即进入模考</view>
             </view>
         </view>
         <view class="mains">

+ 2 - 2
pages5/mockRecord/mock_record.vue

@@ -28,10 +28,10 @@
 					</view>
 				</view>
 				<view class="btns">
-					<view class="btn" v-if="record.status == 1" @click="doRepeat(record.examId, record.goodsId, record.moduleExamId, record.chapterExamId,index,record)">重做</view>
+					<!-- <view class="btn" v-if="record.status == 1" @click="doRepeat(record.examId, record.goodsId, record.moduleExamId, record.chapterExamId,index,record)">重做</view> -->
 					<view class="btn" @click="questionBankExplain(record)" v-if="record.status == 1">解析</view>
 					<view class="btn" @click="questionReport(record)" v-if="record.status == 1">报告</view>
-					<view class="btn continue" @click="moreRecord(record,index)" >更多记录</view>
+					<!-- <view class="btn continue" @click="moreRecord(record,index)" >更多记录</view> -->
 				</view>
 			</view>
 		</view>

BIN
static/icon_paper.png


BIN
static/icon_sheet.png


BIN
static/icon_star.png


BIN
static/icon_star_sel.png


+ 14 - 0
static/style/index.scss

@@ -14,3 +14,17 @@
   align-items: center;
   justify-content: center;
 }
+
+.line1 {
+  overflow: hidden; /*超出部分隐藏*/
+  white-space: nowrap; /*禁止换行*/
+  text-overflow: ellipsis; /*省略号*/
+}
+
+.line2 {
+  display: -webkit-box; /* 必须结合的属性 ,将对象作为弹性伸缩盒子模型显示 。*/
+  -webkit-box-orient: vertical; /* 必须结合的属性 ,设置或检索伸缩盒对象的子元素的排列方式 。*/
+  text-overflow: ellipsis; /* 可以用来多行文本的情况下,用省略号“…”隐藏超出范围的文本 。*/
+  -webkit-line-clamp: 2;
+  overflow: hidden;
+}

+ 0 - 1
store/index.js

@@ -121,7 +121,6 @@ const store = new Vuex.Store({
       state.allowLoading = isShowloading;
     },
     updatePlayNextId(state, str) {
-      console.log(str, "str");
       state.playNextId = str;
     },
     updateChapterOpen(state, boolean) {

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov