Commit 910a5f2c by zhengxiao

fix: 用户鉴权信息优先从链接获取

parent 2b06bf51
......@@ -55,8 +55,8 @@ const createRequestForPhp = () => {
const requestData = {
...config.data,
ts: parseInt((Date.now() / 1000).toString()).toString(),
[UID]: Utils.getCookie(UID),
[ACCESS_TOKEN]: Utils.getCookie(ACCESS_TOKEN)
[UID]: Utils.getQueryString(UID) || Utils.getCookie(UID),
[ACCESS_TOKEN]: Utils.getQueryString(ACCESS_TOKEN) || Utils.getCookie(ACCESS_TOKEN)
}
return {
...config,
......@@ -66,8 +66,8 @@ const createRequestForPhp = () => {
headers: {
'content-type': 'application/x-www-form-urlencoded',
Authorization: `Ydl ${genSign(requestData)}`,
[UID]: Utils.getCookie(UID),
[ACCESS_TOKEN]: Utils.getCookie(ACCESS_TOKEN)
[UID]: Utils.getQueryString(UID) || Utils.getCookie(UID),
[ACCESS_TOKEN]: Utils.getQueryString(ACCESS_TOKEN) || Utils.getCookie(ACCESS_TOKEN)
}
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment