|
@@ -1,7 +1,7 @@
|
|
|
<?php
|
|
|
// 应用公共文件
|
|
|
|
|
|
-use think\facade\Config;
|
|
|
+use app\admin\common\User as CommonUser;use think\facade\Config;
|
|
|
use think\facade\Db;
|
|
|
use think\facade\Filesystem;
|
|
|
use think\helper\Str;
|
|
@@ -115,7 +115,7 @@ function VerifyTokens($token){
|
|
|
// ];
|
|
|
// $response=curl_request($url,$data);
|
|
|
|
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
+ $userCommon = new CommonUser();
|
|
|
$rs = $userCommon->VerifyTokens(['token'=>$token]);
|
|
|
|
|
|
return json_decode($rs,true);
|
|
@@ -128,13 +128,8 @@ function VerifyTokens($token){
|
|
|
* @return mixed
|
|
|
*/
|
|
|
function GetUserlist($token,$condition){
|
|
|
- $host = Config::get("app");
|
|
|
-
|
|
|
- $url = $host["api_host"]."/Api/getuserlist";
|
|
|
- $condition['token']=$token;
|
|
|
- $response=curl_request($url,$condition);
|
|
|
-
|
|
|
- return json_decode($response,true);
|
|
|
+ $userCommon = new CommonUser();
|
|
|
+ return json_decode($userCommon->GetUserlist($condition), true);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -143,23 +138,13 @@ function GetUserlist($token,$condition){
|
|
|
* @return mixed
|
|
|
*/
|
|
|
function GetAccountall($token, $condition){
|
|
|
- $host = Config::get("app");
|
|
|
-
|
|
|
- $url = $host["api_host"]."/Api/userall";
|
|
|
- $condition['token']=$token;
|
|
|
- $response=curl_request($url,$condition);
|
|
|
-
|
|
|
- return json_decode($response,true);
|
|
|
+ $userCommon = new CommonUser();
|
|
|
+ return json_decode($userCommon->GetAccountall($condition), true);
|
|
|
}
|
|
|
|
|
|
-function GetList($token,$condition){
|
|
|
- $host = Config::get("app");
|
|
|
-
|
|
|
- $url = $host["api_host"]."/Api/userlist";
|
|
|
- $condition['token']=$token;
|
|
|
- $response=curl_request($url,$condition);
|
|
|
-
|
|
|
- return json_decode($response,true);
|
|
|
+function GetList($condition){
|
|
|
+ $userCommon = new CommonUser();
|
|
|
+ return json_decode($userCommon->GetUserlist($condition), true);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -168,18 +153,13 @@ function GetList($token,$condition){
|
|
|
* @return mixed
|
|
|
*/
|
|
|
function GetInfoById($token,$condition){
|
|
|
- $host = Config::get("app");
|
|
|
- $url = $host["api_host"]."/Api/userinfobyid";
|
|
|
- $condition['token']=$token;
|
|
|
- $response=curl_request($url,$condition);
|
|
|
- return json_decode($response,true);
|
|
|
+ $userCommon = new CommonUser();
|
|
|
+ return json_decode($userCommon->GetUserInfo($condition), true);
|
|
|
}
|
|
|
|
|
|
function GetInfoNoToken($condition){
|
|
|
- $host = Config::get("app");
|
|
|
- $url = $host["api_host"]."/Api/uinfo";
|
|
|
- $response=curl_request($url,$condition);
|
|
|
- return json_decode($response,true);
|
|
|
+ $userCommon = new CommonUser();
|
|
|
+ return json_decode($userCommon->GetUserInfo($condition), true);
|
|
|
}
|
|
|
|
|
|
function makeNo($str){
|