From 9614e31ebf3542e7ec7dd350347ce844023c0e92 Mon Sep 17 00:00:00 2001 From: net909 Date: Fri, 11 Oct 2024 20:18:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9B=BE=E5=BA=8A=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/utility/imghosting/api/locimg.php | 28 ++++++++++++++++++++++++ plugin/utility/imghosting/index.html | 8 ++----- 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 plugin/utility/imghosting/api/locimg.php diff --git a/plugin/utility/imghosting/api/locimg.php b/plugin/utility/imghosting/api/locimg.php new file mode 100644 index 0000000..181309b --- /dev/null +++ b/plugin/utility/imghosting/api/locimg.php @@ -0,0 +1,28 @@ + $file, + 'fileId' => $filename, + ]; + $data = get_curl($url,$param,$referer,0,0,0,0,['X-Requested-With: XMLHttpRequest']); + $arr = json_decode($data,true); + if(isset($arr['data']['url'])){ + return ['url'=>$arr['data']['url']]; + }elseif(isset($arr['msg'])){ + throw new Exception('上传失败请重试('.$arr['msg'].')'); + }else{ + throw new Exception('上传失败!接口错误'); + } + } +} \ No newline at end of file diff --git a/plugin/utility/imghosting/index.html b/plugin/utility/imghosting/index.html index 6abf705..033e235 100644 --- a/plugin/utility/imghosting/index.html +++ b/plugin/utility/imghosting/index.html @@ -101,12 +101,8 @@ textarea.form-control{min-height: auto;} key: 'dianping' }, { - title: 'VIPKID', - key: 'vipkid' - }, - { - title: '简单图床', - key: 'pngcm' + title: 'LOCIMG', + key: 'locimg' }, { title: 'IMGDD',