作者 潘浩文
1 个管道 的构建 通过 耗费 0 秒

用户注册渲染

... ... @@ -28,32 +28,19 @@ class RegisterController extends WeChatBaseController
*/
public function index()
{
$redirect = $this->request->post("redirect");
if (empty($redirect)) {
$redirect = $this->request->server('HTTP_REFERER');
} else {
$redirect = base64_decode($redirect);
}
session('login_http_referer', $redirect);
if (cmf_is_user_login()) {
return redirect($this->request->root() . '/');
} else {
return $this->fetch(":register");
$re=$this->is_login();
if ($re['status']==1) {
return $this->redirect(url('portal/index/index'));
}
}
//手机号注册页
public function register()
{
$user = Db::name('users')->where('open_id', session('wechat_user')['id'])->find();
if (!$user) {
return $this->fetch(':register');
} else {
return $this->fetch(':index');
}
}
//ajax获取验证码
public function getCode()
{
$clnt = YunpianClient::create('ae02d6c1c41748b663c3f31ba5a03da8');
... ... @@ -72,7 +59,7 @@ class RegisterController extends WeChatBaseController
}
/**
* 前台用户注册提交
* 前台用户注册ajax提交
*/
public function doRegister()
{
... ... @@ -85,4 +72,12 @@ class RegisterController extends WeChatBaseController
return $re;
}
}
//个人信息
public function info(){
$re=$this->is_login();
if ($re['status']==1) {
return $this->redirect(url('portal/index/index'));
}
}
}
\ No newline at end of file
... ...