9.1
This commit is contained in:
+5
-7
@@ -54,6 +54,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
||||
version: '4.0.0',
|
||||
user_uuid:userInfo.uuid,
|
||||
client_type: 'A', //client_type,
|
||||
timestamp:new Date().getTime()
|
||||
}
|
||||
postData={
|
||||
...data,
|
||||
@@ -65,16 +66,13 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
||||
if(token){
|
||||
header['Authorization']='Bearer ' +token;
|
||||
let userInfo= uni.getStorageSync('userInfo')
|
||||
defaultData = {
|
||||
defaultData = {
|
||||
version: '4.0.0',
|
||||
user_uuid:userInfo.uuid,
|
||||
client_type: 'A', //client_type,
|
||||
timestamp:new Date().getTime()
|
||||
}
|
||||
defaultData = {
|
||||
version: '4.0.0',
|
||||
user_uuid:userInfo.uuid,
|
||||
client_type: 'A', //client_type,
|
||||
}
|
||||
|
||||
postData={
|
||||
...data,
|
||||
...defaultData
|
||||
@@ -87,7 +85,7 @@ export const request = (url, data = {}, method = 'post', loading = false, conten
|
||||
return new Promise(function(e, n) {
|
||||
let timestamp = Date.now();
|
||||
uni.request({
|
||||
data: {...data,...defaultData},
|
||||
data: postData,
|
||||
url: url.indexOf('http') != -1 ? url : encodeURI(BASE_URL + url),
|
||||
method: method,
|
||||
sslVerify: false,
|
||||
|
||||
Reference in New Issue
Block a user