Commit 910a5f2c by zhengxiao

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

parent 2b06bf51
...@@ -55,8 +55,8 @@ const createRequestForPhp = () => { ...@@ -55,8 +55,8 @@ const createRequestForPhp = () => {
const requestData = { const requestData = {
...config.data, ...config.data,
ts: parseInt((Date.now() / 1000).toString()).toString(), ts: parseInt((Date.now() / 1000).toString()).toString(),
[UID]: Utils.getCookie(UID), [UID]: Utils.getQueryString(UID) || Utils.getCookie(UID),
[ACCESS_TOKEN]: Utils.getCookie(ACCESS_TOKEN) [ACCESS_TOKEN]: Utils.getQueryString(ACCESS_TOKEN) || Utils.getCookie(ACCESS_TOKEN)
} }
return { return {
...config, ...config,
...@@ -66,8 +66,8 @@ const createRequestForPhp = () => { ...@@ -66,8 +66,8 @@ const createRequestForPhp = () => {
headers: { headers: {
'content-type': 'application/x-www-form-urlencoded', 'content-type': 'application/x-www-form-urlencoded',
Authorization: `Ydl ${genSign(requestData)}`, Authorization: `Ydl ${genSign(requestData)}`,
[UID]: Utils.getCookie(UID), [UID]: Utils.getQueryString(UID) || Utils.getCookie(UID),
[ACCESS_TOKEN]: Utils.getCookie(ACCESS_TOKEN) [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