1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //---------------------------------------------------------------------------网络硬盘搜索------------------------------------------------------------------------------
- Namespace.register("U.Dk.S"); //Disk搜索的命名空间
- //#region 网盘搜索
- //#region 本地搜索
- //自己的网盘搜索
- U.Dk.S.SSWPBD = function (UDOD, UDTD, userid) {
- var _UV = UDOD.value,
- _diskinfo = U.Dk.DiskOperatingSwitch(userid),
- _UDE = _$(_diskinfo[4][_diskinfo[1][1]].Child).Like({ "UserallDirectoryName": _UV });
- _diskinfo[1][5] = _UDE;
- //U.Dk.LE.OpenFileDirectory(_UDE, { "UserallDirectoryName": "关键字\"" + _UV + "\"搜索结果", UserDirectoryID: _UGE[1][1] }, userid);
- //以后做新窗口弹出。
- _content = $("#UD_SYWRZ", _diskinfo.pdiv)[0]; //在"指定的张三的网盘里面查找该id"
- _content.innerText = "";
- U.Dk.VW.XWPDY(_diskinfo[1][5], _content);
- }
- //#endregion
- //#region web网盘搜索
- //所有人的网盘搜索点击
- U.Dk.S.SSWPBDWD = function (UDOD, UTF) {
- var _UGE = US.Disk.UserDisk,
- _UDV = UDOD.value,
- _UDOD = $("#UD_SYWRZ", _UGE.pdiv)[0];
- U.Dk.S.P = _UDOD.innerText = "";
- if (_UDV.isStrNull() && _UDV != UDOD.defaultValue) {
- U.Dk.S.SSWPBDW(_UDV, 1, UTF, null, _UGE[1][2]);
- } //点击搜索
- }
- //滚动加载
- U.Dk.S.SSWPBDWGD = function (UDKN, UTF, UDE, userid) {
- U.Dk.S.SSWPBDW(UDKN, this.P + 2, UTF, UDE, userid); //滚动加载
- }
- //网盘搜索(分页搜索)
- U.Dk.S.SSWPBDW = function (UPW, UP, UTF, UDE, userid) {
- var _UE = UP * 100,
- _UTP = U.Dk.S.P;
- if (_UTP == "" || _UTP > (_USE - 99)) {
- U.A.Request(US.CD, [US.DB, "UseStudio_Disk", "SearchDirectoryAndFile", UPW, _UE - 99, _UE]), U.Dk.S.AsynSSWPBDW, ["", UPW, UTF, UDE, userid];
- } //获取请求的资料
- }
- //搜索异步
- U.Dk.S.AsynSSWPBDW = function (r) {
- var context = r.context,
- _UPW = context[1],
- _UTF = context[2],
- _UDE = context[3],
- _userid = context[4],
- _UGE = U.Dk.DiskOperatingSwitch(_userid),
- _UDOD = $("#UD_SYWRZ", _UGE.pdiv)[0];
- r = r.value;
- if (r.length) {
- U.Dk.S.P = r[0]["AllF"];
- if (_UDE) { U.Dk.S.PSSWPBDW(r, _UPW, _UDOD, _UTF, _UDE, _userid); }
- else { U.Dk.LE.RecordNav[[U.Dk.S.PSSWPBDW, [r, _UPW, _UDOD, _UTF, _UDE, _userid]]]; }
- }
- else {
- U.Dk.S.P = ""; (!r.length) && (U.Alert("无搜索结果!"))
- }
- }
- //设置搜索滚动和打印
- U.Dk.S.PSSWPBDW = function (UDE, UPW, UDOD, UTF, UAE, userid) {
- var _UKE = UAE ? UAE.concat(UDE) : UDE;
- U.Dk.LL.SCDXWPDH([{ "UserallDirectoryName": "关键字\"" + UPW + "\"搜索结果"}], $("#UD_SYWRYB", US.Disk.UserDisk.pdiv)[0]); //打印导航
- if (UDE.length) {
- (!UAE) && (UDOD.innerText = "");
- U.Dk.VW.XWPDY(UDE, UDOD, null, UAE ? UAE.length : 0); //打印网盘资料
- $(UDOD).Parent().onscroll = (U.M.SSCH({ "AF": U.M.apply(null, [[U.Dk.S.SSWPBDWGD, [UPW, UTF, _UKE, userid]]]) }).SCH()); //设置滚动加载
- }
- }
- //#endregion
- //#endregion
|