From 443970d93d3e9f90fbb859ae4f64fbdd9be4aba1 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Thu, 17 Oct 2024 20:51:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyPublic.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyPublic.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SrcJyPublic.js b/SrcJyPublic.js index 3b3d5da0..7f57b95d 100644 --- a/SrcJyPublic.js +++ b/SrcJyPublic.js @@ -984,10 +984,13 @@ function shareResource() { let textcontent = globalMap0.getVar('Jy_gmParams').zip(JSON.stringify(text)); try{ log('1'); - let pasteupdate = JSON.parse(request('https://pasteme.tyrantg.com/api/update', { - body: 'content='+textcontent+'&path='+it.path+'&auth_code='+it.token, - method: 'POST' - })); + let json = request('https://pasteme.tyrantg.com/api/update', { + "content-type": "application/x-www-form-urlencoded", + "body": 'content='+textcontent+'&path='+it.path+'&auth_code='+it.token, + "method": 'POST' + }) + log(json); + let pasteupdate = JSON.parse(json); log('2'); if(pasteupdate.result_code=="SUCCESS"){ let resources = Juconfig['shareResource'] || [];