|
@@ -66,13 +66,7 @@ class WeixinController extends Controller {
|
|
|
console.log('code-->' + code);
|
|
|
|
|
|
const { weixin } = this.ctx.service;
|
|
|
- let openid;
|
|
|
- try {
|
|
|
- ({ openid } = await weixin.fetch(code));
|
|
|
- } catch (err) {
|
|
|
- await this.ctx.render('error.njk', { title: err.message, message: err.details });
|
|
|
- return;
|
|
|
- }
|
|
|
+ const openid = await weixin.fetch(code);
|
|
|
console.log('openid--->' + openid);
|
|
|
if (openid) {
|
|
|
const key = `visit:auth:state:${state}`;
|