rabin 7 years ago
parent
commit
62742e4d08
3 changed files with 15 additions and 0 deletions
  1. 1 0
      content/v1/Login.php
  2. 12 0
      passport/database/user.php
  3. 2 0
      passport/src/Login.php

+ 1 - 0
content/v1/Login.php

@@ -73,6 +73,7 @@ class Login
      * @apiParam {String} nickname 用户昵称
      * @apiParam {String} avatarurl 头像
      * @apiParam {String} gender 性别
+     * @apiParam {Number} mobile 手机号(目前没有手机号)
      * @apiParam {String} city 城市
      * @apiParam {String} province 省份
      * @apiParam {String} country 国家

+ 12 - 0
passport/database/user.php

@@ -56,6 +56,18 @@ return array
 			'list'		=> true,
 		),
 
+		'mobile'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手机号',
+			'default' 	=> '',
+			'desc' 		=> '手机号',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
 		'pic'		=> array
 		(
 			'type' 		=> 'varchar-150',

+ 2 - 0
passport/src/Login.php

@@ -47,6 +47,7 @@ class Login extends Base
         $pic = Dever::input('avatarurl');
         $sex = Dever::input('gender');
         $city = Dever::input('city');
+        $mobile = Dever::input('mobile');
         $province = Dever::input('province');
         $country = Dever::input('country');
 
@@ -56,6 +57,7 @@ class Login extends Base
             $update['set_pic'] = $pic;
             $update['set_sex'] = $sex;
             $update['set_city'] = $city;
+            $update['set_mobile'] = $mobile;
             $update['set_province'] = $province;
             $update['set_country'] = $country;
             $update['where_id'] = $uid;