|
|
@ -347,26 +347,25 @@ function aliMyDisk(folder_id,nofilter) { |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: "⚡登录云盘⚡", |
|
|
|
title: "⚡登录云盘⚡", |
|
|
|
url: $("hiker://empty##").rule(() => { |
|
|
|
url: $("hiker://empty###noRecordHistory##noHistory#").rule(() => { |
|
|
|
let d = []; |
|
|
|
let d = []; |
|
|
|
let url = 'https://auth.aliyundrive.com/v2/oauth/authorize?login_type=custom&response_type=code&redirect_uri=https%3A%2F%2Fwww.aliyundrive.com%2Fsign%2Fcallback&client_id=25dzX3vbYqktVxyX&state=%7B%22origin%22%3A%22*%22%7D#/login' |
|
|
|
let url = 'https://auth.aliyundrive.com/v2/oauth/authorize?login_type=custom&response_type=code&redirect_uri=https%3A%2F%2Fwww.aliyundrive.com%2Fsign%2Fcallback&client_id=25dzX3vbYqktVxyX&state=%7B%22origin%22%3A%22*%22%7D#/login' |
|
|
|
let js = $.toString(() => { |
|
|
|
let js = $.toString(() => { |
|
|
|
const tokenFunction = function () { |
|
|
|
const tokenFunction = function () { |
|
|
|
var token = JSON.parse(localStorage.getItem('token')) |
|
|
|
var token = JSON.parse(localStorage.getItem('token')) |
|
|
|
if (token && token.user_id) { |
|
|
|
if (token && token.user_id) { |
|
|
|
let token_url = 'hiker://files/rules/Joe/ali.json'; |
|
|
|
let alistfile = "hiker://files/rules/Src/Juying/Alist.json"; |
|
|
|
fy_bridge_app.writeFile(token_url, JSON.stringify(token)); |
|
|
|
if(fy_bridge_app.fetch(alistfile)){ |
|
|
|
let icy = "hiker://files/rules/icy/icy-ali-token.json"; |
|
|
|
eval("var alistData = " + fy_bridge_app.fetch(alistfile)); |
|
|
|
let a = fy_bridge_app.fetch(icy); |
|
|
|
}else{ |
|
|
|
if (!a || a == "") { |
|
|
|
var alistData = {}; |
|
|
|
let b = []; |
|
|
|
|
|
|
|
b.push(token); |
|
|
|
|
|
|
|
fy_bridge_app.writeFile(icy, JSON.stringify(b)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let alistconfig = alistData.config || {}; |
|
|
|
|
|
|
|
alistconfig.alitoken = token.refresh_token; |
|
|
|
|
|
|
|
alistData.config = alistconfig; |
|
|
|
|
|
|
|
fy_bridge_app.writeFile(alistfile, JSON.stringify(alistData)); |
|
|
|
localStorage.clear(); |
|
|
|
localStorage.clear(); |
|
|
|
//alert('TOKEN获取成功!');
|
|
|
|
alert('TOKEN获取成功,返回后刷新页面!'); |
|
|
|
fba.parseLazyRule(`hiker://empty@lazyRule=.js:putMyVar('getalitoken','0');back();`); |
|
|
|
|
|
|
|
//fy_bridge_app.back();
|
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
token_timer(); |
|
|
|
token_timer(); |
|
|
@ -375,7 +374,6 @@ function aliMyDisk(folder_id,nofilter) { |
|
|
|
var token_timer = function () { |
|
|
|
var token_timer = function () { |
|
|
|
setTimeout(tokenFunction, 500) |
|
|
|
setTimeout(tokenFunction, 500) |
|
|
|
}; |
|
|
|
}; |
|
|
|
token_timer(); |
|
|
|
|
|
|
|
tokenFunction(); |
|
|
|
tokenFunction(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
@ -391,8 +389,26 @@ function aliMyDisk(folder_id,nofilter) { |
|
|
|
}), |
|
|
|
}), |
|
|
|
col_type: 'text_center_1' |
|
|
|
col_type: 'text_center_1' |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
d.push({ |
|
|
|
|
|
|
|
title: "⭐手工填写token⭐", |
|
|
|
|
|
|
|
url: $().lazyRule(() => { |
|
|
|
|
|
|
|
let alistfile = "hiker://files/rules/Src/Juying/Alist.json"; |
|
|
|
|
|
|
|
if(fetch(alistfile)){ |
|
|
|
|
|
|
|
eval("var alistData = " + fetch(alistfile)); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
var alistData = {}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let alistconfig = alistData.config || {}; |
|
|
|
|
|
|
|
return $("", "refresh_token").input((alistfile, alistData, alistconfig) => { |
|
|
|
|
|
|
|
alistconfig.alitoken = input; |
|
|
|
|
|
|
|
alistData.config = alistconfig; |
|
|
|
|
|
|
|
writeFile(alistfile, JSON.stringify(alistData)); |
|
|
|
|
|
|
|
return "toast://已设置"; |
|
|
|
|
|
|
|
}, alistfile, alistData, alistconfig) |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
col_type: 'text_center_1' |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setResult(d); |
|
|
|
setResult(d); |
|
|
|
setLastChapterRule('js:' + $.toString(()=>{ |
|
|
|
setLastChapterRule('js:' + $.toString(()=>{ |
|
|
|
setResult(''); |
|
|
|
setResult(''); |
|
|
|