在我调用wx.request()请求SpringBoot后端访问MySQL数据库时,出现了[wxapplib]] backgroundfetch privacy fail {"errno":101,"errMsg":"private_getBackgroundFetchData:fail private_getBackgroundFetchData:fail:jsapi invalid request data"}错误。使用的调式基础库是2.23.4,微信开发者工具版本是stable 1.06.2401020。有没有大神帮忙解答一下?
代码如下:
getcampusbyid() {
wx.request({
url: 'http://192.168.227.73:8088/csustnav/campus/1',
method: 'GET',
success: (res) => {
console.log(res.data.data.centerLatitude)
var bound = {
southwest_latitude: res.data.data.southwestLongitude,
southwest_longitude: res.data.data.southwestLongitude,
northeast_latitude: res.data.data.southwestLongitude,
northeast_longitude: res.data.data.southwestLongitude,
}
var scbound = {
east: res.data.data.east,
west: res.data.data.west,
south: res.data.data.south,
north: res.data.data.north,
}
console.log(bound)
this.setData({
boundary: bound,
school_boundary: scbound,
latitude: res.data.data.centerLatitude,
longitude: res.data.data.centerLongitude
});
console.log(this.data.boundary)
}
})
},
学会排查问题,小程序怎么知道你后端是springboot和mysql? 新建空白代码片段然后用wx.request请求接口看看有什么反应