谢杰标 2 years ago
parent
commit
717d447572

+ 22 - 0
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
@@ -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);
       },

+ 0 - 23
pages/index/index.vue

@@ -407,9 +407,6 @@ export default {
     };
   },
   async onLoad(option) {
-    this.$method.checkLock().then((res) => {
-      console.log(7897897)
-    });
     // #ifdef H5
     uni.setNavigationBarTitle({
       title: this.config.companyName,
@@ -731,26 +728,6 @@ export default {
               url: "/pages2/wd/question_bank",
             });
           });
-          return;
-          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",
-                });
-              }
-            });
         }
       }
     },

+ 8 - 4
pages/learn/index.scss

@@ -124,8 +124,10 @@
       background: #f8f8f8;
       padding: 24rpx 24rpx 10rpx;
       margin-top: 24rpx;
-      view {
+      & > view {
         margin-bottom: 10rpx;
+      }
+      view {
         text {
           font-size: 24rpx;
           &:nth-of-type(1) {
@@ -173,7 +175,6 @@
       border-radius: 16rpx;
     }
     .class-warm {
-      padding: 20rpx 24rpx;
       display: flex;
       align-items: flex-start;
 
@@ -186,8 +187,6 @@
           color: #ff3b30;
           font-size: 22rpx;
           font-weight: 400;
-          // color: #969696;
-          margin-bottom: 8rpx;
         }
       }
     }
@@ -200,6 +199,11 @@
       // 	opacity: 0.6;
       // }
     }
+    .study_tips {
+      color: #eb5757;
+      font-size: 24rpx;
+      margin-top: 20rpx;
+    }
     .study_btns {
       width: 100%;
       margin-top: 40rpx;

+ 182 - 442
pages/learn/index.vue

@@ -158,7 +158,7 @@
                 <view class="learn_progress">
                   <view class="progress_up">
                     <view class="cou_titles line2"
-                      >{{ item.goodsName }}{{ item.goodsName }}</view
+                      >{{ item.goodsName }}</view
                     >
                     <view class="classHour">
                       <text
@@ -181,29 +181,13 @@
                 </view>
               </view>
             </view>
-            <view class="course_item_info">
+            <view class="course_item_info" v-if="item.goodsType !== 6">
               <view>
                 <text>学习状态:</text>
-                <text class="eb" v-if="item.stuAllNum + item.recordNum == 0"
-                  >未开始</text
-                >
-                <text
-                  class="eb"
-                  v-else-if="
-                    item.stuAllNum + item.recordNum > 0 &&
-                    item.stuAllNum + item.recordNum <
-                      item.secAllNum + item.examNum
-                  "
-                  >学习中</text
-                >
-                <text
-                  class="eb"
-                  v-else-if="
-                    item.stuAllNum + item.recordNum >=
-                    item.secAllNum + item.examNum
-                  "
-                  >已学完</text
-                >
+                <view
+                  style="display: inline-block; font-size: 24rpx"
+                  v-html="backLearStatusText(item)"
+                ></view>
               </view>
               <view>
                 <text>学习进度:</text>
@@ -226,11 +210,7 @@
               <view>
                 <text>班级状态:</text>
                 <text>
-                  <text v-if="item.classEndTime && item.classEndTime < sysTime"
-                    >已过期</text
-                  >
-                  <text v-else-if="item.classStatus == 1">开班中</text>
-                  <text v-else>未开班</text>
+                  {{ classStatusCompt(item) }}
                 </text>
               </view>
               <view>
@@ -239,411 +219,136 @@
                   <text>
                     {{ $method.formDate(item.classEndTime, "yyyy/mm/dd") }}
                   </text>
-                  <text class="eb">(剩余10天)</text>
+                  <text class="eb"
+                    >(剩余{{
+                      $method.GetRTime(item.classEndTime) > 0
+                        ? $method.GetRTime(item.classEndTime)
+                        : 0
+                    }}天)</text
+                  >
                 </template>
                 <text v-else>——</text>
               </view>
-            </view>
-
-            <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"
+                class="class-warm"
+                v-if="item.subscribeId != null && item.periodStatus == 1"
               >
-                <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"
-                          >班级状态:已过期
-                          <template v-if="eduPhone">
-                            <text>,有疑问请联系</text>
-                            <text @click="call()">{{ eduPhone }}</text>
-                          </template>
-                        </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
-                            )
-                          }}
-                          -
-                          {{
+                <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.classEndTime,
-                              true,
+                              item.subApplySiteExamTime,
                               true
-                            )
-                          }}</view
-                        >
-                        <view class="date"
-                          >班级状态:未到学习时间
-
-                          <template v-if="eduPhone">
-                            <text>,有疑问请联系</text>
-                            <text @click="call()">{{ eduPhone }}</text>
-                          </template>
-                        </view>
-                      </view>
-                    </view>
-                  </template>
-
-                  <!-- 在班级有效期之间或者没有班级有效期 -->
-                  <template v-else>
-                    <view
-                      class="class-warm"
-                      v-if="
-                        item.gradeId != 0 &&
-                        item.gradeStatus == 1 &&
-                        item.classStatus != null
+                            ) +
+                              ' ' +
+                              item.subApplySiteStartTime
+                          )
                       "
                     >
-                      <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>
+                      待考试,考试时间:
+                      {{
+                        $method.timestampToTime(
+                          item.subApplySiteExamTime,
+                          true
+                        ) +
+                        " " +
+                        item.subApplySiteStartTime
+                      }}
+                      -
+                      {{
+                        $method.timestampToTime(
+                          item.subApplySiteExamTime,
+                          true
+                        ) +
+                        " " +
+                        item.subApplySiteEndTime
+                      }}
                     </view>
-                    <!-- 学时审核状态不可审核 -->
-                    <template
-                      v-if="item.periodStatus == -1 || item.periodStatus == 2"
+                    <view v-else-if="item.subExamStatus === 0"
+                      >待出考试结果</view
                     >
-                      <view
-                        class="class-warm"
-                        v-if="
-                          item.classStatus == 1 || item.classStatus === null
-                        "
+                    <view v-else-if="item.subExamStatus === 1">
+                      <text v-if="item.subResult === null">待出考试结果</text>
+                      <text v-if="item.subResult === 0"
+                        >考试结果:不通过,需补考</text
                       >
-                        <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
-                        "
+                      <text v-else-if="item.subResult === 1"
+                        >考试结果:通过,考试成绩为{{
+                          item.subPerformance
+                        }}</text
                       >
-                        <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)"
-            >
-              <view class="lefts">
-                <image
-                  class="lefet_img"
-                  :src="$method.splitImgHost(item.coverUrl, true)"
-                  mode=""
-                ></image>
-                <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="progress_up">
-                    <!-- 学习进度 (已做试卷+已做节)/(试卷数+节数) -->
-                    <view class="classHour">
-                      <text
-                        >{{
-                          item.courseNum || item.courseNum == 0
-                            ? item.courseNum
-                            : "-"
-                        }}课程/</text
-                      >
-                      <text
-                        >{{
-                          item.classHours || item.classHours == 0
-                            ? item.classHours
-                            : "-"
-                        }}学时/</text
-                      >
-                      <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 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="
+                  $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
@@ -928,6 +633,69 @@ export default {
     eduPhone() {
       return this.userInfo.eduPhone;
     },
+    backLearStatusText() {
+      return ({
+        periodStatus,
+        stuAllNum,
+        recordNum,
+        secAllNum,
+        examNum,
+        periodPlush,
+      }) => {
+        let text = "";
+        let color = "";
+        switch (periodStatus) {
+          case -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];
+            break;
+          case 0:
+          case 2:
+          case 3:
+            text = ["审核不通过", "", "待审核", "初审完成"][periodStatus];
+            color = ["#EB5757", "", "#F67205", "#F67205"][periodStatus];
+          case 1:
+            text = periodPlush > 0 ? "学时已上报信息中心" : "学时审核通过";
+            color = "#F67205";
+          default:
+            break;
+        }
+        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的时间戳
@@ -1022,7 +790,6 @@ export default {
           const [{ data: res1 }, { data: res2 }] = res;
           if (res1.code == 200) {
             this.total = res1.total;
-            // res1.rows[0].goodsType = 6
             this.courseLists = res1.rows || [];
           }
           // if (res2.code == 200) {
@@ -1300,33 +1067,6 @@ export default {
           }
         });
       });
-      return;
-      this.$api
-        .lockLockStatus({
-          action: "jxjy",
-          uuid: this.$method.getUuid(),
-        })
-        .then((res) => {
-          if (res.data.code == 200) {
-            //有其他端在操作,不能学习
-            uni.showModal({
-              title: "提示",
-              content: "有其他端在操作,是否将该用户踢下线?",
-              success: (res) => {
-                if (res.confirm) {
-                  this.$api.offline().then((r) => {
-                    if (r.data.code === 200) {
-                      this.toDetail();
-                    }
-                  });
-                }
-              },
-            });
-          } else if (res.data.code == 500) {
-            //可以学习
-            this.toDetail();
-          }
-        });
     },
     toDetail() {
       this.$http({

+ 0 - 38
pages/questionBank/index.vue

@@ -219,44 +219,6 @@ export default {
           this.studyques(item, child);
         }
       });
-      return;
-      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);
-            }
-          }
-        });
     },
     // 进入练习
     studyques(item, child) {

+ 0 - 21
pages/wd/index.vue

@@ -200,27 +200,6 @@ export default {
           url: "/pages2/wd/question_bank",
         });
       });
-      return;
-      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",
-            });
-          }
-        });
     },
     getNums() {
       this.$api.getinfoAttached().then((res) => {

+ 0 - 51
pages2/learn/my_learn.vue

@@ -352,57 +352,6 @@ export default {
             }
           });
         });
-        return;
-        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.$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: "暂无可观看的视频课程",
-                    });
-                  }
-                }
-              });
-            }
-          });
-        // this.$navTo.togo(
-        //   `/pages2/wd/course?id=${v.goodsId}&gid=${v.gradeId}&orderGoodsId=${v.orderGoodsId}`
-        // );
       }
       if (int === 2) {
         var data = {

+ 1 - 79
pages2/wd/class.vue

@@ -906,7 +906,7 @@ export default {
       }
 
       // if (item.educationName == '继续教育') {
-      this.$method.checkLock("bank").then((res) => {
+      this.$method.checkLock("jxjy").then((res) => {
         //可以学习
         if (item.courseNum == 1) {
           this.$api
@@ -930,84 +930,6 @@ export default {
           `/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`
         );
       });
-      return;
-      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}`,
-                    });
-                    // }
-                  }
-                });
-              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}`);
-
-      // }
     },
     /**
      * @param {Object} goodsId 商品id

+ 0 - 99
pages2/wd/course.vue

@@ -168,39 +168,6 @@ export default {
                 orderGoodsId: this.orderGoodsId,
               });
             });
-            return;
-            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,
-                  });
-                }
-              });
-
-            // websocket.sendMsg("doCourse");
-            // } else {
-            //   this.$navTo.togo("/pages3/polyv/detail", {
-            //     id: item.courseId,
-            //     goodsId: this.goodsId,
-            //     orderGoodsId: this.orderGoodsId,
-            //   });
-            // }
           }
         });
       } else {
@@ -232,39 +199,6 @@ export default {
                     orderGoodsId: this.orderGoodsId,
                   });
                 });
-                return;
-                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,
-                      });
-                    }
-                  });
-
-                // websocket.sendMsg("doCourse");
-                // } else {
-                //   this.$navTo.togo("/pages3/polyv/detail", {
-                //     id: item.courseId,
-                //     goodsId: this.goodsId,
-                //     orderGoodsId: this.orderGoodsId,
-                //   });
-                // }
               }
             });
           } else {
@@ -295,39 +229,6 @@ export default {
                   orderGoodsId: this.orderGoodsId,
                 });
               });
-              return;
-              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,
-                    });
-                  }
-                });
-
-              // websocket.sendMsg("doCourse");
-              //        } else {
-              // 	this.$navTo.togo("/pages3/polyv/detail", {
-              // 	  id: item.courseId,
-              // 	  goodsId: this.goodsId,
-              // 	  orderGoodsId: this.orderGoodsId,
-              // 	});
-              // }
             }
           });
         }

+ 0 - 49
pages3/course/detail.vue

@@ -1188,55 +1188,6 @@ export default {
           }
         });
       });
-      return;
-      // /lock/lockStatus
-      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.$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: "暂无可观看的视频课程",
-                  });
-                }
-              }
-            });
-          }
-        });
     },
     toLive(item) {
       this.$api

+ 2 - 1
pages3/polyv/detail.vue

@@ -1004,6 +1004,7 @@ export default {
     console.log("onUnloadonUnloadonUnloadonUnload");
     this.originUnload();
     this.clears();
+    clearInterval(this.lockTimer);
   },
   onHide() {
     this.originUnload();
@@ -3609,7 +3610,7 @@ export default {
     //关闭相机
     closePhoto() {
       this.photoPopup = false;
-      self.enableAutoRotation = true;
+      this.enableAutoRotation = true;
     },
     /**
      * 进入全屏