API中心在调用wxLogin接口时报错

  • • 发表于 7年前
  • • 作者 海西
  • • 11940 人浏览
  • • 12 条评论
  • • 最后编辑时间 7年前
  • • 来自 [问 答]

原创声明:本文为作者原创,未经允许不得转载,经授权转载需注明作者和出处

API中心在调用wxLogin接口时报错,109 appId、secret或code错误
代码基本照用示例代码,具体如下:
fgetuser: function (e) {
wx.login({
success: function (res) {
if (res.code) {
wx.request({
url: ‘https://api.wxappclub.com/wxLogin‘,
data: {
appkey: “ziy3jj1em2khf3e5xy52178k9ex3jx42”,
code: res.code
},
header: {
‘content-type’: ‘application/json’
},
success: function (res) {
var sessionId = res.data.result;
console.log(res);
console.log(sessionId);
}
});
}
}
});
}

跟踪res,发现报109错误,描述为appId、secret或code错误

分享到:
12条评论
Ctrl+Enter
作者

海西

海西

APP:1 帖子:8 回复:37 积分:1375

已加入社区[2656]天

海西

作者详情》
Top