一个添加地址的接口,上传的参数无论是pc端还是手机端都是正确的(已验证),那么就只可能是手机端接口调用失败,pc端正常,请问怎么解决?
下面是添加的js代码
save: function () {
var that = this;
var uid = wx.getStorageSync(“id”);
console.log(“我的” + uid);
wx.request({
url: ‘https://xxxx.xxxxx.com/addAddress’,
method: “post”,
data:
{
city_name: that.data.city,
area_name: that.data.county,
longtitude: that.data.longitude.toString(),
latitude: that.data.latitude.toString(),
address_location: that.data.addDetail,
id: uid,
province_name: that.data.province,
is_default: that.data.defaultNum
},
header: {
“content-type”: “application/json”
},
success: function (res) {
wx.showToast({
title: ‘保存成功’,
})
wx.navigateBack({
delta: 1
})
}
})
},