fix: 修复真机请求接口失败问题
This commit is contained in:
parent
4f7a9ef918
commit
3ac24a2e28
|
|
@ -5,7 +5,8 @@ class Fetch {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
var headers = {
|
var headers = {
|
||||||
'content-type': methods === 'postFrom' ? 'application/x-www-form-urlencoded' :
|
'content-type': methods === 'postFrom' ? 'application/x-www-form-urlencoded' :
|
||||||
'application/json'
|
'application/json',
|
||||||
|
'Accept': 'application/json'
|
||||||
}
|
}
|
||||||
if (needToken) {
|
if (needToken) {
|
||||||
headers.token = uni.getStorageSync('token');
|
headers.token = uni.getStorageSync('token');
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,7 @@
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "wx6172ec67683d31b9",
|
"appid" : "wx6172ec67683d31b9",
|
||||||
"requiredPrivateInfos" : [
|
"requiredPrivateInfos" : [ "getLocation" ],
|
||||||
"getLocation"
|
|
||||||
],
|
|
||||||
"permission" : {
|
"permission" : {
|
||||||
"scope.userLocation" : {
|
"scope.userLocation" : {
|
||||||
"desc" : "计算接单距离、调用导航功能"
|
"desc" : "计算接单距离、调用导航功能"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user