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", "name": "@ydl-packages/toolkit",
"version": "1.0.11", "version": "1.0.12",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
......
{ {
"name": "@ydl-packages/toolkit", "name": "@ydl-packages/toolkit",
"version": "1.0.11", "version": "1.0.12",
"description": "", "description": "",
"main": "./dist/index.umd.js", "main": "./dist/index.umd.js",
"scripts": { "scripts": {
......
...@@ -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