ソースを参照

注册用户时注册钱包

lizhen_gitee 7 ヶ月 前
コミット
509afc442f

+ 2 - 1
application/api/controller/User.php

@@ -38,7 +38,7 @@ class User extends Api
     }
 
     /**
-     * 会员登录
+     * 会员登录+教练登录
      *
      * @ApiMethod (POST)
      * @param string $account  账号
@@ -76,6 +76,7 @@ class User extends Api
      */
     public function mobilelogin()
     {
+        exit;//因不想花短信钱,停用了
         $countrycode = input('countrycode',65,'intval');
         $mobile = input('mobile');
         $captcha = input('captcha');

+ 3 - 0
application/common/library/Auth.php

@@ -216,6 +216,9 @@ class Auth
             //设置登录状态
             $this->_logined = true;
 
+            //注册钱包
+            Db::name('user_wallet')->insertGetId(['user_id'=>$user->id]);
+
             //注册成功的事件
             Hook::listen("user_register_successed", $this->_user, $data);
             Db::commit();