|
@@ -25,8 +25,8 @@ class WeixinController extends Controller {
|
|
|
// store - 默认,认证结果写入sessionStore,然后重定向回请求页面(要求请求页面和认证服务在同一域名下)
|
|
|
// token - url带上token参数重定向到原始地址
|
|
|
async auth() {
|
|
|
- console.log('in function:');
|
|
|
const { redirect_uri, code, test, type, response_type = 'store', uid, qrcode, msgid, objid } = this.ctx.query;
|
|
|
+ console.log(`code=${code}`);
|
|
|
if (test) {
|
|
|
return await this.authTest();
|
|
|
}
|
|
@@ -81,7 +81,7 @@ class WeixinController extends Controller {
|
|
|
console.log('function in');
|
|
|
console.log('openid--->' + openid);
|
|
|
if (openid) {
|
|
|
-
|
|
|
+
|
|
|
const { redirect_uri, type, uid, qrcode, msgid, objid } = JSON.parse(val);
|
|
|
console.log('redirect_uri-->' + redirect_uri);
|
|
|
const user = await this.ctx.service.user.findByOpenid(openid);
|