From eb97fac4e84966b4be634a4302d7bdcb7a750954 Mon Sep 17 00:00:00 2001 From: xiaou66 <2630316030@qq.com> Date: Thu, 15 Sep 2022 20:15:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20LskyPro=20=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- picturebed-vue/src/api/LskyPro.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/picturebed-vue/src/api/LskyPro.js b/picturebed-vue/src/api/LskyPro.js index 2ec56e1..7d78d37 100644 --- a/picturebed-vue/src/api/LskyPro.js +++ b/picturebed-vue/src/api/LskyPro.js @@ -7,7 +7,9 @@ LskyPro.uploadImage = async (item, id) => { } const formData = new FormData() formData.append('file', item) - formData.append('strategy_id', strategyId) + if (strategyId) { + formData.append('strategy_id', strategyId) + } return await fetch(servicePath + '/api/v1/upload', { method: 'POST', body: formData,