From f3f71017dfac903da4ae137755de428a23d00cdb Mon Sep 17 00:00:00 2001 From: augushong Date: Wed, 18 Nov 2020 12:22:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96appurl=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/common.php b/app/common.php index 1dbe880..4c032de 100644 --- a/app/common.php +++ b/app/common.php @@ -15,12 +15,8 @@ use app\model\Admin; use app\model\AdminPermission; use app\model\SystemConfig; use think\facade\Cache; -use League\Flysystem\Util\MimeType; -use think\File; -use think\facade\Filesystem; -use app\model\UploadFiles; -use think\app\Url; use think\facade\Session; +use think\route\Url as RouteUrl; function json_message($data = [], $code = 0, $msg = '') { @@ -36,7 +32,7 @@ function json_message($data = [], $code = 0, $msg = '') $msg = $data; $data = []; } - } else if ($data instanceof Url) { + } else if ($data instanceof RouteUrl) { $data = [ 'jump_to_url' => (string)$data ]; @@ -248,7 +244,7 @@ function get_order_sn($start = '', $end = '') * @param boolean $domain * @return void */ -function app_url(string $url = '', array $vars = [], $suffix = true, $domain = false) +function app_url(string $url = '', array $vars = [], $suffix = true, $domain = false): RouteUrl { $url_result = explode('@', $url);