wugg 1 سال پیش
والد
کامیت
47ce733b49
2فایلهای تغییر یافته به همراه8 افزوده شده و 10 حذف شده
  1. 8 9
      app/common.php
  2. 0 1
      config/app.php

+ 8 - 9
app/common.php

@@ -62,8 +62,7 @@ function curl_request($url,$post=''){
  * @throws \think\exception\DbException
  */
 function VerifyTokens($token){
-    $host = Config::get("app");
-    $url = $host["api_host"]."/Api/verify_token";
+    $url = env("user.hosturl")."verifyToken";
     $data=[
         "token"=>$token
     ];
@@ -79,7 +78,7 @@ function VerifyTokens($token){
 function GetUserlist($token,$condition){
     $host = Config::get("app");
 
-    $url = $host["api_host"]."/Api/getuserlist";
+    $url = env("user.hosturl")."userlist";
     $condition['token']=$token;
     $response=curl_request($url,$condition);
 
@@ -94,7 +93,7 @@ function GetUserlist($token,$condition){
 function GetAccountall($token, $condition){
     $host = Config::get("app");
 
-    $url = $host["api_host"]."/Api/userall";
+    $url = env("user.hosturl")."userall";
     $condition['token']=$token;
     $response=curl_request($url,$condition);
 
@@ -104,7 +103,7 @@ function GetAccountall($token, $condition){
 function GetList($token,$condition){
     $host = Config::get("app");
 
-    $url = $host["api_host"]."/Api/userlist";
+    $url = env("user.hosturl")."userlist";
     $condition['token']=$token;
     $response=curl_request($url,$condition);
 
@@ -113,7 +112,7 @@ function GetList($token,$condition){
 
 function GetUserInfo($token){
     $host = Config::get("app");
-    $url = $host["api_host"]."/Api/userinfo";
+    $url = env("user.hosturl")."userinfo";
     $data=[
         "token"=>$token
     ];
@@ -141,7 +140,7 @@ function checkMobile($mobile){
 function resetinfo($token,$condition){
     $host = Config::get("app");
 
-    $url = $host["api_host"]."/Api/usersave";
+    $url = env("user.hosturl")."usersave";
     $condition['token']=$token;
     $response=curl_request($url,$condition);
 
@@ -156,7 +155,7 @@ function resetinfo($token,$condition){
 function resetstatus($token,$condition){
     $host = Config::get("app");
 
-    $url = $host["api_host"]."/Api/userstatus";
+    $url = env("user.hosturl")."userstatus";
     $condition['token']=$token;
     $response=curl_request($url,$condition);
 
@@ -234,7 +233,7 @@ function made($var,$data=[]){
  */
 function GetInfoById($token,$condition){
     $host = Config::get("app");
-    $url = $host["api_host"]."/Api/userinfobyid";
+    $url = env("user.hosturl")."userinfo";
     $condition['token']=$token;
     $response=curl_request($url,$condition);
     return json_decode($response,true);

+ 0 - 1
config/app.php

@@ -29,5 +29,4 @@ return [
     'error_message'    => '页面错误!请稍后再试~',
     // 显示错误信息
     'show_error_msg'   => false,
-    "api_host"=>"http://inv.sitw.wanyuhengtong.com/"
 ];