From a44967473985bbefe2cb265b47be7c93d335bb1b Mon Sep 17 00:00:00 2001 From: net909 Date: Mon, 30 Dec 2024 22:27:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E6=9C=BA=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/Auth.php | 3 +++ app/lib/QQTool.php | 17 +++++++++------ config/app.php | 2 +- plugin/utility/imghosting/api/cdn58.php | 2 +- plugin/utility/imghosting/api/ucloud.php | 27 ++++++++++++++++++++++++ plugin/utility/imghosting/index.html | 10 ++++++--- plugin/web/ip/index.html | 6 +++--- plugin/wqq/online_device/App.php | 4 ++-- plugin/wqq/online_device/index.html | 8 +++---- 9 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 plugin/utility/imghosting/api/ucloud.php diff --git a/app/controller/Auth.php b/app/controller/Auth.php index 7894bbd..9d663c1 100644 --- a/app/controller/Auth.php +++ b/app/controller/Auth.php @@ -211,6 +211,9 @@ class Auth extends Base case 'qqid': return ['1','https://id.qq.com/index.html' ,'我的QQ中心']; break; + case 'vip': + return ['18','https://club.vip.qq.com/onlinestatus/set' ,'QQ会员']; + break; default: return null; break; diff --git a/app/lib/QQTool.php b/app/lib/QQTool.php index eb7a669..2ef402f 100644 --- a/app/lib/QQTool.php +++ b/app/lib/QQTool.php @@ -189,18 +189,21 @@ class QQTool{ public function set_online_status($model, $desc, $imei){ $pt4_token = getSubstr($this->cookie, 'pt4_token=', ';'); + $referer = 'https://club.vip.qq.com/onlinestatus/set?_wv=67109895&_wvx=10&_proxy=1&src=2'; $ua = 'Mozilla/5.0 (Linux; Android 12; IN2010 Build/RKQ1.211119.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 V1_AND_SQ_8.8.68_2538_YYB_D A_8086800 QQ/8.8.88 NetType/4G'; - $data = json_encode(['13031'=>['req'=>['sModel'=>$model, 'iAppType'=>3, 'sIMei'=>$imei, 'sVer'=>'8.8.88', 'sManu'=>'', 'lUin'=>intval($this->uin), 'bShowInfo'=>true, 'sDesc'=>$desc, 'sModelShow'=> $model]]]); - $url = 'https://proxy.vac.qq.com/cgi-bin/srfentry.fcgi?ts='.time().'000&g_tk='.$this->gtk.'&data='.rawurlencode($data).'&pt4_token='.urlencode($pt4_token); - $data = get_curl($url, 0, 'https://proxy.vac.qq.com/', $this->cookie, 0, $ua); + $param = ['servicesName'=>'VIP.CustomOnlineStatusServer.CustomOnlineStatusObj', 'cmd'=>'SetCustomOnlineStatus', 'args'=>[['sModel'=>$model, 'iAppType'=>3, 'sIMei'=>$imei, 'sVer'=>'8.8.88', 'sManu'=>'', 'lUin'=>intval($this->uin), 'bShowInfo'=>true, 'sDesc'=>$desc, 'sModelShow'=> $model]]]; + $url = 'https://club.vip.qq.com/srf-cgi-node?srfname=VIP.CustomOnlineStatusServer.CustomOnlineStatusObj.SetCustomOnlineStatus&ts='.time().'000&daid=18&g_tk='.$this->gtk.'&pt4_token='.urlencode($pt4_token); + $data = get_curl($url, json_encode($param), $referer, $this->cookie, 0, $ua, 0, ['Content-Type: application/json']); $arr = json_decode($data, true); if(!$arr){ - throw new Exception('修改在线状态失败'); - }elseif(isset($arr['ecode']) && $arr['ecode']==0){ - if(isset($arr['13031']['ret']) && $arr['13031']['ret']==0){ + throw new Exception('修改在线状态失败,返回数据解析失败'); + }elseif(isset($arr['ret']) && $arr['ret']==0){ + if(isset($arr['data']['rsp']['iRet']) && $arr['data']['rsp']['iRet']==0){ return true; + }elseif(isset($arr['data']['rsp']['sMsg'])){ + throw new Exception('修改在线状态失败,'.$arr['data']['rsp']['sMsg']); }else{ - throw new Exception('修改在线状态失败,'.$arr['13031']['msg']); + throw new Exception('修改在线状态失败,'.$data); } }else{ throw new Exception('修改在线状态失败,'.$data); diff --git a/config/app.php b/config/app.php index 5ae241d..a0f658f 100644 --- a/config/app.php +++ b/config/app.php @@ -33,5 +33,5 @@ return [ 404 => \think\facade\App::getRootPath() . 'public/404.html', ], 'version' => '1.9', - 'ver' => 1090 + 'ver' => 1091 ]; diff --git a/plugin/utility/imghosting/api/cdn58.php b/plugin/utility/imghosting/api/cdn58.php index 12fa507..ef771a4 100644 --- a/plugin/utility/imghosting/api/cdn58.php +++ b/plugin/utility/imghosting/api/cdn58.php @@ -8,7 +8,7 @@ use plugin\utility\imghosting\api; class cdn58 implements api { public function upload($filepath, $filename){ - $url = 'https://upload.58cdn.com.cn/json'; + $url = 'https://upload.58cdn.com.cn/json/nowater/webim/big/'; $referer = 'https://ai.58.com/pc/'; $imgdata = base64_encode(file_get_contents($filepath)); $params = [ diff --git a/plugin/utility/imghosting/api/ucloud.php b/plugin/utility/imghosting/api/ucloud.php new file mode 100644 index 0000000..8588503 --- /dev/null +++ b/plugin/utility/imghosting/api/ucloud.php @@ -0,0 +1,27 @@ +setPostFilename($filename); + $param = [ + 'file' => $file, + ]; + $data = get_curl($url,$param,$url,0,0,0,0,['Authorization: UCloud TOKEN_12134567890']); + $arr = json_decode($data,true); + if(isset($arr['Files']) && !empty($arr['Files'])){ + return ['url'=>'https://uchat.cn-bj.ufileos.com/'.$arr['Files'][0]]; + }elseif(isset($arr['Message'])){ + throw new Exception('上传失败请重试('.$arr['Message'].')'); + }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 033e235..bb77046 100644 --- a/plugin/utility/imghosting/index.html +++ b/plugin/utility/imghosting/index.html @@ -97,8 +97,12 @@ textarea.form-control{min-height: auto;} data: { apitypes: [ { - title: '大众点评', - key: 'dianping' + title: 'Ucloud', + key: 'ucloud' + }, + { + title: '58同城', + key: 'cdn58' }, { title: 'LOCIMG', @@ -141,7 +145,7 @@ textarea.form-control{min-height: auto;} ] }, output: [], - apitype: 'dianping', + apitype: 'ucloud', imgurl: '' }, progress: 0, diff --git a/plugin/web/ip/index.html b/plugin/web/ip/index.html index a295e0f..3e42d72 100644 --- a/plugin/web/ip/index.html +++ b/plugin/web/ip/index.html @@ -79,15 +79,15 @@ new Vue({ data: { query_disabled: true, input: '', - apitype: 'amap', + apitype: 'ip138', result_input: '', result_type: 'IP', showresult: false, apitypes: [ - { + /*{ title: '高德地图', key: 'amap' - }, + },*/ { title: 'IP138', key: 'ip138' diff --git a/plugin/wqq/online_device/App.php b/plugin/wqq/online_device/App.php index e8b3ceb..e27b3fc 100644 --- a/plugin/wqq/online_device/App.php +++ b/plugin/wqq/online_device/App.php @@ -14,7 +14,7 @@ class App extends Plugin public function index() { - $logininfo = session('qq_cookie_qzone'); + $logininfo = session('qq_cookie_vip'); $error = null; if($logininfo){ View::assign('isqqlogin', 1); @@ -34,7 +34,7 @@ class App extends Plugin $imei = input('post.imei', null, 'trim'); if(!$imei) return msg('error','IMEI不能为空'); - $logininfo = session('qq_cookie_qzone'); + $logininfo = session('qq_cookie_vip'); if(!$logininfo){ return msg('error', '请先登录'); } diff --git a/plugin/wqq/online_device/index.html b/plugin/wqq/online_device/index.html index 303aab4..a6f9485 100644 --- a/plugin/wqq/online_device/index.html +++ b/plugin/wqq/online_device/index.html @@ -12,9 +12,9 @@
此工具可自定义QQ在线状态设备名,需要SVIP
{if $isqqlogin==0} -

当前登录的账号:未登录   立即登录

+

当前登录的账号:未登录   立即登录

{else} -

当前登录的账号:{$logininfo.nickname|raw}({$logininfo.uin})   更换账号

+

当前登录的账号:{$logininfo.nickname|raw}({$logininfo.uin})   更换账号

{/if}
@@ -56,7 +56,7 @@ @@ -75,7 +75,7 @@ new Vue({ el: '#app', data: { - model: 'iPhone 13 Pro Max', + model: 'iPhone 16 Pro Max', desc: '', imei: '', showresult: false,