Exemplo n.º 1
0
 public function actionStep1()
 {
     if ($_POST['phone'] && $_POST['password'] && $_POST['code'] && $_POST['password_repeat']) {
         if ($_POST['url_code']) {
             $invitation_code = $_POST['url_code'];
         } else {
             $invitation_code = $_POST['invitation_code'];
         }
         $member = member::wechatregister($_POST['phone'], $_POST['password'], $_POST['password_repeat'], $_POST['code'], '4', $invitation_code);
         if ($member['errorNum'] == 1) {
             return $this->goBack(['info' => $member['errorMsg']], Url::to(['signup']));
         }
         return $this->view('member', compact("model"));
     } else {
         return $this->view('signup');
     }
 }