Exemplo n.º 1
0
 /**
  * Signs user up.
  *
  * @return 企业注册
  */
 public function actionEnterprisesignup()
 {
     $model = new Qyuser();
     if ($model->load(Yii::$app->request->post())) {
         $User = new User();
         if ($userinfo = $User->registerEnterprise($this->request->post('Qyuser'), $this->request->userIP)) {
             if ($userinfo['code'] == 1) {
                 $this->actionTotrans('成功', '登陆页', 'site/login', $userinfo);
             } else {
                 $this->actionTotrans('错误', '返回', 'site/enterprisesignup', $userinfo);
             }
         }
     }
     return $this->render('enterprisesignup', ['model' => $model]);
 }