更新 'SrcJyAliPublic.js'

main
src48597962 7 months ago
parent 5237ed2a83
commit e6320fdf90
  1. 17
      SrcJyAliPublic.js

@ -384,22 +384,21 @@ function getOpenToken(authorization) {
"height": 500, "height": 500,
}), }),
}); });
log(res);
let data = JSON.parse(res).data; let data = JSON.parse(res).data;
let sid = data["sid"]; let sid = data["sid"];
let body = { function get_qrcode_code(sid) {
"authorize": 1, let res = fetch("https://openapi.aliyundrive.com/oauth/qrcode/" + sid + "/status");
"scope": "user:base,file:all:read,file:all:write", return JSON.parse(res).authCode;
"drives": ["backup", "resource"],
"scopes": ["user:base", "file:all:read", "file:all:write"],
"sid": sid
} }
log(get_qrcode_code(sid));
let json = JSON.parse(request('http://api.extscreen.com/aliyundrive/token', { let json = JSON.parse(request('http://api.extscreen.com/aliyundrive/token', {
headers: headers, body: get_qrcode_code(sid),
body: body,
method: 'POST', method: 'POST',
timeout: 8000 timeout: 8000
})); }));
log(json); log(json);
return json; return json;
//let code = json.redirectUri.split("code=")[1]; //let code = json.redirectUri.split("code=")[1];

Loading…
Cancel
Save