public function toLogin() { if (Util::inWeixin()) { $this->toWxLogin(); } else { $this->toDefaultLogin(); } }
public function toLogin() { if (Util::inWeixin()) { $openid = $this->toWxLogin(); if ($openid !== false) { if ($this->doLoginInWx($openid) === true) { UserModel::onLoginOk(0, $openid); } else { // } } else { // } } else { $this->toDefaultLogin(); } }