更新 'SrcJyPublic.js'

master
src48597962 4 months ago
parent ec6cc459ab
commit bd8205cf1b
  1. 6
      SrcJyPublic.js

@ -983,12 +983,12 @@ function shareResource() {
} }
let textcontent = globalMap0.getVar('Jy_gmParams').zip(JSON.stringify(text)); let textcontent = globalMap0.getVar('Jy_gmParams').zip(JSON.stringify(text));
try{ try{
log('content='+textcontent+'&path='+it.path+'&auth_code='+it.token); log('1');
let pasteupdate = JSON.parse(request('https://pasteme.tyrantg.com/api/update', { let pasteupdate = JSON.parse(request('https://pasteme.tyrantg.com/api/update', {
body: 'content='+textcontent+'&path='+it.path+'&auth_code='+it.token, body: 'content='+textcontent+'&path='+it.path+'&auth_code='+it.token,
method: 'POST' method: 'POST'
})); }));
log('2');
if(pasteupdate.result_code=="SUCCESS"){ if(pasteupdate.result_code=="SUCCESS"){
let resources = Juconfig['shareResource'] || []; let resources = Juconfig['shareResource'] || [];
const index = resources.findIndex(item => item.path === it.path); const index = resources.findIndex(item => item.path === it.path);
@ -1004,7 +1004,7 @@ function shareResource() {
return 'toast://分享同步云端失败,'+pasteupdate.message; return 'toast://分享同步云端失败,'+pasteupdate.message;
} }
} catch (e) { } catch (e) {
log('分享上传云端失败:'+e.message); log('分享上传云端失败:'+e.message + " 错误行#" + e.lineNumber);
return 'toast://分享上传云端失败,网络或内容出错'; return 'toast://分享上传云端失败,网络或内容出错';
} }
}, },

Loading…
Cancel
Save