From f40568c73f5f1dc738efff615498beca47c229eb Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Fri, 3 Jan 2020 00:44:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=98=9B=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applicationKeyUser/applicationKeyUser.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pages/applicationKeyUser/applicationKeyUser.js b/pages/applicationKeyUser/applicationKeyUser.js index 1710d99..4efc5ab 100644 --- a/pages/applicationKeyUser/applicationKeyUser.js +++ b/pages/applicationKeyUser/applicationKeyUser.js @@ -222,6 +222,23 @@ Page({ }, removePhoto:function(e){ console.log(e.detail.index); + let _photoList = []; + this.data.photoList.forEach(function(item,index){ + if (index != e.detail.index){ + _photoList.push(item); + } + }); + let _photos = []; + this.data.photos.forEach(function (item, index) { + if (index != e.detail.index) { + _photos.push(item); + } + }); + + this.setData({ + photos: _photos, + photoList: _photoList + }); }, saveApplicationKey:function(){ //保存钥匙信息 @@ -308,7 +325,7 @@ Page({ data: _objData, //动态数据 success: function (res) { console.log(res); - if(res.resultCode == 200){ + if(res.statusCode == 200){ //成功情况下跳转 wx.redirectTo({ url: "/pages/viewApplicationKeyUser/viewApplicationKeyUser?idCard=" + _objData.idCard