浏览代码

注册接口

lizhen_gitee 3 月之前
父节点
当前提交
03f15538fa
共有 1 个文件被更改,包括 17 次插入1 次删除
  1. 17 1
      application/api/controller/User.php

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

@@ -71,12 +71,28 @@ class User extends Api
             $res = $this->auth->register('', '', '',$mobile, $extend);
             $res = $this->auth->register('', '', '',$mobile, $extend);
         }
         }
         if($res) {
         if($res) {
-            $this->success("登录成功!",$this->auth->getUserinfo());
+            $this->success("登录成功!",$this->auth->getUserinfo_simple());
         } else {
         } else {
             $this->error($this->auth->getError());
             $this->error($this->auth->getError());
         }
         }
     }
     }
 
 
+    /**
+     * json 请求
+     * @param $url
+     * @return mixed
+     */
+    private function getJson($url){
+        $ch = curl_init();
+        curl_setopt($ch, CURLOPT_URL, $url);
+        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+        $output = curl_exec($ch);
+        curl_close($ch);
+        return json_decode($output, true);
+    }
+
 
 
     //用户详细资料
     //用户详细资料
     public function userInfo(){
     public function userInfo(){