From 32526e5bddb7b14328b2467cd18783f480b33f3b Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期六, 31 八月 2024 01:51:53 +0800 Subject: [PATCH] update合伙人 --- mixin/mixin.js | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/mixin/mixin.js b/mixin/mixin.js index ee51659..ad5ad6e 100644 --- a/mixin/mixin.js +++ b/mixin/mixin.js @@ -78,6 +78,10 @@ this.regUserName = e.detail.value; // 获取微信昵称 }, + handleContact(e) { + console.log(e.detail.path) + console.log(e.detail.query) + }, @@ -127,14 +131,29 @@ } else { //根据id去重正常 var ids = [] + var idsMap = {} for (var item of this.list) { ids.push(item.id) + if (item.id) { + idsMap[item.id] = item + } } + var hasnew = false for (var item of data.records) { if (ids.indexOf(item.id) < 0) { this.list.push(item) + } else { + //最好更新一下 + idsMap[item.id] = { + ...idsMap[item.id], + ...item, //覆盖了 + } + hasnew = true } } + if (hasnew) { + this.$forceUpdate() + } } this.page.total = data.total || 0 -- Gitblit v1.9.3