再方法内添加一行代码,把this对象赋值给给一个变量供success()方法内调用 核心代码: var v = this.txt; 完整示例 abc:function(e){//该函数用于和后台交互 // var v = e var v = this.txt; var self=this; //关键代码,这要操作程序无法运行 wx.request({ url: 'https://www.kjch.xyz/jous/hello.do', //仅为示例,并非真实的接口地址 data: { name:…
setData:function(obj){ let that = this; let keys = []; let val,data; Object.keys(obj).forEach(function(key){ keys = key.split('.'); val = obj[key]; data = that.$data; keys.forEach(function(key2,index){ if(index+1 == keys.length){ that.$set(data,key2,…