收藏
回答

微信升级为7.0.10后wx.request 400,7.0.09还是好的,什么鬼?

// 微信版本7.0.10  返回400
// 微信版本7.0.09 正常

Tool.exeRequest({
      url:"/api/msys/login",
      data:{'username':value.username,'pwd':value.pwd, 'openid': that.data.openid, 'isbind':that.data.isbind},
      success:function(data){
    }}
//Tool.exeRequest
var that = this;
  var sessionId = that.getCurrentSysUser() ? that.getCurrentSysUser().sessionId : "";
  wx.request({
    url: that.finalData.API_DOMAIN + requestConfig.url,
    data: requestConfig.data ? requestConfig.data : {},
    header: {
      "Cookie": "JSESSIONID=" + sessionId + ";SHAREJSESSIONID=" + sessionId,
      "content-type":"application/x-www-form-urlencoded"
    },
    success: function (res) {
      console.log("asdfasfasdfasdfasdfsd")
      console.log(res)
      console.log("asdfasfasdfasdfasdfsd")
      if (res.data.result == 0 || res.data.success) {
        requestConfig.success ? requestConfig.success(res.data) : "";
      } else {
        if (res.data.msg) {
          that.msg(res.data.msg);
        }
      }
    },
    fail: function (e) {
      console.log("请求失败");
      console.log(e);
      if (requestConfig.fail) {
        requestConfig.fail({ message: "系统繁忙请稍后重试" });
      }
    },
    complete: function () {
      if (requestConfig.complete) {
        requestConfig.complete();
      }
    }
  });
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签