收藏
回答

部分机型wx.request返回错误状态码400

urlmodel = requestUrl + "PostShipBySapCode?sapcodelist=" + JSON.stringify(that.data.Listmodel) + "&sapLink=" + app.globalData.userno + "&LONGITUDE=" + that.data.longitude + "&LATITUDE=" + that.data.latitude + "&LOCATIONADDRESS=" + that.data.locationAddress

  wx.request({

      url: urlmodel,

      data: { },

      method: "POST",

      header: {

        'content-type': 'application/json'

      },

      success: function (res) {

        //console.log("123");

        console.log(res);


        if (res.statusCode == 200) {


          var data = JSON.parse(res.data);

          if (data.errcode != '00') {

            wx.showToast({

              title: data.errmsg,

              icon: 'none',

              duration: 2000

            })

          } else {


            wx.showToast({

              title: data.errmsg,

              icon: 'success',

              duration: 5000

            })

           


          }

        } else {

        

          wx.showModal({

            title: '提示',

            content: '服务器返回状态码'+res.statusCode,

            success: function (res) {

              if (res.confirm) {

               return;

              } else {

                return;

              }

            }

          })

          return;

        }


      }

    })












最后一次编辑于  03-22  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答