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}} + + + +