Browse Source

手机号+区号防重复

lizhen_gitee 1 năm trước cách đây
mục cha
commit
f8c8d249db
1 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 6 6
      application/api/controller/User.php

+ 6 - 6
application/api/controller/User.php

@@ -49,7 +49,7 @@ class User extends Api
      */
     public function login()
     {
-        $countrycode = input('countrycode');
+        $countrycode = input('countrycode',86,'intval');
         $account = input('account');
         $password = input('password');
 
@@ -77,7 +77,7 @@ class User extends Api
      */
     public function mobilelogin()
     {
-        $countrycode = input('countrycode');
+        $countrycode = input('countrycode',86,'intval');
         $mobile = input('mobile');
         $captcha = input('captcha');
 
@@ -558,7 +558,7 @@ class User extends Api
     {
         $user = $this->auth->getUser();
         $oldcaptcha = $this->request->request('oldcaptcha');
-        $countrycode = $this->request->request('countrycode');
+        $countrycode = $this->request->request('countrycode',86,'intval');
         $mobile = $this->request->request('mobile');
         $captcha = $this->request->request('captcha');
         if (!$oldcaptcha || !$countrycode || !$mobile || !$captcha) {
@@ -604,7 +604,7 @@ class User extends Api
      */
     public function applebindmobile()
     {
-        $countrycode = $this->request->request('countrycode');
+        $countrycode = $this->request->request('countrycode',86,'intval');
         $mobile    = $this->request->param('mobile');
         $captcha   = $this->request->param('captcha');
         $iosUserId = $this->request->param('ios_user_id','');
@@ -674,7 +674,7 @@ class User extends Api
      */
     public function bindmobile()
     {
-        $countrycode = $this->request->param('countrycode');
+        $countrycode = $this->request->param('countrycode',86,'intval');
         $mobile = $this->request->param('mobile');
         $captcha = $this->request->param('captcha');
         $code = $this->request->param('code');
@@ -782,7 +782,7 @@ class User extends Api
     {
         //$type = input("type");
         $type = 'mobile';
-        $countrycode = input("countrycode");
+        $countrycode = input("countrycode",86,'intval');
         $mobile = input("mobile");
 //        $email = input("email");
         $newpassword = input("newpassword");