Commit d59763b2 by 王振宇

Merge branch 'feat_paramsGet_230831' into 'master'

Feat params get 230831

See merge request !10
parents 2b06bf51 7b954202
{
"name": "@ydl-packages/toolkit",
"version": "1.0.11",
"version": "1.0.12",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "@ydl-packages/toolkit",
"version": "1.0.11",
"version": "1.0.12",
"description": "",
"main": "./dist/index.umd.js",
"scripts": {
......
......@@ -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