更新 'SrcJyAliDisk.js'

master
src48597962 10 months ago
parent 551e254ecf
commit 03de54aa8c
  1. 272
      SrcJyAliDisk.js

@ -62,144 +62,160 @@ function aliShare(share_id, folder_id, share_pwd) {
let d = []; let d = [];
let filterFiles = []; let filterFiles = [];
d.push( try {
{ if (!userinfo.refresh_token) {
title: "换源", d = d.concat(myDiskMenu(0));
url: $().lazyRule((name, isback) => { } else {
if (isback > 0) { share_pwd = share_pwd || "";
putMyVar('聚影云盘自动返回', '1'); let get_sharetoken = getShareToken(share_id, share_pwd);
back(false); let sharetoken = get_sharetoken.share_token;
return 'hiker://empty'; let getbyshare = {};
} else if (name) {
return $('hiker://empty#noRecordHistory##noHistory#').rule((name) => { d.push({
let d = []; title: "换源",
d.push({ url: $().lazyRule((name, isback) => {
title: name + "-云盘聚合搜索", if (isback > 0) {
url: "hiker://empty", putMyVar('聚影云盘自动返回', '1');
col_type: "text_center_1", back(false);
extra: { return 'hiker://empty';
id: "listloading", } else if (name) {
lineVisible: false return $('hiker://empty#noRecordHistory##noHistory#').rule((name) => {
let d = [];
d.push({
title: name + "-云盘聚合搜索",
url: "hiker://empty",
col_type: "text_center_1",
extra: {
id: "listloading",
lineVisible: false
}
})
setResult(d);
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliDisk.js');
aliDiskSearch(name);
}, name)
} else {
return 'hiker://empty';
}
}, my_params.name || "", my_params.back || 0),
col_type: 'icon_5',
img: 'https://hikerfans.com/tubiao/grey/175.png',
extra: {
longClick: [{
title: "上级目录",
js: $.toString((id) => {
if (!id) {
return "toast://已经是根目录了";
} else {
let ids = id.split;
return $("").rule((ids) => {
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliDisk.js');
aliShare(ids[0], ids[1], ids[2]);
}, ids);
} }
}) }, my_params.dirid || "")
setResult(d); }]
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliDisk.js');
aliDiskSearch(name);
}, name)
} else {
return 'hiker://empty';
} }
}, my_params.name || "", my_params.back || 0), },
col_type: 'icon_5', {
img: 'https://hikerfans.com/tubiao/grey/175.png', title: "样式",
extra: { url: $(['text_1', 'movie_2', 'card_pic_3', 'avatar']).select(() => {
longClick: [{ setItem('aliyun_style', input);
title: "上级目录", refreshPage();
js: $.toString((id) => { return 'toast://已切换';
if (!id) { }),
return "toast://已经是根目录了"; col_type: 'icon_5',
} else { img: 'https://hikerfans.com/tubiao/grey/168.png'
let ids = id.split; },
return $("").rule((ids) => { {
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliDisk.js'); title: "排序",
aliShare(ids[0], ids[1], ids[2]); url: $(ordersKeys, 2).select(() => {
}, ids); setItem('aliyun_order', input);
} refreshPage();
}, my_params.dirid || "") return 'toast://切换成功';
}] }),
} col_type: 'icon_5',
}, img: 'https://hikerfans.com/tubiao/grey/76.png'
{ },
title: "样式", {
url: $(['text_1', 'movie_2', 'card_pic_3', 'avatar']).select(() => { title: getItem('aliyun_playMode', '智能')=="原画"?"原画"+getItem('aliyun_openInt', '1'):getItem('aliyun_playMode', '智能'),
setItem('aliyun_style', input); url: $(['智能', '转码', '原画', '原画接口']).select(() => {
refreshPage(); if(input=='原画接口'){
return 'toast://已切换'; return $(['接口1(alist)', '接口2(webdav)']).select(() => {
}), clearMyVar('aliopentoken');
col_type: 'icon_5', if(input=='接口1(alist)'){
img: 'https://hikerfans.com/tubiao/grey/168.png' clearItem('aliyun_openInt');
},
{
title: "排序",
url: $(ordersKeys, 2).select(() => {
setItem('aliyun_order', input);
refreshPage();
return 'toast://切换成功';
}),
col_type: 'icon_5',
img: 'https://hikerfans.com/tubiao/grey/76.png'
},
{
title: getItem('aliyun_playMode', '智能')=="原画"?"原画"+getItem('aliyun_openInt', '1'):getItem('aliyun_playMode', '智能'),
url: $(['智能', '转码', '原画', '原画接口']).select(() => {
if(input=='原画接口'){
return $(['接口1(alist)', '接口2(webdav)']).select(() => {
clearMyVar('aliopentoken');
if(input=='接口1(alist)'){
clearItem('aliyun_openInt');
}else{
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliPublic.js');
if(aliOpenTokenObj.refresh_token_2){
setItem('aliyun_openInt', '2');
}else{ }else{
let loyopentoken2; require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliPublic.js');
try{ if(aliOpenTokenObj.refresh_token_2){
let loyopen = eval('('+fetch("hiker://files/rules/LoyDgIk/aliOpenToken.json")+')') || {};
loyopentoken2 = loyopen.isV2?loyopen.RefreshTokenOpen:"";
aliOpenTokenObj.refresh_token_2 = loyopentoken2;
aliconfig.opentoken = aliOpenTokenObj;
writeFile(alicfgfile, JSON.stringify(aliconfig));
}catch(e){
log(e.message);
}
if(loyopentoken2){
setItem('aliyun_openInt', '2'); setItem('aliyun_openInt', '2');
}else{ }else{
return $('','输入阿里webdav口令,留空打开网页获取').input((alicfgfile,aliconfig) => { let loyopentoken2;
if(input==''){ try{
return 'web://https://messense-aliyundrive-webdav-backendrefresh-token-ucs0wn.streamlit.app'; let loyopen = eval('('+fetch("hiker://files/rules/LoyDgIk/aliOpenToken.json")+')') || {};
}else{ loyopentoken2 = loyopen.isV2?loyopen.RefreshTokenOpen:"";
let aliOpenTokenObj = aliconfig.opentoken || {}; aliOpenTokenObj.refresh_token_2 = loyopentoken2;
aliOpenTokenObj.refresh_token_2 = input; aliconfig.opentoken = aliOpenTokenObj;
aliconfig.opentoken = aliOpenTokenObj; writeFile(alicfgfile, JSON.stringify(aliconfig));
writeFile(alicfgfile, JSON.stringify(aliconfig)); }catch(e){
setItem('aliyun_openInt', '2'); log(e.message);
} }
},alicfgfile,aliconfig) if(loyopentoken2){
setItem('aliyun_openInt', '2');
}else{
return $('','输入阿里webdav口令,留空打开网页获取').input((alicfgfile,aliconfig) => {
if(input==''){
return 'web://https://messense-aliyundrive-webdav-backendrefresh-token-ucs0wn.streamlit.app';
}else{
let aliOpenTokenObj = aliconfig.opentoken || {};
aliOpenTokenObj.refresh_token_2 = input;
aliconfig.opentoken = aliOpenTokenObj;
writeFile(alicfgfile, JSON.stringify(aliconfig));
setItem('aliyun_openInt', '2');
}
},alicfgfile,aliconfig)
}
} }
} }
} refreshPage();
return 'toast://已切换为'+input;
})
}else{
setItem('aliyun_playMode', input);
refreshPage(); refreshPage();
return 'toast://已切换为'+input; return 'toast://已切换为'+input;
}) }
}else{ }),
setItem('aliyun_playMode', input); col_type: 'icon_5',
refreshPage(); img: 'https://hikerfans.com/tubiao/grey/100.png'
return 'toast://已切换为'+input; },
{
title: '转存',
url: `smartdrive://share/browse?shareId=${share_id}&sharePwd=${share_pwd}`,
col_type: 'icon_5',
img: 'https://hikerfans.com/tubiao/grey/206.png',
extra: {
longClick: [{
title: "💾转存",
js: $.toString((obj) => {
storage0.putMyVar('copydate', obj);
return $("hiker://empty").rule(() => {
addListener("onClose", $.toString(() => {
clearMyVar('copydate');
}));
require(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('/Ju/', '/master/') + 'SrcJyAliDisk.js');
aliMyDisk('', 0, '');
})
},{sharetoken:sharetoken,share_id:share_id,authorization:authorization,file_id:folder_id})
}]
} }
}), },
col_type: 'icon_5', {
img: 'https://hikerfans.com/tubiao/grey/100.png' col_type: 'line_blank'
}, })
{
title: '转存',
url: `smartdrive://share/browse?shareId=${share_id}&sharePwd=${share_pwd}`,
col_type: 'icon_5',
img: 'https://hikerfans.com/tubiao/grey/206.png'
},
{
col_type: 'line_blank'
}
)
try {
if (!userinfo.refresh_token) {
d = d.concat(myDiskMenu(0));
} else {
share_pwd = share_pwd || "";
let get_sharetoken = getShareToken(share_id, share_pwd);
let sharetoken = get_sharetoken.share_token;
let getbyshare = {};
if (errorCode[get_sharetoken.code]) { if (errorCode[get_sharetoken.code]) {
d.push({ d.push({
title: errorCode[get_sharetoken.code], title: errorCode[get_sharetoken.code],

Loading…
Cancel
Save