Commit d5cac657 authored by 李尚科's avatar 李尚科

fix

parent ccfc9e8b
Pipeline #15667 passed with stage
in 7 seconds
...@@ -24,12 +24,13 @@ class WechatController extends Controller { ...@@ -24,12 +24,13 @@ class WechatController extends Controller {
} }
const url = `${WECHAT_AUTH}?appid=${app_id}&secret=${appsecret}&code=${code}&grant_type=authorization_code` const url = `${WECHAT_AUTH}?appid=${app_id}&secret=${appsecret}&code=${code}&grant_type=authorization_code`
const result = await ctx.helper.send_request(url, {}, { method: 'GET' }); const result = await ctx.helper.send_request(url, {}, { method: 'GET' });
ctx.logger.info(JSON.stringify({ wx_gjj_query: result }));
if (result.status !== 200) { if (result.status !== 200) {
ctx.failed('获取openid失败'); ctx.failed('获取openid失败1');
} }
const wx_ret = result.data; const wx_ret = result.data;
if (!wx_ret.openid) { if (!wx_ret.openid) {
ctx.failed('获取openid失败'); ctx.failed('获取openid失败2');
} }
const openid = wx_ret.openid; const openid = wx_ret.openid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment