您无权使用所提供的凭据查看此目录或页面。
发布于 6 年前 作者 zgao 8061 次浏览 来自 问答

其它网络请求没问题,唯独这个出现401了,请问有人知道这是什么情况吗

1 回复

 wx.request({

          //获取openid接口

          url: ‘https://api.weixin.qq.com/sns/jscode2session’,

 

          data: {

            appid: APP_ID,

            secret: APP_SECRET,

            js_code: res.code,

            grant_type: ‘authorization_code’

          },

          header: {

            “Content-Type”: “application/text”

          },

          method: ‘GET’,

          success: function (res) {

           }

    }

回到顶部