Browse Source

Merge branch 'beta'

SanHQin 10 hours ago
parent
commit
6e80a9c80c

+ 1 - 1
dist/index.html

@@ -37,7 +37,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.cef1c8c2f4fcd38349761b007108402d.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.23ea04dc469b57e2b4f8.js></script><script type=text/javascript src=./static/js/vendor.714ff2bfc93f2f096b79.js></script><script type=text/javascript src=./static/js/app.2f907bbaefdfeb66ee4f.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.83d43d9a36ccef648272bce0c7e8f587.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.23ea04dc469b57e2b4f8.js></script><script type=text/javascript src=./static/js/vendor.714ff2bfc93f2f096b79.js></script><script type=text/javascript src=./static/js/app.ea59a979d8fefb9b183d.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.83d43d9a36ccef648272bce0c7e8f587.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.83d43d9a36ccef648272bce0c7e8f587.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.ea59a979d8fefb9b183d.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.ea59a979d8fefb9b183d.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.23ea04dc469b57e2b4f8.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage-manifest.2ece51fa34be51c8610a.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.3f8a68c1d978f7fcdc29.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.3f8a68c1d978f7fcdc29.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.8eddbd275bd20a8ea258.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.8eddbd275bd20a8ea258.js.map


+ 1 - 1
dist/workPage.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>工作页面 - CocoFlow</title><link rel=icon href=../static/logo.ico><link href=./static/css/workPage.eb039ffafd131baf9f7d229e1701a61b.css rel=stylesheet></head><body><noscript><strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script type=text/javascript src=./static/js/workPage-manifest.2ece51fa34be51c8610a.js></script><script type=text/javascript src=./static/js/workPage-vendor.3c2261c9f54c5ab3df69.js></script><script type=text/javascript src=./static/js/workPage.3f8a68c1d978f7fcdc29.js></script></body></html><script>function stopSafari() {
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>工作页面 - CocoFlow</title><link rel=icon href=../static/logo.ico><link href=./static/css/workPage.eb039ffafd131baf9f7d229e1701a61b.css rel=stylesheet></head><body><noscript><strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script type=text/javascript src=./static/js/workPage-manifest.2ece51fa34be51c8610a.js></script><script type=text/javascript src=./static/js/workPage-vendor.3c2261c9f54c5ab3df69.js></script><script type=text/javascript src=./static/js/workPage.8eddbd275bd20a8ea258.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

+ 54 - 6
src/components/pages/course.vue

@@ -440,6 +440,7 @@ import templateDialogE from "./aiEasy/templateDialog.vue";
 import { v4 as uuidv4 } from "uuid";
 import { myMixin } from "@/mixins/mixin.js"
 import backPage from "./liyuan/components/backPage.vue";
+import { result } from "lodash";
 
 export default {
   components: { EditorBar, CourseProblem,shareDialog,templateDialog,templateDialogE,backPage },
@@ -645,7 +646,7 @@ export default {
       // }
       // this.$router.push(path);
     },
-    goToCourse4(courseId) {
+    async goToCourse4(courseId) {
       if (courseId) {
         this.$router.push(
           "/newAddCourse?cid=" +
@@ -661,6 +662,11 @@ export default {
         );
         this.addOp3('1', "", { courseid: courseId ,type: "course_stageMode_edit" }, "success")
       } else {
+        let classResult = await this.checkClass()
+        if(classResult == 1){
+          this.$message.error(this.lang.ssCreateCourseLimit)
+          return
+        }
         this.$router.push(
           "/newAddCourse?userid=" +
           this.userid +
@@ -728,7 +734,7 @@ export default {
       }
       this.addOp3('1', "", {  type: "course_aiMode_createClick" }, "success")
     },
-    goToCourse5(courseId) {
+    async goToCourse5(courseId) {
       if (courseId) {
         this.$router.push(
           "/aiAddCourse?cid=" +
@@ -744,6 +750,11 @@ export default {
         );
         this.addOp3('1', "", { courseid: courseId ,type: "course_aiMode_edit" }, "success")
       } else {
+        let classResult = await this.checkClass()
+        if(classResult == 1){
+          this.$message.error(this.lang.ssCreateCourseLimit)
+          return
+        }
         this.$router.push(
           "/aiAddCourse?userid=" +
           this.userid +
@@ -802,7 +813,7 @@ export default {
       }
       this.addOp3('1', "", { type: "course_aiEasyMode_createClick" }, "success")
     },
-    goToCourse6(courseId){
+    async goToCourse6(courseId){
       if (courseId) {
         this.$router.push(
           "/addCourseEAi?cid=" +
@@ -818,6 +829,11 @@ export default {
         );
         this.addOp3('1', "", { courseid: courseId ,type: "course_aiEasyMode_edit" }, "success")
       } else {
+        let classResult = await this.checkClass()
+        if(classResult == 1){
+          this.$message.error(this.lang.ssCreateCourseLimit)
+          return
+        }
         this.$router.push(
           "/addCourseEAi?userid=" +
           this.userid +
@@ -857,7 +873,7 @@ export default {
       }
       this.getCourse();
     },
-    goToCourse2(courseId) {
+    async goToCourse2(courseId) {
       if (courseId) {
         this.$router.push(
           "/course/addCourseT?cid=" +
@@ -872,6 +888,11 @@ export default {
           this.role
         );
       } else {
+        let classResult = await this.checkClass()
+        if(classResult == 1){
+          this.$message.error(this.lang.ssCreateCourseLimit)
+          return
+        }
         this.$router.push(
           "/course/addCourseT?userid=" +
           this.userid +
@@ -884,7 +905,7 @@ export default {
         );
       }
     },
-    goToCourse3(courseId) {
+    async goToCourse3(courseId) {
       if (courseId) {
         this.$router.push(
           "/course/addCourseE?cid=" +
@@ -900,6 +921,11 @@ export default {
         );
         this.addOp3('1', "", { courseid: courseId ,type: "course_easyMode_edit" }, "success")
       } else {
+        let classResult = await this.checkClass()
+        if(classResult == 1){
+          this.$message.error(this.lang.ssCreateCourseLimit)
+          return
+        }
         this.$router.push(
           "/course/addCourseE?userid=" +
           this.userid +
@@ -1574,7 +1600,7 @@ export default {
           console.error(err);
         });
     },
-    goToPptEasy(courseId){
+    async goToPptEasy(courseId){
       if (courseId) {
           let psOrg = ['311882ee-4e86-11f1-9985-005056924926']
           let route = '/pptEasy'
@@ -1596,6 +1622,12 @@ export default {
         );
         this.addOp3('1', "", { courseid: courseId ,type: "course_pptEasyMode_edit" }, "success")
       } else {
+        let classResult = await this.checkClass()
+        if(classResult == 1){
+          this.$message.error(this.lang.ssCreateCourseLimit)
+          return
+        }
+        
         let psOrg = ['311882ee-4e86-11f1-9985-005056924926']
         let route = '/pptEasy'
         if(psOrg.includes(this.org)){
@@ -1614,6 +1646,22 @@ export default {
         this.addOp3('1', "", { type: "course_pptEasyMode_createClick" }, "success")
       }
     },
+    async checkClass(){
+      if(this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840'){
+        let params = {
+          userid: this.userid,
+        };
+        try {
+          const res = await this.ajax.get(this.$store.state.api + "checkClass", params)
+          let data = res.data[0][0].result
+          return data
+        } catch (err) {
+          console.error(err);
+        }
+      }else {
+        return 2
+      }
+    },
   },
   created() {
     if (this.role == "1") {

+ 2 - 1
src/lang/cn.json

@@ -2066,5 +2066,6 @@
   "ssReturnModify": "返回修改",
   "ssPleaseWait": "请稍后再试",
   "ssFileTooBig":"上传文件大小不能超过20MB, 请重新上传",
-  "ssAIAssistantTip":"开启后,学生提交作业将弹出 AI 助手,并基于题目引导学生检查与反思。"
+  "ssAIAssistantTip":"开启后,学生提交作业将弹出 AI 助手,并基于题目引导学生检查与反思。",
+  "ssCreateCourseLimit":"创建课程每学期仅创建5次"
 }

+ 2 - 1
src/lang/en.json

@@ -2065,5 +2065,6 @@
   "ssReturnModify": "Return to modify",
   "ssPleaseWait": "Please wait, try again later.",
   "ssFileTooBig":"The uploaded file size cannot exceed 20MB, please re-upload.",
-  "ssAIAssistantTip":"After enabling, students will be able to use the AI assistant and check with the help of the questions."
+  "ssAIAssistantTip":"After enabling, students will be able to use the AI assistant and check with the help of the questions.",
+  "ssCreateCourseLimit":"Create course limit semester 5 times"
 }

+ 3 - 1
src/lang/hk.json

@@ -2066,5 +2066,7 @@
   "ssReturnModify": "返回修改",
   "ssPleaseWait": "請稍後再試",
   "ssFileTooBig":"上傳文件大小不能超過20MB, 請重新上傳",
-  "ssAIAssistantTip":"開啟後,學生提交作業將彈出 AI 助手,並根據題目引導學生檢查與反思。"
+  "ssAIAssistantTip":"開啟後,學生提交作業將彈出 AI 助手,並根據題目引導學生檢查與反思。",
+  "ssCreateCourseLimit":"創建課程每学期僅創建5次"
 }
+

Some files were not shown because too many files changed in this diff