Namespace.register("U.Dk.DI"); //网盘首页数据展示 //#region 首页暂时网盘 //获取网盘首页内容 U.Dk.DI.WPFF = function (UTF, UCB) { var _UDE = U.D.SY.ET["UL"]["WS"]; if (!_UDE) { U.A.Request(US.CD, [US.DB, "UseStudio_Disk", "GetDiskHallData", US.NU, 0, 3000], U.Dk.DI.AsynWPFF, [[$("#UD_SYSXZBJO")[0], true], UCB]); // U.A.Request(US.Auth,"UseStudioDisk.GetUserFNew", [_UNID, _UNID], U.Dk.DI.AsynWPFF, [[$("#UD_SYSXZBJO")[0], true], UCB]); } //获取网盘首页的内容 else { U.Dk.DI.SYWPQHFY(1); (U.Ut.isFunction(UCB)) && (UCB()); } } //获取网盘信息异步 U.Dk.DI.AsynWPFF = function (r) { var _UDE = {}, context = r.context, _UCB = context[1]; r = r.value; // _UDE[US.NU] = [null, r[1]]; // r[1] = [, , _UDE]; U.D.SY.ET["UL"]["WS"] = r; U.Dk.DI.WPFF(null, _UCB); // (U.D.lot == 1) && (U.Dk.DI.WPFF(null, _UCB)); } //网盘滚动分页 U.Dk.DI.SYWPQHFY = function (UP, UDOD) { U.Dk.DI.SYWPQHJ(U.Ut.isElement(UDOD) ? UDOD : "", (UP == null ? this.P + 2 : UP), 2); //首页网盘点击 // UP == 2 ? setTimeout(function () { U.Dk.DI.SYWPQHJ(null, UP, 2, U.D.SY.ET["UL"]["WS"][5]); }, 500) : U.Dk.DI.SYWPQHJ(null, UP, 2, U.D.SY.ET["UL"]["WS"][5]); } //首页网盘点击 U.Dk.DI.SYWPDJ = function (UDID, UDOD) { var _UTF = (UDOD && UDOD.className.indexOf("UD_SYSXZBMHT") > -1); U.Dk.DI.SYWPQHJ(null, 1, 2, UDID, _UTF); (!_UTF && UDOD) && (U.MR.DHQH(UDOD, "UD_SYSXZBMHT")); } //网盘内容分页 U.Dk.DI.SYWPQHJ = function (UDOD, UP, UTF, UDID, UTP) { if (UTF == 2 || !U.U.L.isLogin(3)) {//指定区域查看 UTP = UTP === true; UDOD = UDOD || $("#UD_SYSXZBJO")[0]; var _UCE, _UDPD = $(UDOD).Parent({ usbody: "true" }), _userid = UTF ? US.NU : US.userInfo.userid, _UDAD = $(_UDPD).Child(), _UGE = U.D.SY.ET["UL"]["WS"]; // _UGE[5] = UDID = UDID || US.NU; // _UGE = _UGE[1][UTF]; _UCE = U.D.T.FYGBL(_UGE, UP, [60, 300]), _UE = _UCE[1] * 300; (UP == 1) && (UDOD.innerText = ""); if (_UCE[0] && !UTP) { if (_UCE[0].length) { U.Dk.DI.DiskSYN(UDOD, _UCE[0]); (UDOD.offsetHeight > 0 && _UDPD.offsetHeight >= _UDPD.scrollHeight) && (U.Dk.DI.SYWPQHJ(UDOD, UP + 1, UTF, UDID)); } else if (UP == 1) { U.Dk.VW.XWPDYXK(UDOD, { "className": "UD_SYWRZFO", "onclick": [[U.D.DT.YYDK, ["Disk", { "userid": US.userInfo.userid, "directoryid": US.FG}]]] }); } } //打印网盘资料 else { UTP = (UTP && _UCE[0] && _UCE[0].length != 0); U.A.Request(US.CD, [US.DB, "UseStudio_Disk", "GetDiskHallData", UDID, _userid, _UE - 300, _UE], U.Dk.DI.AsynSYWPQHJ, [UP == 1 ? [UDOD, true] : _UDAD[_UDAD.length - 1], _UGE, UDID, UP, UTF, _UCE[1], UDOD, UTP]); // U.A.Request(US.Auth,"UseStudioDisk.GetUserFNew", [_userid, UDID, _UE - 300, _UE, _userid, (UTP ? _UCE[0][0].UserFilesID : "")], U.Dk.DI.AsynSYWPQHJ, ([UP == 1 ? [UDOD, true] : _UDAD[_UDAD.length - 1], _UGE, UDID, UP, UTF, _UCE[1], UDOD, UTP])); } //异步获取 $(UDOD).next().css("display", "none"); } } //网盘内容分页异步 U.Dk.DI.AsynSYWPQHJ = function (r) { var i, _UAE, context = r.context, _UGE = context[1], _UDID = context[2], _UP = context[3], _UTF = context[4], _UTP = context[5], _UDOD = context[6], _UFT = context[7]; (!_UGE[_UDID]) && (_UGE[_UDID] = []); r = r.value; if (_UFT) { if ((_UAE = r).length) { _UGE = _UGE[_UDID]; for (i = 1; i < _UGE.length; i++) { _UGE[i] = _UAE.concat(_UGE[i]); _UAE = _UAE.splice(300, _UGE[i].length - 300); } } } else { _UGE[_UDID][_UTP] = r; } //(U.D.SY.ET["UL"]["WS"][5] == _UDID) && (U.Dk.DI.SYWPQHJ(_UDOD, _UP, _UTF, _UDID)); } //网盘首页分享区域 U.Dk.DI.DiskSYN = function (UDOD, UDE) { var i, j, _UTF, _UTP, _UDTD, _UDWD, _UDND, _UDSD, _UDMD, _UDKD, _UEN, _USN, _USIN, _USI = $(UDOD).Child().length ? 0 : U.P.RandomRange(10, 25), _UAE = ["打开", "云盘", "评论", "下载"], _userid = US.userInfo.userid, _UDAD = $(UDOD).Child(), _UW = $(UDOD).Parent(2).offsetWidth, _UIF = Math.floor((_UW - 90) / 198) || 1, _ITF = _UDAD.length % _UIF, _UDFD = $$("frag"), _UKE = { "U": "40", "UD_SYWRZOE": "40", "UD_SYWRZOY": "40", "UD_SYWRZON": "40" }; if (UDE) { for (i = 0; i < UDE.length; i++) { _UDTD = $$("div", { "className": "UD_SYSXZBMUZ", "style": { "marginLeft": (i + _ITF) % _UIF ? "" : "0px"} }, _UDFD); // if (_USI && _USI == i) { _UDWD = $$("div", { "id": Guid.guidNoDash(), "className": "UD_SYSXZBMUZL" }, _UDTD); U.D.AD.baidu(_UDWD.id, "u2360852"); //异步添加广告 } else { _UEN = UDE[i].UserFilesExtendName || UDE[i].UserDirectoryExtendType; _UTF = U.UP.IsImg(_UEN || ""); _UTP = U.Dk.HP.GetIcon(_UEN ? _UEN.toLowerCase() : ""); _UDWD = $$("div", { "className": "UD_SYSXZBMU", "onclick": [[U.Dk.DI.DiskSYNDJ, [UDE[i], 0]]] }, _UDTD); // _UDTD = $$("div", { "className": "UD_SYSXZBMUAO" }, _UDWD); // _UDND = $$("div", { "className": "UD_SYSXZBMUA" }, _UDTD); // _UDSD = $$("div", { "className": "UD_SYSXZBMUS" + (_UTP.classname[1] ? " UD_SYID " + _UTP.classname[1] : ""), "style": { "width": (_UKE[_UTP.classname[1]] ? _UKE[_UTP.classname[1]] + "px" : "")} }, _UDND); // if (_UTF) {//图片查看 _UEN = UDE[i].UseFilesServerThumbnailName || UDE[i].UserDirectoryUrl; _UDSD.className = "UD_SYSXZBMUS UD_SYSXZBMUSO"; _UDMD = $$("div", { "className": "UD_SYSXZBMUST", "onclick": U.M.apply() }, _UDSD); U.D.SY.JZTPJS(_UEN, _UDMD, UDE[i]); } //普通文件查看 else if (_UTP.name == "文件") { $$("div", { "className": "UD_SYSXZBMUSN", "innerHTML": _UEN }, _UDSD); } _UDSD = $$("div", { "className": "UD_SYSXZBMUNO" }, _UDND); $$("div", { "className": "UD_SYSXZBMUN UTDF", "innerHTML": (_USN = UDE[i].UserFilesName || UDE[i].UserallDirectoryName || ""), "title": _USN }, _UDSD); _UDSD = $$("div", { "className": "UD_SYSXZBMUT UTDF" }, _UDSD); $$("span", { "innerHTML": U.MT.getDateInterval(UDE[i].UserFilesAddTime || UDE[i].UserDirectoryAddTime) }, _UDSD); $$("div", { "className": "UD_SYSXZBMUR", "innerHTML": _UTP.name + " 容量大小(" + U.UP.FileSize(UDE[i].UserFilesSize || UDE[i].UserDirectorySize || 0) + ")" }, _UDTD); _UDSD = $$("div", { "className": "UD_SYSXZBMUD", "onclick": [[U.M.StopBubble], [U.U.I.ViewOtherUserInfo, [UDE[i].UserID || UDE[i].UserId]]] }, _UDTD); _UDMD = $$("div", { "className": "UD_SYSXZBMUDL" }, _UDSD); _UDKD = $$("div", { "className": "UD_SYSXZBMUDLL" }, _UDMD); $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "src": U.M.GetImgU(UDE[i].UserThumbnailImageHead || ((_userid && UDE[i].UserID == _userid || UDE[i].UserId == _userid) ? US.userInfo.UserThumbnailImageHead : "")) }, _UDKD); $$("div", { "className": "UD_SYSXZBMUDLR UTDF", "innerHTML": UDE[i].UserName || US.userInfo.UserNickName || "" }, _UDSD); _UDKD = $$("div", { "className": "UD_SYSXZBMUL UTransition" }, _UDWD); for (j = 0; j < _UAE.length; j++) { $$("div", { "className": "UD_SYSXZBMULO", "innerHTML": _UAE[j], "onclick": [[U.M.StopBubble], [U.Dk.DI.DiskSYNDJ, [UDE[i], j]]] }, _UDKD); } //使用文件 } } } else { for (i = 0; i < _UDAD.length; i++) { $(_UDAD[i]).addAttrArray({ "style": { "marginLeft": i % _UIF ? "" : "0px"} }); } } if (_UIF > 0) { UDOD.style.width = (_UIF * 198 - 22) + "px"; } UDOD.appendChild(_UDFD); //$(UDOD).next().css("display", "block"); } //点击查看网盘 U.Dk.DI.DiskSYNDJ = function (UDE, UTF) { (UDE.UserDirectoryEncrypt && UDE.UserDirectoryEncrypt.indexOf("-") > 0 && UDE.UserDirectoryEncrypt.length == 36) && (UDE.UserID = UDE.UserDirectoryEncrypt); //文件打开 下载 if (UTF == 1) { US.Disk.DiskDaren["SE"] = UDE; U.D.DT.YYDK("Disk", { "userid": UDE.UserID, "directoryid": UDE.UserDirectoryParentID || UDE.UserDirectoryID }); } else if (UTF == 2) { U.D.Img.Img(UDE, UDE); } // U.D.CM.CKPLXS(UDE.UserFilesID || UDE.UserDirectoryID, UDE.UserallDirectoryName || UDE.UserFilesName); else if (!UTF || UTF == 3) { (!UDE.UserDirectoryParentID) && (U.Ut.AddObj(UDE, { UserallDirectoryName: UDE.UserFilesName, filetype: 1, Descript: UDE.UserFilesDescript, UserDirectoryParentID: UDE.UserDirectoryID, UserDirectoryID: UDE.UserFilesID })); UTF ? U.Dk.RE.WPXZWJZJO(UDE.UserDirectoryID, "file") : U.Dk.LE.OpenFileDirectory(UDE); } U.D.CM.CKPLXS(UDE.UserFilesID || UDE.UserDirectoryID, UDE.UserallDirectoryName || UDE.UserFilesName); U.M.StopBubble(); } //#endregion //#region 查看热门信息 //热门资料 U.Dk.DI.WPRMZL = function (UP, UDE, userid) { var _UGE = U.Dk.DiskOperatingSwitch(userid), _USE = UP * 90; //#error 下面去除 U.A.Request(US.CD, [US.DB, "UseStudio_Disk", "UD_S_GetHMZL", _USE - 89, _USE], U.Dk.DI.AsynWPRMZL, [[$("#UD_SYWRZ", _UGE.pdiv)[0], true], UDE, UP, userid]); } //获取热门资料异步 U.Dk.DI.AsynWPRMZL = function (r) { var context = r.context, _UDE = context[1], _UP = context[2], _userid = context[3], _UGE = U.Dk.DiskOperatingSwitch(_userid), _UDOD = $("#UD_SYWRZ", _UGE.pdiv)[0]; r = r.value; if (r.length) { U.Dk.DI.PWPRMZL(_UDOD, r, _UDE, _UP); } else { _UDOD.onscroll = null; } //不滚动加载了 } //设置热门信息打印和滚动 U.Dk.DI.PWPRMZL = function (UDOD, UDE, UAE, UP) { var _UDPD = $(UDOD).Parent(), _UKE = (UAE) ? UAE.concat(UDE) : UDE; (!_UDPD.onscroll || UP == 1) && (UDOD.innerText = ""); //#error 这里用这个做一个标识到时候要改的地方 U.Dk.LE.OpenFileDirectory(UDOD.onscroll ? UDE : _UKE, [{ "UserallDirectoryName": "热门消息查看"}]); //查看网盘信息 _UDPD.onscroll = (U.M.SSCH({ 'AF': U.M.apply(null, [[U.Dk.DI.WPRMZLGD, [UAE]]]) }).SCH()); //设置滚动加载 } //滚动加载热门消息 U.Dk.DI.WPRMZLGD = function (UDE) { U.Dk.DI.WPRMZL(this.P + 2, UDE); } //#endregion