wx.request({  url: 'http://localhost:8080/shugao/VServlet',  //这里''里面填写你的服务器API接口的路径    method: 'GET', // 声明GET请求   data:{    ddd:"123"  },  dataType:JSON, header: { 'content-type': 'application/x-www-form-urlencoded' },  // header: {}, // 设置请求的 header,GET请求可以不填    success: function (res) {        //这几句是网上查的,有时候json不能很好的反序列化      var jsonStr = res.data.replace(" ", "").replace(/ufeff/g, "");      var jj = JSON.parse(jsonStr);      res.data = jj;      this.setdata(ddd);      console.log(res.data)  }})

 

TAG标签: 微信小程序表单序列化

http://www.xiaochengxub.com/read-103346.html