Forráskód Böngészése

Merge branch 'beta' into sz

lsc 3 hónapja
szülő
commit
a1fb988fbb

+ 4 - 4
ai.html

@@ -8,8 +8,8 @@
     <meta http-equiv="Cache-Control" content="no-transform" />
     <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
     <meta name="renderer" content="webkit" />
-    <meta name="application-name" content="智慧课堂平台" />
-    <meta name="msapplication-tooltip" content="智慧课堂平台" />
+    <meta name="application-name" content="深教AI6" />
+    <meta name="msapplication-tooltip" content="深教AI6" />
     <meta http-equiv="pragma" content="no-cache" />
     <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
     <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT" />
@@ -33,7 +33,7 @@
     <link rel="apple-touch-icon-precomposed" sizes="72x72" href="" />
     <link rel="apple-touch-icon-precomposed" sizes="144x144" href="" />
     <link href="img/favicon.ico" rel="Shortcut Icon" />
-    <title>智慧平台</title>
+    <title>深教AI6</title>
     <link href="css/Desktop/Desktop.css" rel="stylesheet" type="text/css" />
     <link href="./css/Desktop/Desktop.css" rel="stylesheet" type="text/css" />
     <link href="css/Desktop/Taskbar.css" rel="stylesheet" type="text/css" />
@@ -70,7 +70,7 @@
                 <div class="U_MD_D_K" id="U_MD_D_K" __top__="false">
                 </div>
                 <div class="U_MD_D_RW" onmouseover="U.MD.D.I.displayTaskbar(this)"
-                    onmouseout="U.MD.D.I.hiddenTaskbarout(this)">
+                    onmouseout="U.MD.D.I.hiddenTaskbarout(this)" style="display: none;">
                     <div class="U_MD_D_RW_L">
                         <div class="U_MD_D_RW_I">
                             <div class="U_MD_D_RW_IO" title="点击隐藏" onclick="U.MD.D.I.hiddenTaskbar(this);">

+ 52 - 3
css/Desktop/Desktop.css

@@ -1,10 +1,10 @@
 /*整体样式*/
-@font-face {
+/* @font-face {
     font-family: 'Source Han Sans SC';
     src: url('SourceHanSans-Regular.otf') format('truetype');
     font-weight: normal;
     font-style: normal;
-  }
+  } */
 
   
 html {}
@@ -21,7 +21,7 @@ body {
     border: 0;
     width: 100%;
     font-size: 12px;
-    font-family: 'Source Han Sans SC';
+    font-family: '黑体';
     color: #333;
     background-color: #FFF;
 }
@@ -1123,4 +1123,53 @@ body div ::-webkit-scrollbar-resizer:vertical {
 
 .U_PBL_Check>.active{
     opacity: 1;
+}
+
+
+.U_MD_D_BD_vip_box {
+    display: none;
+    /* background-color: #586e86;
+    border: 1px solid #344558; */
+    position: absolute;
+    right: 100px;
+    top: 0;
+    border-radius: 10px;
+    width: 270px;
+    /* height: 100px; */
+    padding: 10px 10px;
+    box-sizing: border-box;
+    box-shadow: 0px 3px 6px 0px #0000003b;
+    background-image: url(../../img/icon/vip_box.png);
+    background-size: 100% 100%;
+}
+
+.vip_info{
+    display: flex;
+    align-items: center;
+}
+.vip_info > img{
+    width: 45px;
+    height: 45px;
+    object-fit: cover;
+}
+.vip_info > div {
+    margin-left: 10px;
+    display: flex;
+    flex-direction: column;
+    font-size: 14px;
+}
+.vip_info > div > span{}
+
+.vip_info > div > span + span{
+    margin-top: 8px;
+}
+
+.vip_school{
+    font-size: 14px;
+    margin-top: 8px;
+    color: #9baabd;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    width: 100%;
 }

+ 190 - 29
css/Desktop/Taskbar.css

@@ -1,35 +1,196 @@
 /*任务管理器*/
 
 /*任务栏*/
-.U_MD_D_RW      { z-index:99;width:100%; height:65px; position:absolute; left:0; bottom:-60px; background-color:#505050; border-radius:0 8px 0 8px; box-shadow:0 0 30px 5px #212121; -webkit-box-shadow:0 0 30px 5px #212121; }
-#U_MD_D_RW      { width:800px; color:#FFF; height:100%; /*overflow: hidden;*/ float:left; }
-#U_MD_D_RW  div { color:#111; }
-#U_MD_D_RW .U_MD_D_BZMOA:hover   { /*background-color:transparent;*/background-color:#6F6F6F; border:0; padding:6px; }
-#U_MD_D_RW .U_MD_D_BZMO    { margin-left:4px; position:relative; }
-#U_MD_D_RW .U_MD_D_BZMON   { margin-top:4px; color:#FFF; }
-.U_MD_D_RW_L     { float:left; width:21px; height:100%; background-color:#00A8FD; position:relative;}
-.U_MD_D_RW_R     { float:right; width:21px; height:100%;background-color:#6d6d6d; position:relative;}
+.U_MD_D_RW {
+    z-index: 99;
+    width: 100%;
+    height: 65px;
+    position: absolute;
+    left: 0;
+    bottom: -60px;
+    background-color: #505050;
+    border-radius: 0 8px 0 8px;
+}
+
+#U_MD_D_RW {
+    width: 800px;
+    color: #FFF;
+    height: 100%;
+    /*overflow: hidden;*/
+    float: left;
+}
+
+#U_MD_D_RW div {
+    color: #111;
+}
+
+#U_MD_D_RW .U_MD_D_BZMOA:hover {
+    /*background-color:transparent;*/
+    background-color: #6F6F6F;
+    border: 0;
+    padding: 6px;
+}
+
+#U_MD_D_RW .U_MD_D_BZMO {
+    margin-left: 4px;
+    position: relative;
+}
+
+#U_MD_D_RW .U_MD_D_BZMON {
+    margin-top: 4px;
+    color: #FFF;
+}
+
+.U_MD_D_RW_L {
+    float: left;
+    width: 21px;
+    height: 100%;
+    background-color: #00A8FD;
+    position: relative;
+}
+
+.U_MD_D_RW_R {
+    float: right;
+    width: 21px;
+    height: 100%;
+    background-color: #6d6d6d;
+    position: relative;
+}
+
 /*.U_MD_D_RW *        { zoom:1; -moz-transform:scale(1); -webkit-transform:scale(1); -o-transform:scale(1); transform:scale(1); -ms-transform:scale(1); color:#333; }*/
-.U_MD_D_RW_T     { text-align:center; padding:5px 0; border-bottom:1px solid # color:#006699; font-size:13px; color:#FFF; margin-top:16px; }
-.U_MD_D_RW_I     { width:21px; height:45px; float:left; margin-top:19px; }
+.U_MD_D_RW_T {
+    text-align: center;
+    padding: 5px 0;
+    border-bottom: 1px solid # color:#006699;
+    font-size: 13px;
+    color: #FFF;
+    margin-top: 16px;
+}
+
+.U_MD_D_RW_I {
+    width: 21px;
+    height: 45px;
+    float: left;
+    margin-top: 19px;
+}
+
 /*.U_MD_D_RW_IO    { width:47px; height:47px; background-position:-729px -337px; margin:auto; cursor:pointer; }
 .U_MD_D_RW_IO:hover      { background-position:-787px -339px; }*/
-*.U_MD_D_RW_IO   {  width:21px;height:100%;}
-.U_MD_D_RW_CD   { width:21px;margin-top:16%;}
-.U_MD_D_RW_GU    { width:21px;height:30%;/*background-color:gray;*/}
-.U_MD_D_RW_GU:hover{background-color:gray;}
-.U_MD_D_RW_GD    { width:21px;height:30%;/*background-color:gray;*/position:absolute;bottom:0;}
-.U_MD_D_RW_GD:hover{background-color:gray;}
-.U_MD_D_RW_GU_g  { width:21px;}
-.U_MD_D_RW_GD_g  { width:21px;}
-.U_MD_D_RW .U_MD_D_T_taskbar_Name{display:none;width:115px;height:31px;background:rgba(111,111,111,1);border-radius:1px;font-size:15px;}
-#U_MD_D_RW .U_MD_D_T_taskbar_Close { display:none; width: 15px; height: 14px; background-color: red;/*border-radius: 100%;*/color: White;text-align: center;font-size: 14px;position: absolute;right: 9px;top: 8px;line-height: 11px;cursor: pointer;}
-#U_MD_D_RW .U_MD_D_BZMO:hover .U_MD_D_T_taskbar_Close { display: block;}
-#U_MD_D_RW .U_MD_D_BZMO:hover .U_MD_D_T_taskbar_Name{ display: block;}
-
-.U_MD_D_T_taskbar_Bar { position: absolute; bottom: 0; width: 80%; background-color: #555; height: 56px; left: 10%; border-bottom: 0; box-shadow: 0 0 25px 3px #555; -webkit-box-shadow: 0 0 25px 3px #555; }
-.U_MD_D_T_taskbar_Bar_Main { float: left; margin: 0 auto; width: calc(100% - 18px); height: 100%; }
-.U_MD_D_T_taskbar { width: 50px; height: 100%; float: left; margin: 3px 0 3px 3px; position: relative; }
-.U_MD_D_T_taskbar_Main, .U_MD_D_T_taskbar_Icon { width: 100%; height: 100%; }
-.U_MD_D_T_taskbar_Bar_Operate { float: right; width: 18px; line-height: 28px; display: none; }
-.U_MD_D_T_taskbar_Bar_Operate_Button { font-size: 19px; cursor: pointer; text-align: center; }
+*.U_MD_D_RW_IO {
+    width: 21px;
+    height: 100%;
+}
+
+.U_MD_D_RW_CD {
+    width: 21px;
+    margin-top: 16%;
+}
+
+.U_MD_D_RW_GU {
+    width: 21px;
+    height: 30%;
+    /*background-color:gray;*/
+}
+
+.U_MD_D_RW_GU:hover {
+    background-color: gray;
+}
+
+.U_MD_D_RW_GD {
+    width: 21px;
+    height: 30%;
+    /*background-color:gray;*/
+    position: absolute;
+    bottom: 0;
+}
+
+.U_MD_D_RW_GD:hover {
+    background-color: gray;
+}
+
+.U_MD_D_RW_GU_g {
+    width: 21px;
+}
+
+.U_MD_D_RW_GD_g {
+    width: 21px;
+}
+
+.U_MD_D_RW .U_MD_D_T_taskbar_Name {
+    display: none;
+    width: 115px;
+    height: 31px;
+    background: rgba(111, 111, 111, 1);
+    border-radius: 1px;
+    font-size: 15px;
+}
+
+#U_MD_D_RW .U_MD_D_T_taskbar_Close {
+    display: none;
+    width: 15px;
+    height: 14px;
+    background-color: red;
+    /*border-radius: 100%;*/
+    color: White;
+    text-align: center;
+    font-size: 14px;
+    position: absolute;
+    right: 9px;
+    top: 8px;
+    line-height: 11px;
+    cursor: pointer;
+}
+
+#U_MD_D_RW .U_MD_D_BZMO:hover .U_MD_D_T_taskbar_Close {
+    display: block;
+}
+
+#U_MD_D_RW .U_MD_D_BZMO:hover .U_MD_D_T_taskbar_Name {
+    display: block;
+}
+
+.U_MD_D_T_taskbar_Bar {
+    position: absolute;
+    bottom: 0;
+    width: 80%;
+    background-color: #555;
+    height: 56px;
+    left: 10%;
+    border-bottom: 0;
+    box-shadow: 0 0 25px 3px #555;
+    -webkit-box-shadow: 0 0 25px 3px #555;
+}
+
+.U_MD_D_T_taskbar_Bar_Main {
+    float: left;
+    margin: 0 auto;
+    width: calc(100% - 18px);
+    height: 100%;
+}
+
+.U_MD_D_T_taskbar {
+    width: 50px;
+    height: 100%;
+    float: left;
+    margin: 3px 0 3px 3px;
+    position: relative;
+}
+
+.U_MD_D_T_taskbar_Main,
+.U_MD_D_T_taskbar_Icon {
+    width: 100%;
+    height: 100%;
+}
+
+.U_MD_D_T_taskbar_Bar_Operate {
+    float: right;
+    width: 18px;
+    line-height: 28px;
+    display: none;
+}
+
+.U_MD_D_T_taskbar_Bar_Operate_Button {
+    font-size: 19px;
+    cursor: pointer;
+    text-align: center;
+}

BIN
img/icon/010606.png


BIN
img/icon/SPROUTLabBg.png


BIN
img/icon/Tianyuan.png


BIN
img/icon/aiKnowledge.png


BIN
img/icon/aigptCourse.png


BIN
img/icon/appStore.png


BIN
img/icon/classroomObservation.png


BIN
img/icon/pblCourse.png


BIN
img/icon/scnuaiBg.png


BIN
img/icon/szjkyBg.png


BIN
img/icon/szjkyBg4.png


BIN
img/icon/vip_box.png


BIN
img/icon/vip_img.png


BIN
img/icon/x010607bgImg.png


+ 13 - 1
index.html

@@ -33,7 +33,7 @@
     <link rel="apple-touch-icon-precomposed" sizes="72x72" href="" />
     <link rel="apple-touch-icon-precomposed" sizes="144x144" href="" />
     <link href="img/favicon.ico" rel="Shortcut Icon" />
-    <title>智慧平台</title>
+    <title>CocoClass</title>
     <link href="css/Desktop/Desktop.css" rel="stylesheet" type="text/css" />
     <link href="./css/Desktop/Desktop.css" rel="stylesheet" type="text/css" />
     <link href="css/Desktop/Taskbar.css" rel="stylesheet" type="text/css" />
@@ -91,6 +91,18 @@
                 </div>
                 <div class="U_MD_D_BD" __top__="false">
                     <!-- style="max-width: 165px;" -->
+                    <div class="U_MD_D_BD_vip_box">
+                        <div class="vip_info">
+                            <img src="./img/icon/vip_img.png" alt="">
+                            <div>
+                                <span class="vip_member"></span>
+                                <span>使用期限至:<span class="vip_time"></span></span>
+                            </div>
+                        </div>
+                        <div class="vip_school">
+                            <!-- 深圳明德实验学校 -->
+                        </div>
+                    </div>
                     <div class="U_MD_D_BDA">
                         <!-- <div class="U_MD_D_BDI U_Img" id="U_MD_D_BDI" title="登录">
                         </div> -->

+ 224 - 0
js/Common/awsupload.js

@@ -0,0 +1,224 @@
+let bucket; //aws上传接口
+let bucketname = "ccrb"; //桶
+const partsize = 5 * 1024 * 1024; // 5MB
+
+//--------------------------分断上传保证稳定性
+//初始化上传
+async function init() {
+    const credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+    }; //秘钥形式的登录上传
+    window.AWS.config.update(credentials);
+    window.AWS.config.region = "cn-northwest-1"; //设置区域
+    //桶的设置
+    bucket = new window.AWS.S3({
+        params: {
+            Bucket: bucketname
+        }
+    });
+    return bucket;
+}
+
+//初始化上传入口
+async function initMultipartUpload(key, file) {
+    const params = {
+        Bucket: bucketname,
+        Key: key,
+        ContentType: file.type,
+        "ACL": "public-read"
+    };
+    //创建一个续传通道
+    const data = await bucket.createMultipartUpload(params).promise();
+    return data.UploadId;
+}
+
+// 上传文件的某一部分
+async function uploadPart(file, keyname, uploadid, pn, start, end) {
+    //key可以设置为桶的相对路径,Body为文件, ACL最好要设置
+    var params = {
+        Bucket: bucketname,
+        Key: keyname,
+        PartNumber: pn,
+        UploadId: uploadid,
+        Body: file.slice(start, end)
+    };
+    const result = await bucket.uploadPart(params).promise();
+    return { ETag: result.ETag, PartNumber: pn };
+}
+
+// 完成分块上传
+async function completeMultipartUpload(parts, keyname, uploadid) {
+    const params = {
+        Bucket: bucketname,
+        Key: keyname,
+        MultipartUpload: { Parts: parts },
+        UploadId: uploadid
+    };
+    return await bucket.completeMultipartUpload(params).promise();
+}
+
+//中止分块上传
+async function abortMultipartUpload(key, uploadid) {
+    const params = {
+        Bucket: bucketname,
+        Key: key,
+        UploadId: uploadid
+    };
+    await bucket.abortMultipartUpload(params).promise();
+}
+
+// 实际的上传逻辑
+async function uploadFile(file, folderid) {
+    folderid = folderid || window.Guid.newGuid(); //分配到一个随机的id里
+    var keyname = folderid + "/" + file.name; //保存在指定的文件夹里
+    var uploadid = "";
+    try {
+        init(); // 初始化aws接口
+        // 初始化分块上传
+        uploadid = await initMultipartUpload(keyname, file);
+        // 分块上传文件
+        let parts = [];
+        let start = 0;
+        let end = 0;
+        let len = Math.ceil(file.length / partsize); //循环的长度
+        //循环上传
+        for (let i = 0; i < len; i++) {
+            start = i * partsize;
+            end = (i + 1) * partsize;
+            parts.push(await uploadPart(file, keyname, uploadid, i, start, end));
+        }
+        // 完成分块上传
+        await completeMultipartUpload(parts, keyname, uploadid);
+        return uploadid;
+    }
+    catch (error) {
+        // 如果出现错误,中止分块上传
+        console.error('An error occurred during file upload:', error);
+        await abortMultipartUpload(keyname, uploadid);
+    }
+}
+
+//--------------------------------下面支持断点续传
+
+//初始化亚马逊参数
+async function init() {
+    //秘钥形式的登录上传
+    const credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+        region: "cn-northwest-1"
+    };
+    window.AWS.config.update(credentials);
+    // window.AWS.config.region = "cn-northwest-1"; //设置区域
+    //桶的设置
+    bucket = new window.AWS.S3({
+        params: {
+            Bucket: bucketname
+        }
+    });
+    return bucket;
+}
+
+//获取当前文件是否有已上传断点信息
+async function getawscheckpoint(key) {
+    let partsinfo;
+    try {
+        const result = await bucket.listMultipartUploads({ Bucket: bucketname, Prefix: key }).promise();
+        //获取具体分片信息
+        if (result.Uploads.length) {
+            uploadid = result.Uploads[result.Uploads.length - 1].UploadId;
+            partsinfo = await bucket.listParts({ Bucket: bucketname, Key: key, UploadId: uploadid, }).promise();
+        }
+    } catch (err) {
+        console.log(err);
+    }
+    return { uploadid, partsinfo };
+}
+
+//分段上传
+async function awsuploadpart(filestate, file, uploadid, parts, key) {
+    var partarr = [];//已完成的数组
+    //已完成的分片,转化成提交格式
+    const completeparts = parts.map((_) => {
+        partarr.push(_.PartNumber);
+        return { PartNumber: _.PartNumber, ETag: _.ETag };
+    });
+    // 分块上传文件
+    let uploadpart;
+    let start = 0;
+    let end = 0;
+    let len = Math.ceil(file.size / partsize); //循环的长度
+    if (partarr.length) {
+        filestate.status = "processing";
+        filestate.percent = parseInt((completeparts.length * 100) / len);
+    }
+    //循环上传
+    for (let i = 0; i < len; i++) {
+        start = i * partsize;
+        end = (i + 1) * partsize;
+        if (!partarr.includes(i)) {
+            uploadpart = await uploadPart(file, key, uploadid, i + 1, start, end);
+            if (uploadpart.ETag != null) {
+                completeparts.push(uploadpart);
+                filestate.percent = parseInt((completeparts.length * 100) / len);
+            }
+
+            else {
+                filestate.status = "fail";
+                return;
+            }
+        }
+    }
+    //提交上传成功信息
+    var data = await completeMultipartUpload(completeparts, key, uploadid);
+    filestate.status = "success";
+    return data;
+}
+
+//上传的接口
+async function awsupload(file, folderid, filestate) {
+    init(); //初始化桶
+    const key = (folderid || window.Guid.newGuid()) + "/" + file.name; //需要上传的文件名
+    filestate.percent = 0;
+    filestate.status = "start";
+    //上传的参数
+    var params = {
+        Bucket: bucketname,
+        Key: key
+    };
+    //设置桶上传文件
+    try {
+        //检查文件是否已上传
+        bucket.headObject(params, async (err, data) => {
+            // 没有上传成功,head方法会返回失败
+            if (err) {
+                //检查是否部分上传
+                const { uploadid, partsinfo } = await getawscheckpoint(key, bucket);
+                //如果已经部分存在,那么直接在节点续传
+                if (uploadid) {
+                    //断点续传
+                    var data = await awsuploadpart(filestate, file, uploadid, partsinfo.Parts, key);
+                    return { data, key, uploadid };
+                }
+                //不存在,上传新的
+                else {
+                    const uploadid = await initMultipartUpload(key, file); //初始化文件上传
+                    var data = await awsuploadpart(filestate, file, uploadid, [], key);
+                    return { data, key, uploadid };
+                }
+            }
+            //如果已经上传成功了,那么直接返回状态百分百
+            else if (data) {
+                //data存在,上传成功
+                filestate.percent = 100;
+                filestate.status = "success";
+                return { data, key };
+            }
+        });
+    }
+    catch (err) {
+        filestate.status = "error";
+        console.log(err);
+    }
+}

+ 1 - 1
js/Controls/Basic.js

@@ -2045,7 +2045,7 @@ U.UF.UI.form.prototype = {
                             //关闭任务栏处理
                             if (U.MD.D.T.taskbar.close) {
                                 U.MD.D.T.taskbar.close({ "forms": _formel });
-                                U.MD.N.urlWrite("", "智慧课堂平台");
+                                //U.MD.N.urlWrite("", "智慧课堂平台");
                             }
                         } catch (e) { }
                         //回调处理

+ 31 - 31
js/Controls/Basic/Form.js

@@ -20,7 +20,7 @@ Namespace.register("U.UF.UI") //窗体的命名空间
  * @param	object	关闭、放大、缩小按钮区域的属性设置 { "style":{"left":"100px"}} 选填,有默认属性,原函数有注释
  * @param	element	窗体追加到制定的元素 选填 有默认的属性,原函数有注释
  */
-U.UF.UI.form = function(title, content, formattr, formfun, headattr, contentattr, headbottomattr, parentel) {
+U.UF.UI.form = function (title, content, formattr, formfun, headattr, contentattr, headbottomattr, parentel) {
     var _this = this;
     //所有的窗体中找到是否已经创建的窗体
     if (formattr && U.UF.UI.form.allForm[formattr.id]) {
@@ -89,7 +89,7 @@ U.UF.UI.form.allForm = {};
 U.UF.UI.form.prototype = {
     /** 初始化uform窗体
      */
-    create: function() {
+    create: function () {
         var i, //用于循环 
             _resizefun,
             _formel, //窗体元素
@@ -105,7 +105,7 @@ U.UF.UI.form.prototype = {
             _headattr = this.headattr || {}, //头部属性
             _contentattr = this.contentattr || {}, //内容的属性
             _replaceel = U.UF.UI.form.allForm[_formattr.id] ? U.UF.UI.form.allForm[_formattr.id].form : null //得到之前创建的窗体,如果窗体存在,那么下面创建后直接替换
-        ;
+            ;
         //窗体的统一属性设置,默认属性
         if (_formattr.style) {
             _formattr.style.cssText = _formattr.style.cssText || "";
@@ -115,7 +115,7 @@ U.UF.UI.form.prototype = {
                 cssText: "width: 70%; position: fixed; border: 1px solid #444; background-color: #fff; z-index: 10; border-radius: 1px; overflow: hidden;  -moz-box-shadow:0 0 30px 5px #555; -webkit-box-shadow:0 0 30px 5px #555; box-shadow:0 0 30px 5px #555; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius:5px;"
             };
         }
-        _formattr.close = U.UF.C.apply(this, function() { //关闭窗体;
+        _formattr.close = U.UF.C.apply(this, function () { //关闭窗体;
             U.UF.F.closeWindow(this.form); //关闭窗体
         });
         _formattr.usform = "true"; //设置窗体的属性,作为窗体的识别,有助于调用的用户通过js找到所有的窗体
@@ -124,13 +124,13 @@ U.UF.UI.form.prototype = {
         if (_formattr.onresize) {
             _resizefun = _formattr.onresize;
             _mousedown = _formattr.onmousedown;
-            _formattr.onresize = U.UF.C.apply(this, function() { //当窗体大小发生变化的处理
+            _formattr.onresize = U.UF.C.apply(this, function () { //当窗体大小发生变化的处理
                 this.size(); //大小变化处理
                 if (_resizefun) {
                     _resizefun(); //大小变化回调
                 }
             });
-            _formattr.onmousedown = U.UF.C.apply(this, function() {
+            _formattr.onmousedown = U.UF.C.apply(this, function () {
                 //窗体点击置顶的处理
                 if (this.istop !== false) {
                     this.top(); //大小变化处理
@@ -140,7 +140,7 @@ U.UF.UI.form.prototype = {
                 }
             });
         } else if (_formattr.onresize !== false) {
-            _formattr.onresize = U.UF.C.apply(this, function() { //当窗体大小发生变化的处理
+            _formattr.onresize = U.UF.C.apply(this, function () { //当窗体大小发生变化的处理
                 this.size(); //大小变化处理
             });
         }
@@ -167,7 +167,7 @@ U.UF.UI.form.prototype = {
             }
             //设置头部有拖拽事件
             if (this.isdrag) { //判断是否允许拖动窗体
-                _headattr.onmousedown = function() {
+                _headattr.onmousedown = function () {
                     U.UF.F.drag(_formel); //拖动事件调用
                 };
             }
@@ -210,7 +210,7 @@ U.UF.UI.form.prototype = {
         this.middle = _contentchildel; //中间的内容
         //在头部不存在的情况下,设置中间内容可以拖动
         if (this.title === false && this.isdrag) {
-            _contentel.onmousedown = function() {
+            _contentel.onmousedown = function () {
                 U.UF.F.drag(_formel); //拖动事件调用
             };
         }
@@ -220,22 +220,22 @@ U.UF.UI.form.prototype = {
             _stretchingel = $$("div", { style: { "cssText": "display: block;" } }, _formel);
             //拉伸的信息 key代表样式的结尾,value代表拉伸的方向
             _stretchinginfo = {
-                    "top": "cursor: n-resize; left: 0px; top: 0px; width: 100%; height: 5px;",
-                    "rightTop": "cursor: ne-resize; right: -2px; top: -2px; width: 12px; height: 12px;",
-                    "leftTop": "cursor: nw-resize; top: 0px; left: 0px; width: 12px; height: 12px;",
-                    "left": "cursor: w-resize; left: 0px; top: 0px; width: 5px; height: 100%;",
-                    "right": "cursor: e-resize; right: 0px; top: 0px; width: 5px; height: 100%;",
-                    "bottom": "cursor: s-resize; left: 0px; bottom: 0px; width: 100%; height: 5px;",
-                    "leftBottom": "cursor: sw-resize; left: -2px; bottom: -2px; width: 12px; height: 12px;",
-                    "rightBottom": "cursor: se-resize; right: -2px; bottom: -2px; width: 12px; height: 12px;"
-                }
-                //循环创建拉伸条,包含上、下、左、右、上左、下左、上右、下右
+                "top": "cursor: n-resize; left: 0px; top: 0px; width: 100%; height: 5px;",
+                "rightTop": "cursor: ne-resize; right: -2px; top: -2px; width: 12px; height: 12px;",
+                "leftTop": "cursor: nw-resize; top: 0px; left: 0px; width: 12px; height: 12px;",
+                "left": "cursor: w-resize; left: 0px; top: 0px; width: 5px; height: 100%;",
+                "right": "cursor: e-resize; right: 0px; top: 0px; width: 5px; height: 100%;",
+                "bottom": "cursor: s-resize; left: 0px; bottom: 0px; width: 100%; height: 5px;",
+                "leftBottom": "cursor: sw-resize; left: -2px; bottom: -2px; width: 12px; height: 12px;",
+                "rightBottom": "cursor: se-resize; right: -2px; bottom: -2px; width: 12px; height: 12px;"
+            }
+            //循环创建拉伸条,包含上、下、左、右、上左、下左、上右、下右
             for (i in _stretchinginfo) {
                 $$("div", {
                     "style": {
                         "cssText": "position: absolute; overflow: hidden; display: block; z-index: 10;" + _stretchinginfo[i]
                     },
-                    "onmousedown": U.UF.C.closure(function(scope, typename) {
+                    "onmousedown": U.UF.C.closure(function (scope, typename) {
                         //拉伸函数的调用
                         U.UF.F.stretching(_formel, typename, U.UF.C.apply(scope, scope.size));
                     }, [this, i])
@@ -257,15 +257,15 @@ U.UF.UI.form.prototype = {
                 },
                 "title": "点击关闭",
                 "onmousedown": U.UF.EV.stopBubble,
-                "onclick": U.UF.C.apply(this, function() {
+                "onclick": U.UF.C.apply(this, function () {
                     U.UF.F.closeWindow(this.form); //调用窗体关闭函数
                     try {
                         //关闭任务栏处理
                         if (U.MD.D.T.taskbar.close) {
                             U.MD.D.T.taskbar.close({ "forms": _formel });
-                            U.MD.N.urlWrite("", "智慧课堂平台");
+                            //U.MD.N.urlWrite("", "智慧课堂平台");
                         }
-                    } catch (e) {}
+                    } catch (e) { }
                     //回调处理
                     if (U.UF.C.isFunction(this.closecallback)) {
                         this.closecallback();
@@ -284,7 +284,7 @@ U.UF.UI.form.prototype = {
                 "title": "最大化",
                 "onmousedown": U.UF.EV.stopBubble,
                 //最大化点击事件处理
-                "onclick": function() {
+                "onclick": function () {
                     U.UF.F.windowZooming(_formel); //调用窗体最大化函数
                 }
             }, _headbottom);
@@ -292,7 +292,7 @@ U.UF.UI.form.prototype = {
             //如果有head头部的处理
             if (_headel) {
                 //头部双击放大缩小处理处理
-                _headel.ondblclick = U.UF.C.apply(_headel, function() {
+                _headel.ondblclick = U.UF.C.apply(_headel, function () {
                     //判断双击的元素是否在头部导航上,否则如果头部上有其他的按钮什么的双击了,也会触发放大方法
                     if (event.srcElement == this || U.UF.EL.isChild(this, event.srcElement)) {
                         _enlargeel.onclick(); //放大的处理
@@ -310,7 +310,7 @@ U.UF.UI.form.prototype = {
                 },
                 "title": "最小化",
                 "onmousedown": U.UF.EV.stopBubble,
-                "onclick": function() {
+                "onclick": function () {
                     U.UF.F.windowMinimize(_formel); //窗体最小化处理
                 }
             }, _headbottom);
@@ -338,12 +338,12 @@ U.UF.UI.form.prototype = {
     },
     /** 窗体每一次点击置顶
      */
-    top: function() {
+    top: function () {
         U.UF.F.topWindow(this.form); //点击置顶的处理
     },
     /** 窗体大小处理
      */
-    size: function() {
+    size: function () {
         var _headheight = 0; //head头部的高度
         //如果存在head头部,那么获取head头部处理
         if (this.header) {
@@ -360,7 +360,7 @@ U.UF.UI.form.prototype = {
 
 /** 窗体大小处理
  */
-U.UF.UI.form.windowResize = function() {
+U.UF.UI.form.windowResize = function () {
     var i,
         _style,
         _bodywidth = US.width, //获取原本在窗体大小没有变化前的width
@@ -370,7 +370,7 @@ U.UF.UI.form.windowResize = function() {
         _height, //高度
         _formel, //窗体元素
         _forms = U.UF.UI.form.allForm //获取所有的窗体
-    ;
+        ;
     //循环所有的窗体
     for (i in _forms) {
         _formel = _forms[i].form; //获取窗体的处理
@@ -399,7 +399,7 @@ U.UF.UI.form.windowResize = function() {
 
 /** 关闭所有的窗体
  */
-U.UF.UI.form.closeWindows = function() {
+U.UF.UI.form.closeWindows = function () {
     var i;
     for (i in U.UF.UI.form.allForm) {
         if (U.UF.UI.form.allForm[i].isclose) {

+ 1 - 1
js/Controls/index.js

@@ -2031,7 +2031,7 @@ U.UF.UI.form.prototype = {
                         //关闭任务栏处理
                         if (U.MD.D.T.taskbar.close) {
                             U.MD.D.T.taskbar.close({ "forms": _formel });
-                            U.MD.N.urlWrite("", "智慧课堂平台");
+                            //U.MD.N.urlWrite("", "智慧课堂平台");
                         }
                     } catch (e) { }
                     //回调处理

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1601 - 343
js/Desktop/DeskTop.js


+ 455 - 228
js/Desktop/Onload.js

@@ -313,6 +313,7 @@ U.MD.D.error = function (errorMessage, scripturi, linenumber, columnnumber, erro
 /**
  * 用户登录处理
  */
+let LoginState = false
 U.MD.D.getuser = function () {
     // $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gif/longhuaBg.gif")'
     var userInfo = US.userInfo;
@@ -330,136 +331,7 @@ U.MD.D.getuser = function () {
                                 $("#U_MD_HomeC_Pop")[0].close(); //关闭登陆
                             }
                             U.A.Request(US.Config.pbl + "selectUser?userid=" + _user.userid, [], function (res) { //US.userInfo.userid
-                                if (res.value == null || res.value[0].length == 0) {
-                                    // U.MD.D.I.openApplication("my")
-
-                                    let _name = US.userInfo.alias ? US.userInfo.alias : US.userInfo.username
-                                    let _type = US.userInfo == 1 ? 2 : 1
-                                    // US.Config.pbl
-                                    // "http://localhost:7003/api/pbl/"
-                                    U.A.Request(US.Config.pbl + "updatePblMessage", [_user.userid, _name, _type, '16d397f3-b192-11ed-9211-005056b86db5', '', '', "0"], function (res) {
-                                        window.location.reload();
-                                    }, [], { "type": "POST", "withCredentials": true });
-                                } else {
-                                    U.A.Request(US.Config.pbl + "addLoginOperation", [_user.userid], function (res) {
-                                    }, [], { "type": "POST", "withCredentials": true });
-
-                                    if (res.value[0][0].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")'
-                                    } else if (res.value[0][0].organizeid == 'c7df0bd4-6e75-401a-a137-4e163aa62263') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhongshanBg.png")'
-                                        US.Config.background = 'url("/img/icon/zhongshanBg.png")'
-                                    } else if (res.value[0][0].organizeid == '580aac24-a939-49f7-a75a-40a7b5af3a17') {
-                                        // $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longweiBg.png")'
-                                    } else if (res.value[0][0].organizeid == 'b1095a3c-1d06-4ac8-854f-7c0d97f4ab41') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yunhaiBg.jpg")'
-                                        US.Config.background = 'url("/img/icon/yunhaiBg.png")'
-                                    } else if (res.value[0][0].organizeid == '857af1c7-c8ee-4b04-85b5-fd182903adb7') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/beijingBg.png")'
-                                        US.Config.background = 'url("/img/icon/beijingBg.png")'
-                                    } else if (res.value[0][0].organizeid == '69893dca-1d47-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/weilaiBg.png")'
-                                        US.Config.background = 'url("/img/icon/weilaiBg.png")'
-                                    } else if (res.value[0][0].organizeid == 'efdef564-4064-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/pz.jpg")'
-                                        US.Config.background = 'url("/img/icon/pz.png")'
-                                    } else if (res.value[0][0].organizeid == 'd9db3320-503a-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/hzBg.png")'
-                                        US.Config.background = 'url("/img/icon/hzBg.png")'
-                                    } else if (res.value[0][0].organizeid == 'ccb9754d-59c1-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
-                                        US.Config.background = 'url("/img/icon/nanfangBg.png")'
-                                    } else if (res.value[0][0].organizeid == 'f30a6615-5379-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaBg.png")'
-                                        US.Config.background = 'url("/img/icon/longhuaBg.png")'
-                                    } else if (res.value[0][0].organizeid == '4787cc87-6588-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
-                                        US.Config.background = 'url("/img/icon/nanfangBg.png")'
-                                    } else if (res.value[0][0].organizeid == '9f888eae-7558-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/song.png")'
-                                        US.Config.background = 'url("/img/icon/song.png")'
-                                    } else if (res.value[0][0].organizeid == '2b9ceb66-a1dd-11ed-b13d-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gmxxBg.png")'
-                                        US.Config.background = 'url("/img/icon/gmxxBg.png")'
-                                    } else if (res.value[0][0].organizeid == '1c3b9def-8fbe-11ed-b13d-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/wankeBg.png")'
-                                        US.Config.background = 'url("/img/icon/wankeBg.png")'
-                                    } else if (res.value[0][0].organizeid == '82fcb5c7-c13b-11ed-8d51-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/qiaoxiangBg.png")'
-                                        US.Config.background = 'url("/img/icon/qiaoxiangBg.png")'
-                                    } else if (res.value[0][0].organizeid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/sies.png")'
-                                        US.Config.background = 'url("/img/icon/sies.png")'
-                                    } else if (res.value[0][0].organizeid == 'ea2a8c65-f38c-11ed-91d8-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaZXBg.png")'
-                                        US.Config.background = 'url("/img/icon/longhuaZXBg.png")'
-                                    }
-                                    
-                                    
-
-                                    if (res.value[0][0].org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yantianOrgBg.png")'
-                                        US.Config.background = 'url("/img/icon/yantianOrgBg.png")'
-                                    } else if (res.value[0][0].org == '7ada499f-4ec7-11ed-8c78-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/csteamBg.png")'
-                                        US.Config.background = 'url("/img/icon/csteamBg.png")'
-                                    } else if (res.value[0][0].org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gm/bg.png")'
-                                        US.Config.background = 'url("/img/icon/bg.png")'
-                                        U.MD.D.getNotice();
-                                    } else if (res.value[0][0].org == '97c4ee8b-d010-4042-986d-e9d3c217264f') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhoujia.jpg")'
-                                        US.Config.background = 'url("/img/icon/zhoujia.png")'
-                                    } else if (res.value[0][0].org == '150e3120-9195-11ed-b13d-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/tencentBg.jpg")'
-                                        US.Config.background = 'url("/img/icon/tencentBg.png")'
-                                        U.MD.D.getNotice();
-                                    } else if (res.value[0][0].org == 'ee40e8e3-e36c-4872-8105-cf395481012s') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szscBg.png")'
-                                        US.Config.background = 'url("/img/icon/szscBg.png")'
-                                        U.MD.D.getNotice();
-                                    } else if (res.value[0][0].org == 'ec0af97a-7c10-4259-a7eb-db9cc8174cdc') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/futianBg.png")'
-                                        US.Config.background = 'url("/img/icon/futianBg.png")'
-                                    } else if (res.value[0][0].org == 'e632b86c-f89d-11ed-91d8-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gdjgBg.png")'
-                                        US.Config.background = 'url("/img/icon/gdjgBg.png")'
-                                    } else if (res.value[0][0].org == '54f09f1e-09f0-11ee-91d8-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szlhyjBg.jpeg")'
-                                        US.Config.background = 'url("/img/icon/szlhyjBg.jpeg")'
-                                    } else if (res.value[0][0].org == '7b016f69-0f4f-11ee-91d8-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/dseiBg.png")'
-                                        US.Config.background = 'url("/img/icon/dseiBg.png")'
-                                    } else if (res.value[0][0].org == '1973f6c7-1561-11ee-91d8-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szjkyBg2.png")'
-                                        US.Config.background = 'url("/img/icon/szjkyBg2.png")'
-                                    } else if (res.value[0][0].org == '2fa75e51-189a-11ee-91d8-005056b86db5') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/chjyjBg.png")'
-                                        US.Config.background = 'url("/img/icon/chjyjBg.png")'
-                                    } else if (res.value[0][0].org == '2a9f32ea-88df-49eb-aba1-0a286f691474') {
-                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/qhBg.jpg")'
-                                        US.Config.background = 'url("/img/icon/qhBg.jpg")'
-                                    }
-                            
-                                    
-                                    US.userInfo = res.value[0][0];
-                                    $(".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'){
-                                        $(".U_PBL_Check")[0].style.display = "block";
-                                    }
-                                }
-                                $(".login")[0].style.display = "none";
-                                $(".register")[0].style.display = "none";
-                                $(".userName")[0].style.display = "block";
-                                $(".userName")[0].innerHTML = US.userInfo.username || US.userInfo.alias;
-                                $(".exit")[0].style.display = "block";
-                                if(res.value[0][0].type === 1 && res.value[0][0].org == 'c95e0a56-c205-11ed-8d51-005056b86db5'){
-                                    U.MD.D.I.ModeCheck(2)
-                                }else{
-                                    U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0], 1);
-                                }
-                                U.MD.O.P.connect(); //登录成功后连接socket服务同步协同编辑
+                                loginSet(res.value[0][0], res)
                             }, [], { "type": "GET", "withCredentials": true });
                         }
 
@@ -467,6 +339,140 @@ U.MD.D.getuser = function () {
                 }
             }, [], { "type": "GET", "withCredentials": true });
         }
+    }else if(!LoginState &&Object.keys(userInfo).length === 0 && U.UF.C.queryString('code').length === 32){
+        if($("#U_MD_HomeC_Pop")[0]){
+            $("#U_MD_HomeC_Pop")[0].close()
+        }
+        LoginState = true
+        // console.log('新华跳转',U.UF.C.queryString('code'))
+        let url = "https://cloud.cocorobo.cn/api/getTeacherInfoByCode"
+        var myHeaders = new Headers();
+        // myHeaders.append("User-Agent", "Apifox/1.0.0 (https://apifox.com)");
+        myHeaders.append("Content-Type", "application/json");
+        // myHeaders.append("Access-Control-Allow-Origin","*")
+
+        var raw = JSON.stringify({
+            "code": U.UF.C.queryString('code')
+        });
+
+        var requestOptions = {
+            method: 'POST',
+            headers: myHeaders,
+            body: raw,
+            redirect: 'follow'
+        };
+
+        fetch(url, requestOptions)
+        .then(response => response.text())
+        .then(result => {
+            // console.log(result)
+            let data = JSON.parse(result).data
+            if(JSON.parse(result).code == 200){
+                let diqu = `${data.province}-${data.city}-${data.county}-${data.street}-${data.schoolName}`
+                let diquId = data.schoolId
+                U.A.Request(US.Config.pbl + "batchRegistrationSzdjg3", [data.realName, data.userUniqueId+"@xhly.com", 'a5efd078-20f6-4185-bef9-6d1c688bee70', data.schoolName || "", "", "", 1, data.userUniqueId,diqu,diquId], function (res) {
+                    // console.log(res);
+                    let loginData = JSON.stringify({
+                        openid: data.userUniqueId,
+                        edu: true
+                    })
+                    var requestOptionsLogin = {
+                        method: 'POST',
+                        headers: myHeaders,
+                        body: loginData,
+                        redirect: 'follow'
+                     };
+                     
+                     fetch("https://beta.api.cocorobo.cn/api/user", requestOptionsLogin)
+                        .then(response => response.text())
+                        .then(result => {
+                            let a = JSON.parse(result)
+                            if(a.length>0){
+                                let userId = a[0][0].userid
+                                US.userInfo.userid = userId
+                                U.A.Request(US.Config.pbl + "selectUser?userid=" + userId, [], function (res) { //US.userInfo.userid
+                                    loginSet(res.value[0][0], res)
+                                }, [], { "type": "GET", "withCredentials": true });
+                            }
+                            
+                        })
+                        .catch(error => {
+                            LoginState = false
+                            console.log('error', error)
+                        });
+                    
+                }, [], { "type": "POST", "withCredentials": true })
+            }else{
+                U.Alert("用户登录已失效,请重新获取登录信息!");
+            }
+        })
+        .catch(error => {
+            LoginState = false
+            console.log('error', error)
+        });
+    }else if(!LoginState &&Object.keys(userInfo).length === 0 && U.UF.C.queryString('code').length < 32 && U.UF.C.queryString('code').length > 9){
+        if($("#U_MD_HomeC_Pop")[0]){
+            $("#U_MD_HomeC_Pop")[0].close()
+        }
+        LoginState = true
+        let url = "https:" + US.Config.pbl + "luohugetTeacherInfo?code=" + encodeURIComponent(U.UF.C.queryString('code'));
+        var myHeaders = new Headers();
+        myHeaders.append("Content-Type", "application/json");
+
+        var requestOptions = {
+            method: 'GET',
+            redirect: 'follow'
+        };
+
+        fetch(url, requestOptions)
+        .then(response => response.text())
+        .then(result => {
+            // console.log(result)
+            let data = JSON.parse(result).data
+            // return
+            if(JSON.parse(result).code == 0){
+                let diqu = ``
+                let diquId = data.loginid
+                U.A.Request(US.Config.pbl + "batchRegistrationSzdjg3", [data.empname, data.loginid+"@luohu.com", 'c05b87d3-3d8e-4415-9dba-f3deccac4822', data.schoolname || "", data.mobile, "", data.identity === 1 ? 1 : 2, data.loginid,diqu,diquId], function (res) {
+                    // console.log(res);
+                    let loginData = JSON.stringify({
+                        openid: data.loginid,
+                        edu: true
+                    })
+                    var requestOptionsLogin = {
+                        method: 'POST',
+                        headers: myHeaders,
+                        body: loginData,
+                        redirect: 'follow'
+                     };
+                     
+                     fetch("https://beta.api.cocorobo.cn/api/user", requestOptionsLogin)
+                        .then(response => response.text())
+                        .then(result => {
+                            let a = JSON.parse(result)
+                            if(a.length>0){
+                                let userId = a[0][0].userid
+                                US.userInfo.userid = userId
+                                U.A.Request(US.Config.pbl + "selectUser?userid=" + userId, [], function (res) { //US.userInfo.userid
+                                    loginSet(res.value[0][0], res)
+                                }, [], { "type": "GET", "withCredentials": true });
+                            }
+                            
+                        })
+                        .catch(error => {
+                            LoginState = false
+                            console.log('error', error)
+                        });
+                    
+                }, [], { "type": "POST", "withCredentials": true })
+            }else{
+                U.Alert("用户登录已失效,请重新获取登录信息!");
+            }
+        })
+        .catch(error => {
+            LoginState = false
+            console.log('error', error)
+        });
     } else if(Object.keys(userInfo).length !== 0){
         if(US.Config.type == '2'){
             $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/easyBg.png")'
@@ -513,8 +519,10 @@ U.MD.D.getuser = function () {
                 $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/sies.png")'
             } else if (userInfo.organizeid == 'ea2a8c65-f38c-11ed-91d8-005056b86db5') {
                 $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaZXBg.png")'
+            } else if (userInfo.organizeid == 'f297fbdc-f0a0-11ee-b534-005056b86db5') {
+                $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/010606.png")'
             }
-    
+            
             if (userInfo.org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d') {
                 $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yantianOrgBg.png")'
             } else if (userInfo.org == '7ada499f-4ec7-11ed-8c78-005056b86db5') {
@@ -558,6 +566,12 @@ U.MD.D.getuser = function () {
                 $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/chjyjBg.png")'
             } else if (userInfo.org == '2a9f32ea-88df-49eb-aba1-0a286f691474') {
                 $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/qhBg.jpg")'
+            } else if (userInfo.org == '884c5665-a453-46f3-b7b6-01d575290aa9') {
+                $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/scnuaiBg.png")'
+            } else if (userInfo.org == '2fe1a080-4425-4620-b7a0-be2f3750ffd4') {
+                $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/x010607bgImg.png")'
+            } else if (userInfo.org == 'ec84034b-8ea4-4d27-9cba-1adcb4720bb3') {
+                $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/SPROUTLabBg.png")'
             }
         }
     }
@@ -576,102 +590,7 @@ U.MD.D.getuser2 = function (userid, cid) {
         if ($("#U_MD_HomeC_Pop")[0]) {
             $("#U_MD_HomeC_Pop")[0].close(); //关闭登陆
         }
-        U.A.Request(US.Config.pbl + "addLoginOperation", [userid], function (res) {
-        }, [], { "type": "POST", "withCredentials": true });
-
-        if (res.value[0][0].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")'
-        } else if (res.value[0][0].organizeid == 'c7df0bd4-6e75-401a-a137-4e163aa62263') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhongshanBg.png")'
-            US.Config.background = 'url("/img/icon/zhongshanBg.png")'
-        } else if (res.value[0][0].organizeid == '580aac24-a939-49f7-a75a-40a7b5af3a17') {
-            // $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longweiBg.png")'
-        } else if (res.value[0][0].organizeid == 'b1095a3c-1d06-4ac8-854f-7c0d97f4ab41') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yunhaiBg.jpg")'
-            US.Config.background = 'url("/img/icon/yunhaiBg.png")'
-        } else if (res.value[0][0].organizeid == '857af1c7-c8ee-4b04-85b5-fd182903adb7') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/beijingBg.png")'
-            US.Config.background = 'url("/img/icon/beijingBg.png")'
-        } else if (res.value[0][0].organizeid == '69893dca-1d47-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/weilaiBg.png")'
-            US.Config.background = 'url("/img/icon/weilaiBg.png")'
-        } else if (res.value[0][0].organizeid == 'efdef564-4064-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/pz.jpg")'
-            US.Config.background = 'url("/img/icon/pz.png")'
-        } else if (res.value[0][0].organizeid == 'd9db3320-503a-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/hzBg.png")'
-            US.Config.background = 'url("/img/icon/hzBg.png")'
-        } else if (res.value[0][0].organizeid == 'ccb9754d-59c1-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
-            US.Config.background = 'url("/img/icon/nanfangBg.png")'
-        } else if (res.value[0][0].organizeid == 'f30a6615-5379-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaBg.png")'
-            US.Config.background = 'url("/img/icon/longhuaBg.png")'
-        } else if (res.value[0][0].organizeid == '4787cc87-6588-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
-            US.Config.background = 'url("/img/icon/nanfangBg.png")'
-        } else if (res.value[0][0].organizeid == '9f888eae-7558-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/song.png")'
-            US.Config.background = 'url("/img/icon/song.png")'
-        } else if (res.value[0][0].organizeid == '2b9ceb66-a1dd-11ed-b13d-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gmxxBg.png")'
-            US.Config.background = 'url("/img/icon/gmxxBg.png")'
-        } else if (res.value[0][0].organizeid == '1c3b9def-8fbe-11ed-b13d-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/wankeBg.png")'
-            US.Config.background = 'url("/img/icon/wankeBg.png")'
-        } else if (res.value[0][0].organizeid == '82fcb5c7-c13b-11ed-8d51-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/qiaoxiangBg.png")'
-            US.Config.background = 'url("/img/icon/qiaoxiangBg.png")'
-        } else if (res.value[0][0].organizeid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/sies.png")'
-        } else if (res.value[0][0].organizeid == 'ea2a8c65-f38c-11ed-91d8-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaZXBg.png")'
-        }
-
-        if (res.value[0][0].org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yantianOrgBg.png")'
-            US.Config.background = 'url("/img/icon/yantianOrgBg.png")'
-        } else if (res.value[0][0].org == '7ada499f-4ec7-11ed-8c78-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/csteamBg.png")'
-            US.Config.background = 'url("/img/icon/csteamBg.png")'
-        } else if (res.value[0][0].org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gm/bg.png")'
-            US.Config.background = 'url("/img/icon/bg.png")'
-            U.MD.D.getNotice();
-        } else if (res.value[0][0].org == '97c4ee8b-d010-4042-986d-e9d3c217264f') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhoujia.jpg")'
-            US.Config.background = 'url("/img/icon/zhoujia.png")'
-        } else if (res.value[0][0].org == '150e3120-9195-11ed-b13d-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/tencentBg.jpg")'
-            US.Config.background = 'url("/img/icon/tencentBg.png")'
-            U.MD.D.getNotice();
-        } else if (res.value[0][0].org == 'ee40e8e3-e36c-4872-8105-cf395481012s') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szscBg.png")'
-            US.Config.background = 'url("/img/icon/szscBg.png")'
-            U.MD.D.getNotice();
-        } else if (res.value[0][0].org == 'ec0af97a-7c10-4259-a7eb-db9cc8174cdc') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/futianBg.png")'
-            US.Config.background = 'url("/img/icon/futianBg.png")'
-        } else if (res.value[0][0].org == 'e632b86c-f89d-11ed-91d8-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gdjgBg.png")'
-            US.Config.background = 'url("/img/icon/gdjgBg.png")'
-        } else if (res.value[0][0].org == '54f09f1e-09f0-11ee-91d8-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szlhyjBg.jpeg")'
-            US.Config.background = 'url("/img/icon/szlhyjBg.jpeg")'
-        } else if (res.value[0][0].org == '7b016f69-0f4f-11ee-91d8-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/dseiBg.png")'
-            US.Config.background = 'url("/img/icon/dseiBg.png")'
-        } else if (res.value[0][0].org == '1973f6c7-1561-11ee-91d8-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szjkyBg2.png")'
-            US.Config.background = 'url("/img/icon/szjkyBg2.png")'
-        } else if (res.value[0][0].org == '2fa75e51-189a-11ee-91d8-005056b86db5') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/chjyjBg.png")'
-            US.Config.background = 'url("/img/icon/chjyjBg.png")'
-        } else if (res.value[0][0].org == '2a9f32ea-88df-49eb-aba1-0a286f691474') {
-            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/qhBg.jpg")'
-            US.Config.background = 'url("/img/icon/qhBg.jpg")'
-        }
+        loginPan(res.value[0][0], userid)
 
         US.userInfo = res.value[0][0];
         $(".avatar")[0].style.display = "block";
@@ -683,13 +602,25 @@ U.MD.D.getuser2 = function (userid, cid) {
         $(".userName")[0].style.display = "block";
         $(".userName")[0].innerHTML = US.userInfo.username || US.userInfo.alias;
         $(".exit")[0].style.display = "block";
+        let _vipbox = $('.U_MD_D_BD_vip_box')[0]
+        _vipbox && (_vipbox.style.right = $(".U_MD_D_BD")[0].offsetWidth + 20 + 'px')
         if(res.value[0][0].type === 1 && res.value[0][0].org == 'c95e0a56-c205-11ed-8d51-005056b86db5'){
             U.MD.D.I.ModeCheck(2)
         }else{
             U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0], 1);
         }
+        if(res.value[0][0].type === 1 && window.location.hash.indexOf('project') != -1){
+            U.MD.D.I.openApplication("project")
+        }
+        if(res.value[0][0].type === 1 && window.location.hash.indexOf('study') != -1){
+            U.MD.D.I.openApplication("study")
+        }
+        if(res.value[0][0].type === 2 && window.location.hash.indexOf('study') != -1){
+            U.MD.D.I.openApplication("studentStudy")
+        }
         U.MD.O.P.connect(); //登录成功后连接socket服务同步协同编辑
         U.MD.D.I.openInApplication("studyDetail", cid, 2, 2)
+        U.MD.D.I.openInApplication("studyDetail", cid, 2, 2)
     }, [], { "type": "GET", "withCredentials": true });
 }
 
@@ -813,4 +744,300 @@ U.MD.D.getNotice = function () {
 //  // 在视频播放完成后删除 video 元素
 //  video.addEventListener("ended", () => {
 //    document.body.removeChild(video);
-//  });
+//  });
+
+
+function formatDate(_date) {
+    let time = _date.replace(/-/g, '/')
+    let date = new Date(time);
+
+    const year = date.getFullYear();
+    const month = (date.getMonth() + 1).toString().padStart(2, "0");
+    const day = date.getDate().toString().padStart(2, "0");
+    const hours = date.getHours().toString().padStart(2, "0");
+    const minutes = date.getMinutes().toString().padStart(2, "0");
+    const seconds = date.getSeconds().toString().padStart(2, "0");
+
+    return `${year}年${month}月${day}日`;
+}
+
+function formatDate2(_date) {
+    let date = _date;
+
+    const year = date.getFullYear();
+    const month = (date.getMonth() + 1).toString().padStart(2, "0");
+    const day = date.getDate().toString().padStart(2, "0");
+    const hours = date.getHours().toString().padStart(2, "0");
+    const minutes = date.getMinutes().toString().padStart(2, "0");
+    const seconds = date.getSeconds().toString().padStart(2, "0");
+
+    return `${year}年${month}月${day}日`;
+}
+
+
+
+function loginPan(userInfo, userId) {
+  const currentDate = new Date();
+
+  // 判断 isLogin1 和 isLogin2 是否为 2 或者是否过期(且过期时间是有效的日期格式)
+  if (
+    userInfo.isLogin1 == 2 ||
+    (userInfo.isLogin1 &&
+      userInfo.isLogin1 != 1 &&
+      userInfo.isLogin1 != 2 &&
+      new Date(userInfo.isLogin1) < currentDate) ||
+    userInfo.isLogin2 == 2 ||
+    (userInfo.isLogin2 != 1 &&
+      userInfo.isLogin2 != 2 &&
+      new Date(userInfo.isLogin2) < currentDate) ||
+    userInfo.state != 1
+  ) {
+    U.MD.U.LO.logoutSystem2();
+    return;
+  }
+
+  let vipbox = $(".U_MD_D_BD_vip_box")[0];
+  vipbox && (vipbox.style.display = "block");
+  let vip_time = $(".vip_time")[0];
+  let vtime = "";
+  let vMember = "基础用户";
+  // 获取 isLogin1 和 isLogin2 的值
+  let isLogin1 = userInfo.isLogin1;
+  let isLogin2 = userInfo.isLogin2;
+
+  if (isLogin2 != 1 && isLogin2 != null) {
+    vtime = formatDate(isLogin2);
+    vMember = "高级用户";
+  } else if (isLogin1 != 1 && isLogin1 != null) {
+    vtime = formatDate(isLogin1);
+    vMember = "高级用户";
+  } else if (
+    (isLogin1 == 1 && isLogin2 == 1) ||
+    (isLogin1 == null && isLogin2 == 1)
+  ) {
+    vtime = formatDate2(new Date(currentDate.setFullYear(currentDate.getFullYear() + 1)));
+    vMember = "基础用户";
+  }
+  vip_time && (vip_time.innerHTML = vtime);
+  let orgName = userInfo.orgName;
+  let schoolName = userInfo.schoolName;
+  let vip_school = $(".vip_school")[0];
+  vip_school && (vip_school.innerHTML = orgName ? orgName : schoolName);
+  let vip_member = $(".vip_member")[0];
+  vip_member && (vip_member.innerHTML = vMember);
+
+  U.A.Request(
+    US.Config.pbl + "addLoginOperation",
+    [userId],
+    function (res) {},
+    [],
+    { 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")';
+  } else if (
+    userInfo.organizeid == "c7df0bd4-6e75-401a-a137-4e163aa62263"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage =
+      'url("/img/icon/zhongshanBg.png")';
+    US.Config.background = 'url("/img/icon/zhongshanBg.png")';
+  } else if (
+    userInfo.organizeid == "580aac24-a939-49f7-a75a-40a7b5af3a17"
+  ) {
+    // $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longweiBg.png")'
+  } else if (
+    userInfo.organizeid == "b1095a3c-1d06-4ac8-854f-7c0d97f4ab41"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yunhaiBg.jpg")';
+    US.Config.background = 'url("/img/icon/yunhaiBg.png")';
+  } else if (
+    userInfo.organizeid == "857af1c7-c8ee-4b04-85b5-fd182903adb7"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/beijingBg.png")';
+    US.Config.background = 'url("/img/icon/beijingBg.png")';
+  } else if (
+    userInfo.organizeid == "69893dca-1d47-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/weilaiBg.png")';
+    US.Config.background = 'url("/img/icon/weilaiBg.png")';
+  } else if (
+    userInfo.organizeid == "efdef564-4064-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/pz.jpg")';
+    US.Config.background = 'url("/img/icon/pz.png")';
+  } else if (
+    userInfo.organizeid == "d9db3320-503a-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/hzBg.png")';
+    US.Config.background = 'url("/img/icon/hzBg.png")';
+  } else if (
+    userInfo.organizeid == "ccb9754d-59c1-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")';
+    US.Config.background = 'url("/img/icon/nanfangBg.png")';
+  } else if (
+    userInfo.organizeid == "f30a6615-5379-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaBg.png")';
+    US.Config.background = 'url("/img/icon/longhuaBg.png")';
+  } else if (
+    userInfo.organizeid == "4787cc87-6588-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")';
+    US.Config.background = 'url("/img/icon/nanfangBg.png")';
+  } else if (
+    userInfo.organizeid == "9f888eae-7558-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/song.png")';
+    US.Config.background = 'url("/img/icon/song.png")';
+  } else if (
+    userInfo.organizeid == "2b9ceb66-a1dd-11ed-b13d-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gmxxBg.png")';
+    US.Config.background = 'url("/img/icon/gmxxBg.png")';
+  } else if (
+    userInfo.organizeid == "1c3b9def-8fbe-11ed-b13d-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/wankeBg.png")';
+    US.Config.background = 'url("/img/icon/wankeBg.png")';
+  } else if (
+    userInfo.organizeid == "82fcb5c7-c13b-11ed-8d51-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage =
+      'url("/img/icon/qiaoxiangBg.png")';
+    US.Config.background = 'url("/img/icon/qiaoxiangBg.png")';
+  } else if (
+    userInfo.organizeid == "4c686762-1d0a-11ed-8c78-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/sies.png")';
+    US.Config.background = 'url("/img/icon/sies.png")';
+  } else if (
+    userInfo.organizeid == "ea2a8c65-f38c-11ed-91d8-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage =
+      'url("/img/icon/longhuaZXBg.png")';
+    US.Config.background = 'url("/img/icon/longhuaZXBg.png")';
+  } else if (
+    userInfo.organizeid == "f297fbdc-f0a0-11ee-b534-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/010606.png")';
+    US.Config.background = 'url("/img/icon/010606.png")';
+  } else if (
+    userInfo.organizeid == "e5cdf6b8-abdc-11ef-b887-005056b86db5"
+  ) {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/Tianyuan.png")';
+    US.Config.background = 'url("/img/icon/Tianyuan.png")';
+  }
+
+  if (userInfo.org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d") {
+    $("#U_MD_D_BG")[0].style.backgroundImage =
+      'url("/img/icon/yantianOrgBg.png")';
+    US.Config.background = 'url("/img/icon/yantianOrgBg.png")';
+  } else if (userInfo.org == "7ada499f-4ec7-11ed-8c78-005056b86db5") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/csteamBg.png")';
+    US.Config.background = 'url("/img/icon/csteamBg.png")';
+  } else if (userInfo.org == "eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gm/bg.png")';
+    US.Config.background = 'url("/img/icon/bg.png")';
+    U.MD.D.getNotice();
+  } else if (userInfo.org == "97c4ee8b-d010-4042-986d-e9d3c217264f") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhoujia.jpg")';
+    US.Config.background = 'url("/img/icon/zhoujia.png")';
+  } else if (userInfo.org == "150e3120-9195-11ed-b13d-005056b86db5") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/tencentBg.jpg")';
+    US.Config.background = 'url("/img/icon/tencentBg.png")';
+    U.MD.D.getNotice();
+  } else if (userInfo.org == "ee40e8e3-e36c-4872-8105-cf395481012s") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szscBg.png")';
+    US.Config.background = 'url("/img/icon/szscBg.png")';
+    U.MD.D.getNotice();
+  } else if (userInfo.org == "ec0af97a-7c10-4259-a7eb-db9cc8174cdc") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/futianBg.png")';
+    US.Config.background = 'url("/img/icon/futianBg.png")';
+  } else if (userInfo.org == "e632b86c-f89d-11ed-91d8-005056b86db5") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gdjgBg.png")';
+    US.Config.background = 'url("/img/icon/gdjgBg.png")';
+  } else if (userInfo.org == "54f09f1e-09f0-11ee-91d8-005056b86db5") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szlhyjBg.jpeg")';
+    US.Config.background = 'url("/img/icon/szlhyjBg.jpeg")';
+  } else if (userInfo.org == "7b016f69-0f4f-11ee-91d8-005056b86db5") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/dseiBg.png")';
+    US.Config.background = 'url("/img/icon/dseiBg.png")';
+  } else if (userInfo.org == "1973f6c7-1561-11ee-91d8-005056b86db5") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szjkyBg2.png")';
+    US.Config.background = 'url("/img/icon/szjkyBg2.png")';
+  } else if (userInfo.org == "2fa75e51-189a-11ee-91d8-005056b86db5") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/chjyjBg.png")';
+    US.Config.background = 'url("/img/icon/chjyjBg.png")';
+  } else if (userInfo.org == "2a9f32ea-88df-49eb-aba1-0a286f691474") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/qhBg.jpg")';
+    US.Config.background = 'url("/img/icon/qhBg.jpg")';
+  } else if (userInfo.org == "884c5665-a453-46f3-b7b6-01d575290aa9") {
+    $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/scnuaiBg.png")';
+    US.Config.background = 'url("/img/icon/scnuaiBg.png")';
+  } else if (userInfo.org == "2fe1a080-4425-4620-b7a0-be2f3750ffd4") {
+    $("#U_MD_D_BG")[0].style.backgroundImage =
+      'url("/img/icon/x010607bgImg.png")';
+    US.Config.background = 'url("/img/icon/x010607bgImg.png")';
+  } else if (userInfo.org == "ec84034b-8ea4-4d27-9cba-1adcb4720bb3") {
+    $("#U_MD_D_BG")[0].style.backgroundImage =
+      'url("/img/icon/SPROUTLabBg.png")';
+    US.Config.background = 'url("/img/icon/SPROUTLabBg.png")';
+  }
+
+  US.userInfo = userInfo;
+  $(".avatar")[0].style.display = "block";
+  if (
+    userInfo.type === 1 &&
+    $(".U_PBL_Check")[0] &&
+    userInfo.org != "150e3120-9195-11ed-b13d-005056b86db5"
+  ) {
+    $(".U_PBL_Check")[0].style.display = "block";
+  }
+}
+
+function loginSet(userInfo, res){
+    let userId = userInfo.userid
+    if (res.value == null || res.value[0].length == 0) {
+        // U.MD.D.I.openApplication("my")
+
+        let _name = US.userInfo.alias ? US.userInfo.alias : US.userInfo.username
+        let _type = US.userInfo == 1 ? 2 : 1
+        // US.Config.pbl
+        // "http://localhost:7003/api/pbl/"
+        U.A.Request(US.Config.pbl + "updatePblMessage", [userId, _name, _type, '16d397f3-b192-11ed-9211-005056b86db5', '', '', "0"], function (res) {
+            window.location.reload();
+        }, [], { "type": "POST", "withCredentials": true });
+    } else {
+        loginPan(userInfo, userId)
+    }
+    $(".login")[0].style.display = "none";
+    $(".register")[0].style.display = "none";
+    $(".userName")[0].style.display = "block";
+    $(".userName")[0].innerHTML = US.userInfo.username || US.userInfo.alias;
+    $(".exit")[0].style.display = "block";
+    let _vipbox = $('.U_MD_D_BD_vip_box')[0]
+    _vipbox && (_vipbox.style.right = $(".U_MD_D_BD")[0].offsetWidth + 20 + 'px')
+    if(userInfo.type === 1 && userInfo.org == 'c95e0a56-c205-11ed-8d51-005056b86db5'){
+        U.MD.D.I.ModeCheck(2)
+    }else{
+        U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0], 1);
+    }
+    let shareCourseId = window.location.href.indexOf("?shareCourseId=")!=-1?window.location.href.split("?shareCourseId=")[1].toString():''
+    if(shareCourseId){
+        console.log(shareCourseId);
+        U.MD.D.I.openInApplication("studyDetail", shareCourseId, 5, 1)
+    }
+    if(userInfo.type === 1 && window.location.hash.indexOf('project') != -1){
+        U.MD.D.I.openApplication("project")
+    }
+    if(userInfo.type === 1 && window.location.hash.indexOf('study') != -1){
+        U.MD.D.I.openApplication("study")
+    }
+    if(userInfo.type === 2 && window.location.hash.indexOf('study') != -1){
+        U.MD.D.I.openApplication("studentStudy")
+    }
+    U.MD.O.P.connect(); //登录成功后连接socket服务同步协同编辑
+}

+ 4 - 4
node/message.js

@@ -957,11 +957,11 @@ us.updatecscl = function (messageInfo, classId, ty) {
         catch (e) {
 
         }
-        //每次修改每隔五秒保存一次数据,防止数据操作频繁导致数据库太卡
-        us.savecscltime = setTimeout(function () {
-            us.mysql.usselect(['172.16.12.5', 'pbl', 'updateRoomData', JSON.stringify(_obj), classId], function (ret) { });
-        }, 5000)
     }
+    //每次修改每隔五秒保存一次数据,防止数据操作频繁导致数据库太卡
+    us.savecscltime = setTimeout(function () {
+        us.mysql.usselect(['172.16.12.5', 'pbl', 'updateRoomData', JSON.stringify(_obj), classId], function (ret) { });
+    }, 5000)
 }
 
 /**

+ 8 - 0
szdjg/Onload.js

@@ -442,6 +442,9 @@ U.MD.D.getuser = function () {
                                     } else if (res.value[0][0].org == '2fa75e51-189a-11ee-91d8-005056b86db5') {
                                         $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/chjyjBg.png")'
                                         US.Config.background = 'url("/img/icon/chjyjBg.png")'
+                                    } else if (res.value[0][0].org == 'ec84034b-8ea4-4d27-9cba-1adcb4720bb3') {
+                                        $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/SPROUTLabBg.png")'
+                                        US.Config.background = 'url("/img/icon/SPROUTLabBg.png")'
                                     }
                             
                                     
@@ -564,6 +567,8 @@ U.MD.D.getuser = function () {
                 $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/szjkyBg2.png")'
             } else if (userInfo.org == '2fa75e51-189a-11ee-91d8-005056b86db5') {
                 $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/chjyjBg.png")'
+            } else if (userInfo.org == 'ec84034b-8ea4-4d27-9cba-1adcb4720bb3') {
+                $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/SPROUTLabBg.png")'
             }
         }
     }
@@ -677,6 +682,9 @@ U.MD.D.getuser2 = function (userid, cid) {
         } else if (res.value[0][0].org == '2fa75e51-189a-11ee-91d8-005056b86db5') {
             $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/chjyjBg.png")'
             US.Config.background = 'url("/img/icon/chjyjBg.png")'
+        } else if (res.value[0][0].org == 'ec84034b-8ea4-4d27-9cba-1adcb4720bb3') {
+            $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/SPROUTLabBg.png")'
+            US.Config.background = 'url("/img/icon/SPROUTLabBg.png")'
         }
 
         US.userInfo = res.value[0][0];

+ 23 - 0
uform.js

@@ -11971,6 +11971,29 @@ U.MD.U.LO.logoutSystem = function (callback) {
     }
 }
 
+/**
+* 禁止登录 执行推出
+*
+* @param callback {function} 登出回调函数
+*/
+U.MD.U.LO.logoutSystem2 = function (callback) {
+    //如果用户登录的情况
+    if (US.userInfo.userid) {
+        //弹出退出登录的提示
+        // U.UF.UI.confirm("是否退出" + US.userInfo.username + "账号", function () {
+        U.alert("您的账号已超过使用期限!")
+        U.A.Request(US.Config.server + "logout", [], function (res) {
+            U.A.Request(US.SCOKET, ["logout", US.userInfo.userid, US.pageId], function () {
+                setTimeout(() => {
+                    window.location.reload();
+                }, 2000);
+            }, [], { "type": "POST", "withCredentials": true }); //在状态服务退出
+        }, [], { "type": "POST", "withCredentials": true });
+        // });
+    }
+}
+
+
 //确定注销
 //b为是否清除cookie的参数。如果传递false,则清除cookie。
 

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott