|
@@ -65,9 +65,9 @@ class WeixinAuthService extends AxiosService {
|
|
|
}
|
|
|
|
|
|
console.log({ access_token, appid, openid });
|
|
|
- const res = await this.httpGet('https://api.weixin.qq.com/cgi-bin/user/info?lang=zh_CN', { access_token, appid, openid });
|
|
|
- const object = _.pick(res, [ 'nickname', 'headimgurl', 'openid' ]);
|
|
|
- console.log(object);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
const key = `${this.prefix}${state}`;
|
|
|
let fqueries = await this.app.redis.get(key);
|
|
@@ -78,12 +78,12 @@ class WeixinAuthService extends AxiosService {
|
|
|
if (groupid) {
|
|
|
if (type === 'group') {
|
|
|
|
|
|
- const udata = { name: object.nickname, icon: object.headimgurl, openid: object.openid, groupid };
|
|
|
- try {
|
|
|
- await this.ctx.service.patient.create(udata);
|
|
|
- } catch (error) {
|
|
|
- this.logger.error(error);
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
redirect_uri = `${this.ctx.app.config.baseUrl}/mobile`;
|
|
|
} else {
|
|
|
|