From fca948e647b9ce832e111a5e071c3dab601785ba Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Mon, 12 Jun 2023 16:46:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'test.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/test.js b/test.js index 4f67e900..b6a30205 100644 --- a/test.js +++ b/test.js @@ -1,17 +1,3 @@ function(input) { - require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJyAliPublic.js'); - if(userinfo.access_token){ - headers.authorization = "Bearer " + userinfo.access_token; - let drive_id = userinfo.default_drive_id; - let postdata = {"drive_id":drive_id,"limit":100,"query":"name match \""+input+"\" and type = \"folder\"","image_thumbnail_process":"image/resize,w_200/format,jpeg","image_url_process":"image/resize,w_1920/format,jpeg","video_thumbnail_process":"video/snapshot,t_1000,f_jpg,ar_auto,w_300","order_by":"updated_at DESC"} - let list = JSON.parse(request('https://api.aliyundrive.com/adrive/v3/file/search', { headers: headers, body: postdata, method: 'POST', timeout: 3000 })).items; - let data = list.map(item => { - return { - title: item.name, - url: item.file_id - } - }) - return data; - } - return []; + } \ No newline at end of file