diff --git a/application/api/controller/Index.php b/application/api/controller/Index.php index df912181..641d16be 100644 --- a/application/api/controller/Index.php +++ b/application/api/controller/Index.php @@ -21,7 +21,6 @@ class Index extends Api { $appsecret = $request->post('appsecret', ''); $client = db('Client')->where('appid', $appid)->where('appsecret', $appsecret)->value('id'); - $client = 1; if ($client) { $this->data['time'] = time(); $tokens = $appid . '|' . $appsecret . '|' . $this->data['time']; diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 8ba93bb9..1ed3168e 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -17,7 +17,9 @@ class User extends Api { return $this->data; } - public function getuser(){ - + public function getuser(\think\Request $request){ + $this->data['code'] = 1; + $this->data['data'] = db('Member')->where('uid', $request->param('uid'))->find(); + return $this->data; } } \ No newline at end of file