From 4653a5874dd728c99992c04a07c2bf16d3851a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Mon, 14 Mar 2022 17:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/customer/detail/index.js | 11 ++++++++++- pages/customer/detail/index.wxml | 27 ++++++++++++++++++++------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/pages/customer/detail/index.js b/pages/customer/detail/index.js index 106364b..5fcaef2 100644 --- a/pages/customer/detail/index.js +++ b/pages/customer/detail/index.js @@ -688,8 +688,16 @@ Page({ let params = {}; params['id'] = this.data.id; _.apiQuery.getAppCustomersTag(params).then(res => { + let taglList = res.data + taglList.forEach(itemA => { + itemA.list.forEach(itemB => { + if(itemB.checked){ + itemA.have=true + } + }) + }) this.setData({ - taglList:res.data, + taglList, }) }); }, @@ -707,6 +715,7 @@ Page({ this.getAppCustomersDetails() this.getAppCustomerData() this.getAppCustomerlogs() + this.getAppCustomersTag() }, //页面上拉触底事件的处理函数 diff --git a/pages/customer/detail/index.wxml b/pages/customer/detail/index.wxml index 489ba11..2c6bed2 100644 --- a/pages/customer/detail/index.wxml +++ b/pages/customer/detail/index.wxml @@ -156,17 +156,30 @@ - - - - {{tag}} - - + + + 客户级别 + + + {{tag}} + + + + + + {{list.name}} + + + {{option.name}} + + + +