|
@@ -202,11 +202,11 @@ class WeixinController extends Controller {
|
|
|
|
|
|
// GET 签到小程序请求用户
|
|
|
async appAuth() {
|
|
|
+ console.warn('in appAuth');
|
|
|
const { js_code, login = true } = this.ctx.query;
|
|
|
- console.warn(`query=>${JSON.stringify(this.ctx.query)}`);
|
|
|
- console.warn(`js_code=>${js_code}`);
|
|
|
const appopenid = await this.ctx.service.weixin.appAuth(js_code);
|
|
|
if (!login) this.ctx.ok(appopenid);
|
|
|
+ console.warn(`openid=>${appopenid}`);
|
|
|
const res = await this.findByAppOpenid(appopenid);
|
|
|
this.ctx.ok(res);
|
|
|
}
|