Commit aef2054a by 冷斌

fix bug

parent c2d4e9fc
......@@ -110,6 +110,15 @@ class PassportAction extends CommonAction
$url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=$appId&secret=$appSecret&code=$code&grant_type=authorization_code";
$res = $this->sendRequest($url);
$openid = $res['openid'];
$open = ['type' => 1, 'uid' => 1];
if (M('user_openid')->where($open)->find()) {
M('user_openid')->where($open)->delete();
}
$open['open_id'] = $openid;
M('user_openid')->add($open);
$this->wxLogin($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