Commit 7551d8ca by 冷斌

fix bug

parent aef2054a
......@@ -110,15 +110,6 @@ 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);
}
}
......@@ -168,6 +159,9 @@ class PassportAction extends CommonAction
$openid = $_POST['openid'];
$result = $this->passport->loginLocal($login, $password, $remember);
var_dump($result);
die;
if (!$result) {
$status = 0;
$info = $this->passport->getError();
......
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