Sfoglia il codice sorgente

Merge branch 'beta'

lsc 1 mese fa
parent
commit
d0a955e141
5 ha cambiato i file con 34 aggiunte e 4 eliminazioni
  1. 1 0
      js/Desktop/DeskTop.js
  2. 1 1
      js/Desktop/Onload.js
  3. 1 1
      js/UForm/Ajax.js
  4. 30 1
      szdjg/Onload.js
  5. 1 1
      uform.js

+ 1 - 0
js/Desktop/DeskTop.js

@@ -2327,6 +2327,7 @@ U.MD.D.I.initDesktopIcons = function (el, type) {
     if (_oid == '5f6c97eb-4778-11ed-8c78-005056b86db5') {//松坪学校
         _teacherDesktopIconInfo.push(
             { "Name": "AI助手+", "Url": "aigpt", "style": { "cssText": "background-image:url(/img/icon/aigpt.png)" } },
+						{ "Name": "CocoFlow", "Url": "appStore", "style": { "cssText": "background-image:url(/img/icon/appStore.png)" } },
         )
     }
     if (_oid == 'b650d914-f039-11ef-b508-005056924926') {//松坪学校

+ 1 - 1
js/Desktop/Onload.js

@@ -955,7 +955,6 @@ function loginPan(userInfo, userId) {
     [],
     { type: "POST", withCredentials: true }
   );
-
   if (userInfo.organizeid == "91305d49-01ba-11ed-8c78-005056b86db4") {
     $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/mingdeBg.png")';
     US.Config.background = 'url("/img/icon/mingdeBg.png")';
@@ -1110,6 +1109,7 @@ function loginPan(userInfo, userId) {
   }
 
   US.userInfo = userInfo;
+  U.MD.D.addOp3("1", "", { type: "user_login" }, "success")
   $(".avatar")[0].style.display = "block";
   if (
     userInfo.type === 1 &&

+ 1 - 1
js/UForm/Ajax.js

@@ -281,7 +281,7 @@ U.A.Request.createAjaxObject = function (url) {
 U.A.Request.writeHeader = function (ajax, header) {
     header["CONTENT-TYPE"] = header["CONTENT-TYPE"] || "application/x-www-form-urlencoded;charset=UTF-8"; //请求写入数据的格式,必须传值,否则后台获取值会报错
     //header["Connection"] = "keep-alive";
-    header["timeout"] = 10000;
+    header["timeout"] = 60000;
     try {
         header["type"] = null;
         delete header["type"];

+ 30 - 1
szdjg/Onload.js

@@ -445,6 +445,8 @@ U.MD.D.getuser = function () {
                             
                                     
                                     US.userInfo = res.value[0][0];
+                                    U.MD.D.addOp3("1", "", { type: "user_login_szdjg" }, "success")
+
                                     $(".avatar")[0].style.display = "block";
                                     if(res.value[0][0].type === 1 && $(".U_PBL_Check")[0] && res.value[0][0].org != '150e3120-9195-11ed-b13d-005056b86db5' && res.value[0][0].org != 'b47d2ea8-7044-4810-9cb7-3aaf8b74cfbc'){
                                         $(".U_PBL_Check")[0].style.display = "block";
@@ -944,4 +946,31 @@ U.MD.D.getNotice = function () {
 //  // 在视频播放完成后删除 video 元素
 //  video.addEventListener("ended", () => {
 //    document.body.removeChild(video);
-//  });
+//  });
+
+U.MD.D.addOp3 = async (userTime, loadTime, object, status) => {
+  let browser = detectBrowser()
+  let _time = new Date().toLocaleString('zh-CN', { hour12: false, timeZone: 'Asia/Shanghai' }).replace(/\//g, '-');
+  let params = {
+      userid: US.userInfo.userid,
+      username: US.userInfo.name,
+      accountNumber: US.userInfo.accountNumber,
+      org: US.userInfo.orgName,
+      school: US.userInfo.schoolName,
+      browser: browser,
+      userTime: userTime == '1' ? _time : userTime, // 使用时间 1次的就1 其次传秒
+      loadTime: loadTime, //load的时间没有就“”
+      object: JSON.stringify(object), //执行信息传json
+      status: status, //成功返回success。失败返回error的信息
+  }
+  fetch("https://pbl.cocorobo.cn/api/mongo/updateUserData2", { method: 'POST', body: JSON.stringify(params) }).then(res => {
+      if (res.status == 200) {
+          console.log('保存成功')
+      } else {
+          console.log('保存失败')
+      }
+  }).catch(e => {
+      console.log('保存失败')
+      console.log(e);
+  })
+}

+ 1 - 1
uform.js

@@ -540,7 +540,7 @@ U.A.Request.createAjaxObject = function (url) {
 U.A.Request.writeHeader = function (ajax, header) {
     header["CONTENT-TYPE"] = header["CONTENT-TYPE"] || "application/x-www-form-urlencoded;charset=UTF-8"; //请求写入数据的格式,必须传值,否则后台获取值会报错
     //header["Connection"] = "keep-alive";
-    header["timeout"] = 10000;
+    header["timeout"] = 60000;
     try {
         header["type"] = null;
         delete header["type"];