站务联系

微信端处理服务器端返回值

发布时间:2021-06-23   来源:网络整理    
字号:

微信端处理服务器端返回值

时间:2021-04-12

本文章向你们介绍陌陌端处理服务器端返回值,主要包括陌陌端处理服务器端返回值使用例子、应用方法、基本知识点小结跟须要留意事项微端服务器微端服务器,具有一定的参考价值,需要的同学可以参考一下。

微信端处理服务器端返回值

关键代码,在恳求体外

微信端处理服务器端返回值

在恳求体内

微信端处理服务器端返回值//console.log(e); // //获取到它的绑定id // console.log(e.target.dataset.yao); // console.log(e.target.dataset.author); const app = getApp(); //console.log(app); wx.request( { url: 'https://www.xxxx.com/Wx/zhanbuView', // url: 'http://127.0.0.1:8080/Wx/zhanbuView' , data:{ yaoId:e.target.dataset.yao, author:e.target.dataset.author, // historyId:e.target. historyId:app.globalData.zhanbuYao.data.historyId, }, header:{ 'content-type':'application/x-www-form-urlencoded' }, success:(res)=>{ // console.log(res.data); //console.log(res.data.zhouyiAuthor.name); const app = getApp(); this.setData({Shiyou:app.globalData.zhanbuShiyou}); // console.log(Shiyou); app.globalData.zhanbuViewAuthor=res.data.zhouyiAuthor.name, app.globalData.zhanbuViewAuthorInfo=res.data.zhouyiAuthor.info, app.globalData.zhanbuViewContent=res.data.content, app.globalData.zhanbuViewXiang=res.data.xiang, app.globalData.zhanbuViewYaoId=e.target.dataset.yao wx.navigateTo({ url: '../zhanbuView/zhanbuView', complete: (res) => {}, // events: events, fail: (res) => {}, success: (result) => {}, }) }

图说天下

×
二维码生成