Przeglądaj źródła

bugfix 七大员调整

谢杰标 2 lat temu
rodzic
commit
062fc347a6

+ 0 - 12
pages.json

@@ -903,18 +903,6 @@
             }
           }
         },
-        {
-          "path": "courseTopic/goodsTopic",
-          "style": {
-            "navigationBarTitleText": "选课中心",
-            "navigationBarBackgroundColor": "#0386FD",
-            "navigationStyle": "custom", // 隐藏系统导航栏
-            "app-plus": {
-              "titleNView": false, //禁用原生导航栏
-              "bounce": "none"
-            }
-          }
-        },
         {
           "path": "shopping/shoppingCart",
           "style": {

+ 6 - 6
pages/course/index.vue

@@ -523,12 +523,12 @@ export default {
     },
     active2(item) {
       // console.log('item', item)
-      if (item.topicId) {
-        uni.navigateTo({
-          url: "/pages4/courseTopic/goodsTopic?topicId=" + item.topicId,
-        });
-        return;
-      }
+      // if (item.topicId) {
+      //   uni.navigateTo({
+      //     url: "/pages4/courseTopic/goodsTopic?topicId=" + item.topicId,
+      //   });
+      //   return;
+      // }
 
       this.selObj.bId = item.id;
       this.show = false;

+ 5 - 4
pages/learn/index.vue

@@ -718,22 +718,23 @@ export default {
       };
     },
   },
-  onLoad() {
+  async onLoad(options) {
     uni.hideTabBar();
-    // 1668873600 ,2022.11.20的时间戳
     this.leftDays = 1668873600 - parseInt(curTime / 1000);
     this.sysTime = +this.$method.timest();
+    if (options.skipPort) {
+      await this.$method.skipLogin(options.skipPort);
+    }
     if (this.$method.isLogin()) {
       !this.userInfo && this.$api.refreshUserInfo();
     }
   },
-  async onShow() {
+  onShow() {
     uni.pageScrollTo({
       duration: 0,
       scrollTop: 0, // number number number!
     });
     this.getCourseLiveQues();
-    // await this.commonSystemTime()
   },
   onPullDownRefresh() {
     this.getCourseLiveQues();

+ 22 - 19
pages/questionBank/index.vue

@@ -139,15 +139,18 @@ export default {
       },
       total: 0,
       options: {},
-      isGetOtherQuetion: true,
+      isGetOtherQuetion: false,
     };
   },
   computed: {
     ...mapGetters(["userInfo", "config"]),
   },
-  onLoad(options) {
+  async onLoad(options) {
     uni.hideTabBar();
     this.options = options;
+    if (this.options.skipPort) {
+      await this.$method.skipLogin(this.options.skipPort);
+    }
     if (this.options.isAct && !this.$method.isLogin()) {
       uni.navigateTo({
         url: "/pages4/login/login?isBack=" + true + "&isAct=1",
@@ -156,12 +159,11 @@ export default {
     }
   },
   async onShow() {
-    if (this.options.skipPort) {
-      await this.$method.skipLogin(this.options.skipPort);
-    }
-    // this.getIsHaveOtherQuetion();
     this.param.pageNum = 1;
     this.questionLists = [];
+    this.isGetOtherQuetion = this.options.sign
+      ? true
+      : await this.getIsHaveOtherQuetion();
     this.getBankList();
   },
   onPullDownRefresh() {
@@ -189,7 +191,6 @@ export default {
         .then((res) => {
           if (res.data.code == 200) {
             this.questionLists.push(...(res.data.rows || []));
-            console.log("this.courseList", this.questionLists);
             this.total = res.data.total;
           }
           this.allLoading = false;
@@ -253,19 +254,21 @@ export default {
     },
     // 是否含有山东题库
     async getIsHaveOtherQuetion() {
-      let res = await this.$api.getIsHaveOtherQuetion();
-      if (res.data.data == 1) {
-        uni.showModal({
-          title: "提示",
-          content: "是否学习山东题库?",
-          success: (res) => {
-            this.isGetOtherQuetion = res.confirm;
-            if (res.confirm) {
-              this.getBankList();
-            }
-          },
+      return new Promise((resolve, reject) => {
+        this.$api.getIsHaveOtherQuetion().then((res) => {
+          if (res.data.data == 1) {
+            uni.showModal({
+              title: "提示",
+              content: "是否学习山东题库?",
+              success: (res) => {
+                resolve(res.confirm);
+              },
+            });
+          } else {
+            resolve(false);
+          }
         });
-      }
+      });
     },
     toSdLearn(item) {
       this.$api.getOtherExamId({ relId: item.qsId }).then((res) => {

+ 5 - 2
pages2/bank/questionBank.vue

@@ -921,7 +921,7 @@
 </template>
 
 <script>
-import { goodsExamIsCanLearn } from "@/utils/authority";
+import { goodsExamIsCanLearn, examClientCanLearn } from "@/utils/authority";
 export default {
   data() {
     return {
@@ -1062,7 +1062,10 @@ export default {
     bankExam() {
       return new Promise((resolve, reject) => {
         this.$api.bankExam(this.id).then((res) => {
-          const { doType } = res.data.data;
+          const { doType, examLimitClient } = res.data.data;
+          if (!examClientCanLearn(examLimitClient)) {
+            return;
+          }
           if (this.entryType == "daily") {
             // 每日一练类型都是为练习
             this.bankType = 1;

+ 4 - 1
pages2/bank/question_report.vue

@@ -221,7 +221,7 @@
 
 <script>
 import { mapGetters } from "vuex";
-import { goodsExamIsCanLearn } from "@/utils/authority";
+import { goodsExamIsCanLearn, examClientCanLearn } from "@/utils/authority";
 export default {
   data() {
     return {
@@ -531,6 +531,9 @@ export default {
       return new Promise((resolve, reject) => {
         this.$api.bankExam(this.examId).then((res) => {
           this.examData = res.data.data;
+          if (!examClientCanLearn(res.data.data.examLimitClient)) {
+            return;
+          }
           resolve();
         });
       });

+ 5 - 5
pages2/class/questionBank.vue

@@ -894,7 +894,7 @@
 <script>
 import PopupPhoto from "@/components/popup/index.vue";
 import BankBom from "../../components/common/BankBom.vue";
-import { goodsExamIsCanLearn } from "@/utils/authority";
+import { goodsExamIsCanLearn, examClientCanLearn } from "@/utils/authority";
 export default {
   components: {
     PopupPhoto,
@@ -1149,10 +1149,10 @@ export default {
           });
           return;
         }
-        
+
         self.ossAvatarUrl = "";
         self.isTakePhoto = true;
-        if(this.isReach){
+        if (this.isReach) {
           return this.submit();
         }
         //拍照
@@ -1523,7 +1523,7 @@ export default {
     bankExam() {
       return this.$api.bankExam(this.id).then((res) => {
         const { examLimitClient, doType } = res.data.data;
-        if (!this.$method.examClientCanLearn(examLimitClient)) {
+        if (!examClientCanLearn(examLimitClient)) {
           return;
         }
         this.bankType = doType;
@@ -2270,7 +2270,7 @@ export default {
         })
         .then((res) => {
           this.isSubmit = true;
-          this.isReach = false
+          this.isReach = false;
           if (res.data.code == 200) {
             uni.showToast({
               title: "交卷成功",

+ 103 - 42
pages2/order/confirm_list.vue

@@ -6,7 +6,10 @@
       <view v-for="(item, index) in goodsList" :key="item.id">
         <view class="item">
           <view style="display: flex; justify-content: space-between">
-            <image :src="$method.splitImgHost(item.coverUrl)" style="height: 120rpx; width: 204rpx; border-radius: 16rpx">
+            <image
+              :src="$method.splitImgHost(item.coverUrl)"
+              style="height: 120rpx; width: 204rpx; border-radius: 16rpx"
+            >
             </image>
             <view class="right_con" style="margin-left: 20rpx">
               <view style="color: #333333; font-size: 30rpx; font-weight: bold">
@@ -14,38 +17,66 @@
                 <text v-if="item.sevenYear"> ({{ item.sevenYear }}) </text>
               </view>
               <view class="priceTag"> ¥ {{ item.standPrice }} </view>
-              <view class="input_c" v-if="item.templateType != null && item.goodsType == 1">
-                <view v-if="item.templateType == 'class'" style="
+              <view
+                class="input_c"
+                v-if="item.templateType != null && item.goodsType == 1"
+              >
+                <view
+                  v-if="item.templateType == 'class'"
+                  style="
                     display: flex;
                     justify-content: space-between;
                     align-items: center;
                     height: 56rpx;
                     padding: 8rpx;
                     border-radius: 8rpx;
-                  " @click="openPopup(0, item)">
+                  "
+                  @click="openPopup(0, item)"
+                >
                   <view style="color: #666666; font-size: 24rpx">{{
                     item.gradObj ? item.gradObj.className : "选择班级"
                   }}</view>
-                  <view><u-icon name="arrow-down" color="#999999" size="28"></u-icon></view>
+                  <view
+                    ><u-icon
+                      name="arrow-down"
+                      color="#999999"
+                      size="28"
+                    ></u-icon
+                  ></view>
                 </view>
-                <view v-if="item.templateType == 'apply'" style="
+                <view
+                  v-if="item.templateType == 'apply'"
+                  style="
                     display: flex;
                     justify-content: space-between;
                     align-items: center;
                     height: 56rpx;
                     padding: 8rpx;
                     border-radius: 8rpx;
-                  " @click="openPopup(1, item)">
-                  <view style="color: #666666; font-size: 24rpx">{{
-                    !applyAreas.areaName
-                    ? "报考地区"
-                    : examDate.examineName +
-                    "-" +
-                    applyAreas.areaName +
-                    "-" +
-                    applyAreas.cityName
-                  }}</view>
-                  <view><u-icon name="arrow-down" color="#999999" size="28"></u-icon></view>
+                  "
+                  @click="openPopup(1, item)"
+                >
+                  <view
+                    v-if="item.applyAreas"
+                    style="color: #666666; font-size: 24rpx"
+                    >{{
+                      item.examDate.examineName +
+                      "-" +
+                      item.applyAreas.areaName +
+                      "-" +
+                      item.applyAreas.cityName
+                    }}</view
+                  >
+                  <view v-else style="color: #666666; font-size: 24rpx">
+                    报考地区
+                  </view>
+                  <view
+                    ><u-icon
+                      name="arrow-down"
+                      color="#999999"
+                      size="28"
+                    ></u-icon
+                  ></view>
                 </view>
               </view>
             </view>
@@ -62,23 +93,40 @@
       </view>
 
       <view style="display: flex; color: #ffffff; align-items: center">
-        <view class="btn2" :class="{ able: isAble() }" @click="goBuy()">确认购买</view>
+        <view class="btn2" :class="{ able: isAble() }" @click="goBuy()"
+          >确认购买</view
+        >
       </view>
     </view>
     <u-popup v-model="show1" mode="bottom" border-radius="40">
       <view class="popup_box">
         <view class="check_head">
           <view class="grade">选择考期/地区</view>
-          <u-icon name="close" color="#CFCFCF" size="30" @click="closePop(1)"></u-icon>
+          <u-icon
+            name="close"
+            color="#CFCFCF"
+            size="30"
+            @click="closePop(1)"
+          ></u-icon>
         </view>
 
         <view style="display: flex; height: 550rpx">
           <view style="width: 50%">
             <view class="topTxt">考期</view>
             <view>
-              <picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChangeE" class="picker-view">
+              <picker-view
+                :indicator-style="indicatorStyle"
+                :value="value"
+                @change="bindChangeE"
+                class="picker-view"
+              >
                 <picker-view-column>
-                  <view class="picker-item" v-for="(item, index) in examine" :key="index">{{ item.examineName }}</view>
+                  <view
+                    class="picker-item"
+                    v-for="(item, index) in examine"
+                    :key="index"
+                    >{{ item.examineName }}</view
+                  >
                 </picker-view-column>
               </picker-view>
             </view>
@@ -86,12 +134,27 @@
           <view style="width: 50%">
             <view class="topTxt">地区</view>
             <view>
-              <picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
+              <picker-view
+                :indicator-style="indicatorStyle"
+                :value="value"
+                @change="bindChange"
+                class="picker-view"
+              >
                 <picker-view-column>
-                  <view class="picker-item" v-for="(item, index) in provinceList" :key="index">{{ item.areaName }}</view>
+                  <view
+                    class="picker-item"
+                    v-for="(item, index) in provinceList"
+                    :key="index"
+                    >{{ item.areaName }}</view
+                  >
                 </picker-view-column>
                 <picker-view-column>
-                  <view class="picker-item" v-for="(item, index) in cityList" :key="index">{{ item.areaName }}</view>
+                  <view
+                    class="picker-item"
+                    v-for="(item, index) in cityList"
+                    :key="index"
+                    >{{ item.areaName }}</view
+                  >
                 </picker-view-column>
               </picker-view>
             </view>
@@ -142,7 +205,7 @@ export default {
       activeItem: {},
     };
   },
-  onPullDownRefresh() { },
+  onPullDownRefresh() {},
   async onLoad(option) {
     this.id = option.id;
     this.isBK = option.isBK;
@@ -164,7 +227,7 @@ export default {
       }
     });
   },
-  onShow() { },
+  onShow() {},
   methods: {
     getExamine(id) {
       let self = this;
@@ -215,10 +278,9 @@ export default {
       };
       this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas);
       this.applyObj.examDateJson = JSON.stringify(this.examDate);
-      this.detail.examDate = this.examDate;
-      this.detail.applyAreas = this.applyAreas;
+      this.activeItem.examDate = this.examDate;
+      this.activeItem.applyAreas = this.applyAreas;
       this.show1 = false;
-
     },
 
     checkAreaData() {
@@ -261,7 +323,7 @@ export default {
         });
         return false;
       }
-      return this.goodsList.some(item => {
+      return this.goodsList.some((item) => {
         if (item.templateType == "class" && item.goodsType == 1) {
           if (!item.gradObj.className) {
             uni.showModal({
@@ -282,9 +344,8 @@ export default {
           // 	return false;
           // }
         }
-        return true
-      })
-
+        return true;
+      });
     },
     radioGroupChange(e) {
       console.log(e);
@@ -320,7 +381,7 @@ export default {
     },
     goBuy() {
       if (!this.checkData()) {
-        return
+        return;
       }
       this.$store.commit("setShoppingCartList", {
         shoppingCartList: this.goodsList,
@@ -377,24 +438,24 @@ export default {
     },
     bindChange(e) {
       const val = e.detail.value;
-      if (this.pAreaIndex != e.detail.value[0]) {
-        this.pAreaIndex = e.detail.value[0];
+      if (this.pAreaIndex != val[0]) {
+        this.pAreaIndex = val[0];
         this.getCityList(this.provinceList[this.pAreaIndex].areaId);
       }
-      if (this.cAreaIndex != e.detail.value[1]) {
-        this.cAreaIndex = e.detail.value[1];
+      if (this.cAreaIndex != val[1]) {
+        this.cAreaIndex = val[1];
       }
     },
     openPopup(index, item) {
       this.activeItem = item || {};
       if (index == 0) {
-        // this.show = true;
+
         this.$refs["grade"].open(
           this.gradeListObj[item.goodsId],
           item.gradObj.gradeId
         );
       } else {
-        this.getExamine(item.projectId)
+        this.getExamine(100);
         this.getProvinceList();
         this.show1 = true;
       }
@@ -407,7 +468,7 @@ export default {
       }
     },
   },
-  onReachBottom() { },
+  onReachBottom() {},
   computed: {
     ...mapGetters(["userInfo", "shoppingCartList"]),
     disCode() {
@@ -594,7 +655,7 @@ page {
   box-sizing: unset;
   box-shadow: 0px -2px 6px 0px rgba(0, 0, 0, 0.1);
 
-  >view {
+  > view {
     margin: 0 30rpx;
   }
 

+ 1 - 4
pages3/course/detail.vue

@@ -1315,10 +1315,7 @@ export default {
           } else {
             let data = [];
             goodsIds.forEach((id) => {
-              data.push({
-                ...this.specAttrPriceList.find((e) => e.goodsId == id),
-                templateType: "class",
-              });
+              data.push(this.specAttrPriceList.find((e) => e.goodsId == id));
             });
             this.$store.commit("setShoppingCartList", {
               shoppingCartList: data,

+ 0 - 504
pages4/courseTopic/goodsTopic.vue

@@ -1,504 +0,0 @@
-<template>
-    <view class="goods_topic">
-        <nav-bar title="选课中心"></nav-bar>
-        <view class="banner_header">
-            <image class="ban_img" src="../static/topic/banner_bg.png"></image>
-            <view class="selects" @click="back()">
-                <view class="titles">
-                    考前培训:二级建造师
-                </view>
-                <view class="icons">
-                    <u-icon name="arrow-right" color="#3E4055" size="26"></u-icon>
-                </view>
-            </view>
-            <view class="imgs">
-                <image class="banner" src="../static/topic/banner.png"></image>
-            </view>
-        </view>
-        <view class="mains">
-            <view class="titles">
-                <image class="code" src="@/static/learn/act_icon.png" ></image>
-                <text class="title">免费试听</text>
-            </view>
-            <view class="pictures" @click="toDetail()">
-                <view class="pic_imgs">
-                    <image v-if="goodsInfo.goodsCoverUrl" :src="$method.splitImgHost(goodsInfo.goodsCoverUrl)" class="basic_img"></image>
-                    <image v-else class="basic_img" src="../static/topic/basic.png" ></image>
-                </view>
-                <view class="pic_title">{{ goodsInfo.goodsName }}</view>
-            </view>
-            <view class="titles">
-                <image class="code" src="@/static/learn/act_icon.png" ></image>
-                <text class="title">推荐课程</text>
-            </view>
-            <view class="courses">
-                <view v-for="(item, index) in  courseName" :key="index" class="cou_items"
-                 :class="{nactive: courseNum == index}" @click="tochangeCourse(item, index)">{{ item.name }}</view>
-            </view>
-            <view class="lines"></view>
-            <view class="course_list">
-                <view class="clist_item">
-                    <image v-if="courseNum == 0" class="type_img" src="../static/topic/type1_one.jpg" ></image>
-                    <image v-if="courseNum == 1" class="type_img" src="../static/topic/type2_one.png" ></image>
-                    <image v-if="courseNum == 2" class="type_img" src="../static/topic/type3_one.png" ></image>
-                    <view class="type_right">
-                        <view class="type_title">全科</view>
-                        <view class="type_down">
-                            <view class="prices">{{ ['¥980', '¥1280', '¥1980'][courseNum]}}</view>
-                            <view v-if="!hideBuyState" class="tobuy" @click="togoBuy(1)">立即购买</view>
-                        </view>
-                    </view>
-                </view>
-                <view class="clist_item">
-                    <image v-if="courseNum == 0" class="type_img" src="../static/topic/type1_two.jpg" ></image>
-                    <image v-if="courseNum == 1" class="type_img" src="../static/topic/type2_two.png" ></image>
-                    <image v-if="courseNum == 2" class="type_img" src="../static/topic/type3_two.png" ></image>
-                    <view class="type_right">
-                        <view class="type_title">公共单科</view>
-                        <view class="type_down">
-                            <view class="prices">{{ ['¥350', '¥450', '¥700'][courseNum]}}</view>
-                            <view v-if="!hideBuyState" class="tobuy" @click="togoBuy(2)">立即购买</view>
-                        </view>
-                    </view>
-                </view>
-                <view class="clist_item">
-                    <image v-if="courseNum == 0" class="type_img" src="../static/topic/type1_three.jpg" ></image>
-                    <image v-if="courseNum == 1" class="type_img" src="../static/topic/type2_three.png" ></image>
-                    <image v-if="courseNum == 2" class="type_img" src="../static/topic/type3_three.png" ></image>
-                    <view class="type_right">
-                        <view class="type_title">实务单科</view>
-                        <view class="type_down">
-                            <view class="prices">{{ ['¥500', '¥700', '¥900'][courseNum]}}</view>
-                            <view v-if="!hideBuyState" class="tobuy" @click="togoBuy(3)">立即购买</view>
-                        </view>
-                    </view>
-                </view>
-            </view>
-
-            <view class="titles">
-                <image class="code" src="@/static/learn/act_icon.png" ></image>
-                <text class="title">详情</text>
-            </view>
-            <view class="details">
-                <image v-if="courseNum == 0" class="detail_img" src="../static/topic/type1_detail.png" ></image>
-                <image v-if="courseNum == 1" class="detail_img" src="../static/topic/type2_detail.png" ></image>
-                <image v-if="courseNum == 2" class="detail_img" src="../static/topic/type3_detail.png" ></image>
-            </view>
-        </view>
-
-        <!-- 弹窗 -->
-        <u-popup v-model="toggleCourseShow" mode="bottom" border-radius="40">
-			<view class="popup_box">
-                <view class="check_head">
-                    <view class="headers">
-                    <view class="grade">选择课程</view>
-                        <u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
-                    </view>
-                </view>
-                <view class="pop_prices">
-                    <text v-if="skuItem.standPrice || skuItem.standPrice == 0" class="price">¥ {{ skuItem.standPrice || 0 }}</text>
-                    <text v-if="skuItem.linePrice" class="lin_price">¥ {{ skuItem.linePrice }}</text>
-                </view>
-                <view class="check_con">
-                    <scroll-view scroll-y="true" style="height: 550rpx;">
-                        <view class="course_items" v-for="(item, index) in courseSku" :key="index" :class="{nactive: skuIndex == index}" @click="selectSku(item, index)">
-                            {{ item.goodsName }}
-                        </view>
-                    </scroll-view>
-                </view>
-                <view v-if="!hideBuyState" class="right_now" @click="rightNowBuy()">立即购买</view>
-			</view>
-		</u-popup>
-    </view>
-</template>
-
-<script>
-import { mapGetters  } from 'vuex'
-export default {
-    name: 'goodsTopic',
-    data() {
-        return {
-            courseName: [
-                {
-                    name: '黄金基础班',
-                    type: 1
-                },
-                {
-                    name: '钻石强化班',
-                    type: 2
-                },
-                {
-                    name: '至尊私塾班',
-                    type: 3
-                }
-            ],
-            courseNum: 0,
-            topicId: '',
-            goodsInfo: {},
-            toggleCourseShow: false,
-            courseSku: [],
-            skuItem: {},
-            skuIndex: -1,
-        }
-    },
-    computed: { ...mapGetters(['hideBuyState']) },
-    onLoad(option) {
-        if (option.scene) {
-            let tid = decodeURIComponent(option.scene)
-            this.topicId = tid.split('=')[1]
-            
-        } else {
-            this.topicId = option.topicId
-        }
-        console.log('topicId: ', this.topicId)
-        this.getgoodsInfo()
-    },
-    methods: {
-        getgoodsInfo() {
-            this.$http({
-                url: `/app/common/get/goodsInfo/${this.topicId}`,
-                method: 'get',
-                noToken: true
-            }).then((res) => {
-                if (res.data.code == 200) {
-                    this.goodsInfo = res.data.data
-                }
-            })
-        },
-        tochangeCourse(item, index) {
-            console.log(item, index)
-            this.courseNum = index
-        },
-        back() {
-            uni.navigateBack()
-        },
-        toDetail() {
-            if (this.goodsInfo.goodsType == 2) {
-                uni.navigateTo({
-                    url: '/pages2/bank/detail?id='+this.goodsInfo.goodsId
-                })
-            } else {
-                // /pages5/liveDetail/index
-                uni.navigateTo({
-                    url: '/pages3/course/detail?id='+ this.goodsInfo.goodsId + '&goodsType=' + this.goodsInfo.goodsType
-                })
-            }
-        },
-        closePop() {
-            this.toggleCourseShow = false
-        },
-        togoBuy(subjectType) {
-            this.skuItem = {}
-            this.skuIndex = -1
-            this.$http({
-                url: '/app/common/get/goodsList',
-                method: 'get',
-                noToken: true,
-                data: {
-                    subjectType: subjectType,
-                    topicId: this.topicId,
-                    type: this.courseNum + 1
-                }
-            }).then((res) => {
-                if (res.data.code == 200) {
-                    this.toggleCourseShow = true
-                    this.courseSku = res.data.data || []
-                } else {
-                    this.$u.toast(res.data.msg)
-                }
-            })
-        },
-        selectSku(item, index) {
-            console.log('defhd', item, index)
-            this.skuItem = item
-            this.skuIndex = index
-        },
-        rightNowBuy() {
-            if (Object.keys(this.skuItem).length == 0) {
-                this.$u.toast('请选择科目')
-                return
-            }
-            if(this.$method.isGoLogin()){
-				return
-			}
-			this.$navTo.togo('/pages2/order/confirm_list?id='+this.skuItem.goodsId)
-        }
-    }
-}
-</script>
-
-
-<style lang="scss" scoped>
-@mixin dis_center {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-}
-@mixin dis_around {
-    display: flex;
-    align-items: center;
-    justify-content: space-around;
-}
-.goods_topic {
-    width: 100%;
-    height: 100%;
-    background: linear-gradient(180deg, #f1f4f9 0%, #DFECFD 100%);
-    .banner_header {
-        height: 378rpx;
-        position: relative;
-        top: 0rpx;
-        left: 0rpx;
-        .ban_img {
-            width: 100%;
-            height: 378rpx;
-            position: absolute;
-            top: 0rpx;
-            left: 0rpx;
-            z-index: 99;
-        }
-        .selects {
-            margin: 32rpx 0rpx 0rpx 40rpx;
-            width: 370rpx;
-            height: 64rpx;
-            background: rgba(255,255,255,0.6);
-            border-radius: 160rpx;
-            // opacity: 0.6;
-            @include dis_around();
-            position: absolute;
-            top: 0rpx;
-            left: 0rpx;
-            z-index: 100;
-            .icons {
-                width: 36rpx;
-                height: 36rpx;
-                background: #FFFFFF;
-                border-radius: 50%;
-                @include dis_center();
-            }
-        }
-        .imgs {
-            position: absolute;
-            bottom: 0rpx;
-            left: 0rpx;
-            z-index: 100;
-            margin-left: 40rpx;
-        }
-        .banner {
-            width: 670rpx;
-            height: 250rpx;
-            display: block;
-            border-radius: 20rpx;
-        }
-    }
-    
-    .mains {
-        padding: 0rpx 40rpx 40rpx 40rpx;
-        .titles {
-            margin: 72rpx 0rpx 0rpx 10rpx;
-            .code {
-                width: 38rpx;
-                height: 24rpx;
-            }
-            .title {
-                font-size: 40rpx;
-                font-family: OPPOSans-Bold, OPPOSans;
-                font-weight: bold;
-                color: #222222;
-                margin-left: 14rpx;
-            }
-        }
-        .pictures {
-            width: 100%;
-            height: 522rpx;
-            margin-top: 32rpx;
-            .pic_imgs {
-                width: 100%;
-                height: 374rpx;
-                border-radius: 24rpx 24rpx 0rpx 0rpx;
-                .basic_img {
-                    width: 100%;
-                    height: 374rpx;
-                    border-radius: 24rpx 24rpx 0rpx 0rpx;
-                }
-            }
-            .pic_title {
-                width: 100%;
-                height: 148rpx;
-                background: #FFFFFF;
-                border-radius: 0rpx 0rpx 24rpx 24rpx;
-                font-size: 32rpx;
-                font-family: OPPOSans-Bold, OPPOSans;
-                font-weight: bold;
-                color: #222222;
-                padding: 32rpx;
-            }
-        }
-        .courses {
-            margin-top: 44rpx;
-            display: flex;
-            align-items: center;
-            height: 78rpx;
-            .cou_items {
-                font-size: 28rpx;
-                color: #969696;
-                margin-right: 48rpx;
-                position: relative;
-                top: 0rpx;
-                left: 0rpx;
-                &:nth-child(1) {
-                    margin-left: 16rpx;
-                }
-                &.nactive {
-                    font-size: 32rpx;
-                    font-weight: bold;
-                    color: #498AFE;
-                    &::after {
-                        content: '';
-                        position: absolute;
-                        bottom: -18rpx;
-                        left: 60rpx;
-                        width: 32rpx;
-                        height: 8rpx;
-                        background: #498AFE;
-                        border-radius: 180rpx;
-                    }
-                }
-                
-            }
-        }
-        .lines {
-            width: 100%;
-            height: 2rpx;
-            background: #FFFFFF;
-        }
-        .course_list {
-            width: 100%;
-            padding: 40rpx 32rpx;
-            background: #fff;
-            border-radius: 14rpx;
-            margin-top: 40rpx;
-            .clist_item {
-                height: 120rpx;
-                margin-bottom: 48rpx;
-                display: flex;
-                &:last-child {
-                    margin-bottom: 0rpx;
-                }
-                .type_img {
-                    width: 212rpx;
-                    height: 120rpx;
-                    margin-right: 24rpx;
-                    border-radius: 18rpx;
-                }
-                .type_title {
-                    font-size: 32rpx;
-                    font-weight: 500;
-                    color: #222222;
-                }
-                .type_down {
-                    width: 370rpx;
-                    margin-top: 24rpx;
-                    @include dis_center();
-                    justify-content: space-between;
-                }
-                .prices {
-                    font-size: 36rpx;
-                    font-weight: 500;
-                    color: #F67205;
-                }
-                .tobuy {
-                    width: 144rpx;
-                    height: 52rpx;
-                    line-height: 52rpx;
-                    text-align: center;
-                    background: #FFB102;
-                    border-radius: 16rpx;
-                    font-size: 26rpx;
-                    font-weight: 500;
-                    color: #FFFFFF;
-                }
-            }
-        }
-
-        .details {
-            width: 100%;
-            height: 5035rpx;
-            margin-top: 32rpx;
-            .detail_img {
-                width: 100%;
-                height: 100%;
-                display: block;
-            }
-        }
-    }
-
-    // 弹窗
-.popup_box {
-    width: 100%;
-    height: 938rpx;
-    padding: 56rpx 56rpx 0rpx;
-    .pop_prices {
-        margin-top: 50rpx;
-        margin-bottom: 40rpx;
-        .types {
-            font-size: 32rpx;
-            font-weight: bold;
-            color: #222222;
-            margin-right: 24rpx;
-        }
-        .price {
-            font-size: 36rpx;
-            font-weight: 500;
-            color: #F67205;
-        }
-        .lin_price {
-            color: #999999;
-            font-size: 30rpx;
-            text-decoration:line-through;
-            margin-left: 10rpx;
-        }
-    }
-    .headers {
-      width: 100%;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      .grade {
-        font-size: 40rpx;
-        font-weight: bold;
-        color: #222222;
-      }
-    }
-    .course_items {
-        width: 100%;
-        height: 96rpx;
-        background: #F8F8F8;
-        border-radius: 24rpx;
-        padding: 30rpx 32rpx;
-        font-size: 28rpx;
-        color: #222222;
-        margin-bottom: 32rpx;
-        &.nactive {
-            background: #D5E4FF;
-            color: #3F8DFD;
-        }
-        &:last-child {
-            margin-bottom: 0rpx;
-        }
-    }
-    
-    .right_now {
-        width: 100%;
-        height: 92rpx;
-        line-height: 92rpx;
-        text-align: center;
-        background: #3F8DFD;
-        border-radius: 120rpx;
-        font-size: 32rpx;
-        font-weight: 500;
-        color: #FFFFFF;
-    }
-    
-  }
-}
-</style>

BIN
pages4/static/topic/banner.png


BIN
pages4/static/topic/banner_bg.png


BIN
pages4/static/topic/basic.png


BIN
pages4/static/topic/icon_play.png


BIN
pages4/static/topic/type1_detail.png


BIN
pages4/static/topic/type1_one.jpg


BIN
pages4/static/topic/type1_three.jpg


BIN
pages4/static/topic/type1_two.jpg


BIN
pages4/static/topic/type2_detail.png


BIN
pages4/static/topic/type2_one.png


BIN
pages4/static/topic/type2_three.png


BIN
pages4/static/topic/type2_two.png


BIN
pages4/static/topic/type3_detail.png


BIN
pages4/static/topic/type3_one.png


BIN
pages4/static/topic/type3_three.png


BIN
pages4/static/topic/type3_two.png


+ 4 - 1
pages5/examBank/index.vue

@@ -867,7 +867,7 @@
 <script>
 import { mapGetters, mapActions } from "vuex";
 import BankBom from "../../components/common/BankBom.vue";
-import { goodsExamIsCanLearn } from "@/utils/authority";
+import { goodsExamIsCanLearn, examClientCanLearn } from "@/utils/authority";
 export default {
   data() {
     return {
@@ -1010,6 +1010,9 @@ export default {
       return new Promise((resolve, reject) => {
         this.$api.bankExam(this.examId).then((res) => {
           const { examLimitClient, doType } = res.data.data;
+          if (!examClientCanLearn(examLimitClient)) {
+            return;
+          }
           this.bankType = doType;
           this.examData = res.data.data;
           if (this.bankType == 2) {

+ 4 - 0
pages5/examReport/index.vue

@@ -283,6 +283,7 @@
 </template>
 
 <script>
+import { examClientCanLearn } from "@/utils/authority";
 import { mapGetters, mapActions } from "vuex";
 export default {
   data() {
@@ -580,6 +581,9 @@ export default {
       return new Promise((resolve, reject) => {
         this.$api.bankExam(this.examId).then((res) => {
           this.examData = res.data.data;
+          if (!examClientCanLearn(res.data.data.examLimitClient)) {
+            return;
+          }
           resolve();
         });
       });

+ 4 - 3
utils/authority.js

@@ -80,7 +80,7 @@ export async function checkOpenidIsUser() {
   console.log("🚀 ~ file: authority.js:72 ~ checkOpenidIsUser ~ data:", data);
   return data;
 }
-export async function examClientCanLearn(examLimitClient) {
+export function examClientCanLearn(examLimitClient) {
   // 限制学习
   if (!examLimitClient) {
     return true;
@@ -98,11 +98,11 @@ export async function examClientCanLearn(examLimitClient) {
   modalComfirm(
     "请去" + (examLimitClient == 2 ? "微信小程序" : "公众号") + "学习"
   );
-  return false;
+  throw new Error("examLimitClient:" + examLimitClient);
 }
 
 export async function isCanDoExam(examLimitClient) {
-  if (!examClientCanLearn(examLimitClient)) {
+  if (!examLimitClient || !examClientCanLearn(examLimitClient)) {
     return false;
   }
   let isFlag = false;
@@ -112,6 +112,7 @@ export async function isCanDoExam(examLimitClient) {
   }
   if (!isFlag) {
     modalComfirm("该题库只允许同一用户学习");
+    throw new Error("isFlag:" + isFlag);
   }
   return isFlag;
 }

+ 1 - 1
utils/shared.js

@@ -33,7 +33,7 @@ export function modalComfirm(config = {}, t) {
     title = "提示",
     showCancel = false,
     content,
-    scb = uni.navigateBack(),
+    scb = uni.navigateBack,
     ecb,
   } = config;
   uni.showModal({