소스 검색

1.feat:新增二建继教功能提示弹窗,2.fix:根据二建提示需求,新增、修改学习列表提示

xiexaing 1 년 전
부모
커밋
033b11497a
4개의 변경된 파일744개의 추가작업 그리고 510개의 파일을 삭제
  1. 8 1
      src/apis/login.js
  2. 414 342
      src/components/login/index.vue
  3. 21 0
      src/pages/course-detail/index.vue
  4. 301 167
      src/pages/person-center/my-course/index.vue

+ 8 - 1
src/apis/login.js

@@ -187,5 +187,12 @@ export default {
       noToken: true
     })
   },
-
+  // 检查是否有二建班级10天过期
+  checkTenClassGradeUser(params) {
+    return request({
+      url: '/grade/grade/checkTenClassGradeUser',
+      method: 'get',
+      params: params
+    })
+  },
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 414 - 342
src/components/login/index.vue


+ 21 - 0
src/pages/course-detail/index.vue

@@ -28,6 +28,7 @@ import Header from "@/components/header/index";
 import FooterTab from "./components/footerTab";
 import coreContent from "./components/coreContent.vue";
 import { Loading } from "element-ui";
+import { mapGetters } from "vuex";
 export default {
   name: "CourseDetail",
   components: {
@@ -51,6 +52,9 @@ export default {
       goodsPhotographConfig: {} //拍照设置
     };
   },
+  computed: {
+    ...mapGetters(["userInfo"])
+  },
   created() {
     Loading.service().close();
   },
@@ -59,6 +63,7 @@ export default {
       ...this.$route.query,
       ...this.$route.params
     };
+    this.saveLoaclCheckClass()
     this.getInit();
   },
   methods: {
@@ -66,6 +71,22 @@ export default {
       await this.getGoodsData(); //获取商品详情
       await this.courseBusiness(); //获取培训项目详情
     },
+    // 进行学习后,保存标识,用于检查是否二建15天提示弹窗弹出
+    saveLoaclCheckClass() {
+      let ary = JSON.parse(localStorage.getItem("loaclCheckClass")) || []
+      let userFindIndex = ary.findIndex(i => i.userId == this.userInfo.userId)
+      if (userFindIndex !== -1) {
+        if (!ary[userFindIndex].orderGoodsIds.includes(this.routerData.orderGoodsId)) {
+          ary[userFindIndex].orderGoodsIds.push(this.routerData.orderGoodsId)
+        }
+      } else {
+        ary.push({
+          userId: this.userInfo.userId,
+          orderGoodsIds: [this.routerData.orderGoodsId]
+        })
+      }
+      localStorage.setItem("loaclCheckClass", JSON.stringify(ary))
+    },
     //获取培训项目详情
     courseBusiness() {
       return new Promise(resolve => {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 301 - 167
src/pages/person-center/my-course/index.vue


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.