소스 검색

1、登录连接(zdxyz)权限调整

liyanbo 7 달 전
부모
커밋
c2d462f628
3개의 변경된 파일14개의 추가작업 그리고 8개의 파일을 삭제
  1. 12 6
      src/views/AIDevelop.vue
  2. 1 1
      src/views/AIGeneralCourse.vue
  3. 1 1
      src/views/AIImageToVideo.vue

+ 12 - 6
src/views/AIDevelop.vue

@@ -211,6 +211,8 @@ const gradeId = ref('')
 const typeId = ref('')
 // 课程小节id
 const courseId = ref('')
+// 课程排序
+const typeSort = ref('')
 
 
 //课程小节字典
@@ -334,12 +336,15 @@ const disableVideo = (index = course.value.key) => {
         return true
       }
   }
-  if (localStorage.getItem('userName') === 'zdxyz') {
-    let dis = Number(index.substring(index.indexOf("-") + 1));
-    if (dis > 2) {
-      //提示禁用
-      Message().notifyWarning('您的账号并未开放此课程!', true)
-      return true
+
+  if (localStorage.getItem('userName') === "zdxyz") {
+    if (localStorage.getItem('selectedGradeId') !== "1" || typeSort.value !== "02") {
+      let dis = Number(index.substring(index.indexOf("-") + 1));
+      if (dis > 2) {
+        //提示禁用
+        Message().notifyWarning('您的账号并未开放此课程!', true)
+        return true
+      }
     }
   }
 
@@ -535,6 +540,7 @@ onMounted(async () => {
     boxIconTitle.value = String(title)
   }
 
+  typeSort.value = router.currentRoute.value.query.typeSort
   // 初始化年级ID
   gradeId.value = globalState.initGradeId()
 })

+ 1 - 1
src/views/AIGeneralCourse.vue

@@ -367,7 +367,7 @@ const goToAIExperience = outlineData => {
   }
   router.push({
     path: '/ai-develop', // 跳转视频页面
-    query: { typeId: outlineData.id, typeName: outlineData.ctType }
+    query: { typeId: outlineData.id, typeName: outlineData.ctType, typeSort:outlineData.ctTypeSort }
   })
 }
 </script>

+ 1 - 1
src/views/AIImageToVideo.vue

@@ -394,7 +394,7 @@ const sendMessage = async() => {
         "prompt":content,
         "duration":4,
         "resolution":"1080P",
-        "promptImage":uploadedImage.value
+        "promptImage":[uploadedImage.value]
       }).then(res=>{
         console.log("生成视频",res)
         //目前写死调用已生成的图片,全部通了后再改