|
|
|
@@ -137,7 +137,8 @@ class Request { |
|
|
|
// get请求 |
|
|
|
this.get = (url, data = {}, header = { |
|
|
|
'Authorization': 'Bearer '+token.token, |
|
|
|
'content-type': 'application/x-www-form-urlencoded' |
|
|
|
'content-type': 'application/json', |
|
|
|
// application/x-www-form-urlencoded |
|
|
|
}) => { |
|
|
|
return this.request({ |
|
|
|
method: 'GET', |
|
|
|
@@ -150,7 +151,7 @@ class Request { |
|
|
|
// post请求 |
|
|
|
this.post = (url, data = {}, header = { |
|
|
|
'Authorization': 'Bearer '+token.token, |
|
|
|
'content-type': 'application/x-www-form-urlencoded' |
|
|
|
'content-type': 'application/json' |
|
|
|
}) => { |
|
|
|
return this.request({ |
|
|
|
url, |
|
|
|
@@ -163,7 +164,7 @@ class Request { |
|
|
|
// put请求,不支持支付宝小程序(HX2.6.15) |
|
|
|
this.put = (url, data = {}, header = { |
|
|
|
'Authorization': 'Bearer '+token.token, |
|
|
|
'content-type': 'application/x-www-form-urlencoded' |
|
|
|
'content-type': 'application/json' |
|
|
|
}) => { |
|
|
|
return this.request({ |
|
|
|
url, |
|
|
|
@@ -176,7 +177,7 @@ class Request { |
|
|
|
// delete请求,不支持支付宝和头条小程序(HX2.6.15) |
|
|
|
this.delete = (url, data = {}, header = { |
|
|
|
'Authorization': 'Bearer '+token.token, |
|
|
|
'content-type': 'application/x-www-form-urlencoded' |
|
|
|
'content-type': 'application/json' |
|
|
|
}) => { |
|
|
|
return this.request({ |
|
|
|
url, |
|
|
|
|