From f58b6de6afd57be4a81e5dad70374827a14110fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B9=85=E5=93=A5?= <787952492@qq.com> Date: Wed, 20 Apr 2022 15:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=9C=E5=9C=BA=E4=BB=BB=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=9B=BE=E7=89=87=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/farm/task/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/farm/task/index.vue b/src/views/farm/task/index.vue index fd70eda..5d308b2 100644 --- a/src/views/farm/task/index.vue +++ b/src/views/farm/task/index.vue @@ -315,9 +315,11 @@ export default { //图片转json let im = this.form.images; - if(im != null && typeof(im) != 'object'){ - let imgArr = im.split(",") - this.form.images = JSON.stringify(imgArr); + this.form.images = JSON.stringify(""); + if (im) { + //不为空 + let imgArr = im.split(",") + this.form.images = JSON.stringify(imgArr); } // 修改的提交