From 1604fb76454c855ee92e360716dba9c349ef2294 Mon Sep 17 00:00:00 2001 From: ShenqPerng Date: Fri, 21 Feb 2025 22:38:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=80=82=E9=85=8D=20v0.24?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/oper.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/oper.js b/js/oper.js index 854a662..5554a4e 100644 --- a/js/oper.js +++ b/js/oper.js @@ -194,10 +194,10 @@ function uploadImageNow(base64String, file) { success: function (data) { // 0.24 版本+ 返回体uid已合并到name字段 if (data.name) { - var resUid = data.name.split('/').pop() + // 更新上传的文件信息并暂存浏览器本地 relistNow.push({ "name":data.name, - "uid":resUid, + "createTime":data.createTime, "type":data.type }) chrome.storage.sync.set( @@ -637,7 +637,7 @@ function sendText() { if(info.resourceIdList.length > 0 ){ //匹配图片 $.ajax({ - url:info.apiUrl+'api/v1/'+data.name+'/resources', + url:info.apiUrl+'api/v1/'+data.name, type:"PATCH", data:JSON.stringify({ 'resources': info.resourceIdList || [], @@ -653,7 +653,7 @@ function sendText() { getOne(data.name) } chrome.storage.sync.set( - { open_action: '', open_content: '',resourceIdList:''}, + { open_action: '', open_content: '',resourceIdList:[]}, function () { $.message({ message: chrome.i18n.getMessage("memoSuccess") @@ -664,7 +664,7 @@ function sendText() { ) },error:function(err){//清空open_action(打开时候进行的操作),同时清空open_content chrome.storage.sync.set( - { open_action: '', open_content: '',resourceIdList:'' }, + { open_action: '', open_content: '',resourceIdList:[] }, function () { $.message({ message: chrome.i18n.getMessage("memoFailed")