11wqe1 2 недель назад
Родитель
Сommit
d24d2bf0e0
2 измененных файлов с 8 добавлено и 32 удалено
  1. 1 1
      src/components/dialog/addClassDialog.vue
  2. 7 31
      src/components/main/courseSelect.vue

+ 1 - 1
src/components/dialog/addClassDialog.vue

@@ -217,7 +217,7 @@
         "teacherName": userInfo.user.username,
         "teacherAccount": userInfo.user.accountNumber,
         "teacherPhone": userInfo.user.phonenumber,
-        "eduId": userInfo.user.sessionid,
+        "eduId": userInfo.user.eduid || userInfo.user.sessionid,
         "schoolName": userInfo.user.schoolName,
         "area": userInfo.user.schooldest,
         "coursePackageName": coursePackageName[0][0].title,

+ 7 - 31
src/components/main/courseSelect.vue

@@ -535,19 +535,9 @@ const getTimeCourse = (id, item) => {
   }
   try {
     setIntervalNum.value = setInterval(() => {
-      axios.post('https://pbl.cocorobo.cn/api/pbl/addOperationTimeT', {userid: user.user.userid, id: id, type: '5', time: 30}, {
-        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
-        withCredentials: true
-      })
-      .then(res => {
+      top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/addOperationTimeT", [user.user.userid, id, '5', 30], function (res) {
         console.log(res, "22222222222222222");
-      })
-      .catch(err => {
-        console.log(err)
-      })
-      // top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/addOperationTimeT", [user.user.userid, id, '5', 30], function (res) {
-      //   console.log(res, "22222222222222222");
-      // }, [], { "type": "POST", "withCredentials": true });
+      }, [], { "type": "POST", "withCredentials": true });
 
     }, 30000)
   } catch (e) {
@@ -561,7 +551,7 @@ const getTimeCourse = (id, item) => {
     dataType: 0,
     teacherName: user.user.name,
     teacherAccount: "",
-    eduId: Current.userCurrent.eduId,
+    eduId: userInfo.user.eduid || userInfo.user.sessionid,
     schoolName: user.user.schoolName,
     schoolType: "",
     area: "",
@@ -776,16 +766,9 @@ const checkedAll = (id) => {
 const downloadOne = async (url, fileName) => {
   try {
     console.log("urls", [user.user.userid, getUpdateCourseId.value, '4', 1])
-    axios.post('https://pbl.cocorobo.cn/api/pbl/addOperationTimeT', {userid: user.user.userid, id: getUpdateCourseId.value, type: '4', time: 1}, {
-      headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
-      withCredentials: true
-    })
-    .then(res => {
+    top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/addOperationTimeT", [user.user.userid, getUpdateCourseId.value, '4', 1], function (res) {
       console.log(res, '11111111111')
-    })
-    .catch(err => {
-      console.error("Error fetching data:", err);
-    });
+    }, [], { "type": "POST", "withCredentials": true });
   } catch (error) {
     console.log(error);
   }
@@ -845,16 +828,9 @@ const DownloadProcessing = async () => {
 
   try {
     console.log("urls", [user.user.userid, getUpdateCourseId.value, '4', urls.length])
-    axios.post('https://pbl.cocorobo.cn/api/pbl/addOperationTimeT', {userid: user.user.userid, id: getUpdateCourseId.value, type: '4', time: urls.length}, {
-      headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
-      withCredentials: true
-    })
-    .then(res => {
+    top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/addOperationTimeT", [user.user.userid, getUpdateCourseId.value, '4', urls.length], function (res) {
       console.log(res, '11111111111')
-    })
-    .catch(err => {
-      console.error("Error fetching data:", err);
-    });
+    }, [], { "type": "POST", "withCredentials": true });
   } catch (error) {
     console.log(error);
   }