|
|
@@ -668,7 +668,23 @@ const updateCourse = id => {
|
|
|
}
|
|
|
}, [], { "type": "POST", "withCredentials": true });
|
|
|
}
|
|
|
-
|
|
|
+const downloadOne = (url, fileName) => {
|
|
|
+ try {
|
|
|
+ console.log("urls", [user.user.userid, getUpdateCourseId.value, '4', 1])
|
|
|
+ top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/addOperationTimeT", [user.user.userid, getUpdateCourseId.value, '4', 1], function (res) {
|
|
|
+ console.log(res, '11111111111')
|
|
|
+ }, [], { "type": "POST", "withCredentials": true });
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ }
|
|
|
+ const a = document.createElement('a');
|
|
|
+ a.style.display = 'none';
|
|
|
+ a.href = url;
|
|
|
+ a.download = fileName;
|
|
|
+ document.body.appendChild(a);
|
|
|
+ a.click();
|
|
|
+ document.body.removeChild(a);
|
|
|
+}
|
|
|
const updateCourseId = (id, type) => {
|
|
|
top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/copyCourseSz", [id, user.user.userid], function (res) {
|
|
|
console.log(res)
|