wx.request({
url: 'http://188208e54x.iok.la/User/insertappointment',
data: JSON.stringify(postData),
method: "POST",
header: {
'content-type': 'application/json;charset=utf-8' //默认值
},
scriptCharset: 'utf-8',
success: function (res) {
// wx.hideLoading()
console.log(res.data)
var resData = res.data;
if (resData.errCode == 200) {
wx.showToast({
title: "提交成功...",
icon: 'waiting',
duration: 2000
})
setTimeout(function () {
wx.redirectTo({
url: '/pages/index/index'
})
}, 2000)
} else {
wx.showToast({
title: resData.errmsg,
image: '/icon/icon_tips.svg',
duration: 2000
})
}
}
})
后端
public void insertappointment(@RequestBody Map<String, String> map){
小程序与后台交互,对象类型
最新推荐文章于 2021-08-18 17:35:29 发布