wxml
<view wx:for="{{data}}">
{{item}}
</view>
wx.js
Page({
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that=this;
wx.request({
url: 'http://localhost:8080/wxjdbc',
data:{},
method:'GET',
header:{
'content-type' : 'application'
},
success: function(res){
that.setData({
data:res.data,
});
}
})
}
})
springboot 后台
项目名 叫wxsql
源代码与https://blog.csdn.net/qw160/article/details/108825246 一样,只改了@requestmapping