Browse Source

修改下载文件

11wqe1 2 weeks ago
parent
commit
4d2fef7b35

File diff suppressed because it is too large
+ 3 - 0
src/common/aws-sdk-2.235.1.min.js


+ 0 - 30
src/components/main/AIexploration.vue

@@ -81,36 +81,6 @@ const getdata =()=>{
         loading.value = false
     })
 }
-
-const openCourseDetail = () => {
-	let id = cid.value
-	console.log(user.user)
-	// 会返回复制得课程
-	top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/getcopyCourseByUseridSz", [id, user.user.userid], function (res) {
-		console.log(res)
-		if (res.value[0].length > 0) {
-		// let isSave = res.value[0].filter(x => {
-		//   return x.courseId == id
-		// })
-		//这个是打开指定的课程接口
-		top.U.MD.D.I.openInApplication("studyDetail", res.value[0][0].courseId, 2, user.user.type);
-		} else {
-			updateCourseId(id, "studyDetail")
-		}
-	}, [], { "type": "POST", "withCredentials": true });
-}
-const updateCourseId = (id, type) => {
-  top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/copyCourseSz", [id, user.user.userid], function (res) {
-    console.log(res)
-    if (res.value[0][0].courseId != "") {
-      if (type == "openCourseNewUpdate") {
-        top.U.MD.D.I.openInApplication("openCourseNewUpdate", res.value[0][0].courseId)
-      } else {
-        top.U.MD.D.I.openInApplication("studyDetail", res.value[0][0].courseId, 3, user.user.type);
-      }
-    }
-  }, [], { "type": "POST", "withCredentials": true });
-}
 </script>
 
 <style lang="scss" scoped>

+ 6 - 2
src/components/main/courseSelect.vue

@@ -154,11 +154,11 @@
   </div>
   <div class="course_select">
     <span class="grandTitle">课程类型:</span>
-    <el-button  @click="cutmodpage = 0" :class="[cutmodpage == 0 ? 'el_button_active' :'']">
+    <el-button  @click="cutmod(0)" :class="[cutmodpage == 0 ? 'el_button_active' :'']">
       <span v-if="gotype.gotype == 'bjs'">智能体课程</span>
       <span v-else>智能体设计与应用课程</span>
     </el-button>
-    <el-button @click="cutmodpage = 1" v-if="gotype.gotype != 'bjs'" :class="[cutmodpage == 1 ? 'el_button_active' :'']">
+    <el-button @click="cutmod(1)" v-if="gotype.gotype != 'bjs'" :class="[cutmodpage == 1 ? 'el_button_active' :'']">
       <span>创意智造课程</span>
     </el-button>
     <!-- <el-button :class="!courseTypeShow ? 'el_button_active' : ''" @click="SwitchCourseType(false)">AI通识课2024版</el-button> -->
@@ -310,6 +310,10 @@ const clickGrand = val => {
 const handleClose =(done)=>{
   done()
 }
+const cutmod = (val) => {
+    cutmodpage.value = val
+    clickmod(selectmod.value)
+}
 const clickmod = val => {
   selectmod.value = val
   if (gotype.gotype === 'bjs') {    

+ 2 - 3
src/components/main/opendetail.vue

@@ -83,6 +83,8 @@
 
 <script setup>
 import { ref } from 'vue';
+import "../../common/aws-sdk-2.235.1.min.js";
+
 import { userInfoStore } from '../../stores/counter'
 import { defineExpose } from 'vue'
 const user = userInfoStore()
@@ -118,9 +120,7 @@ const downloadPdf =(f) =>{
       } else {
         _url2 = url2;
       }
-      let _this = this;
 
-      _this.downLoading = true;
       var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
       let name = decodeURIComponent(
         _url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
@@ -130,7 +130,6 @@ const downloadPdf =(f) =>{
         Key: name
       };
       s3.getObject(params, function(err, data) {
-        _this.downLoading = false;
         if (err) console.log(err, err.stack);
         // an error occurred
         else {

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