Commit d2bc2636 by 冷斌

fix bug

parent 06fe5456
......@@ -162,11 +162,12 @@ class PassportAction extends CommonAction
$status = 1;
$info = $this->passport->getSuccess();
//$data = ($GLOBALS['ts']['site']['home_url'])?$GLOBALS['ts']['site']['home_url']:0;
$open = ['type' => 1, 'open_id' => $openid, 'uid' => $result['uid']];
if (!M('user_openid')->where($open)->find()) {
M('user_openid')->add($open);
$open = ['type' => 1, 'uid' => $result['uid']];
if (M('user_openid')->where($open)->find()) {
M('user_openid')->where($open)->delete();
}
$open['open_id'] = $openid;
M('user_openid')->add($open);
$data = U('classroom/Index/index');
}
......
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