console.log(typeof(res.header['Set-Cooki

发布于 6 年前作者 wanjing17583 次浏览最后编辑 6 年前来自 ask

 wx.request({

  url: url,

  method: ‘POST’,

  header: { 

    “Content-Type”: “application/x-www-form-urlencoded”,

    “Cookie”: get(‘Cookie’)

  },

  data: params,

  success: function (res) {

    console.log(typeof(res.header[‘Set-Cookie’]));//在手机上是string,在mac 开发工具上是array

  }

})

1 回复
ezou
ezou1 楼4 年前

麻烦提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html),我们定位下问