From 81050f92e26a57b3a22bcb9a719eac67bfc99bcd Mon Sep 17 00:00:00 2001 From: jyt <1592211625@qq.com> Date: Wed, 18 May 2022 10:29:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=A4=9A=E6=AC=A1=E7=82=B9?= =?UTF-8?q?=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 5 ++- pages/index/customer.vue | 31 +++++++++----- pages/mine/details.vue | 40 ++++++++++-------- pages/mine/details2.vue | 58 +++++++++++++++++---------- pages/mine/reception/addreception.vue | 5 ++- 5 files changed, 87 insertions(+), 52 deletions(-) diff --git a/main.js b/main.js index b13b1ce..679edb8 100644 --- a/main.js +++ b/main.js @@ -17,7 +17,10 @@ Vue.prototype.$zaudio = zaudio Vue.prototype.$dayjs = dayjs; Vue.prototype.$store = store; - +import common from 'utils/common.js' +Vue.prototype.$noMultipleClicks = common.noMultipleClicks; + + // 引入全局uView import uView from 'uview-ui' Vue.use(uView); diff --git a/pages/index/customer.vue b/pages/index/customer.vue index 11e80c5..9d9e584 100644 --- a/pages/index/customer.vue +++ b/pages/index/customer.vue @@ -162,6 +162,7 @@ export default { data() { return { + noClick:true, // tabbar配置项 current: 0, tabbarList: tabbarList, @@ -319,17 +320,25 @@ content: "确定更改当前客户接待状态为结束?", cancelColor: "#999999", success: res => { - if (res.confirm) { - this.$u.post("/customer/endReception", { - id: id, - houseId: this.buildingID - }).then(res => { - uni.showToast({ - icon: "none", - title: "操作成功" - }) - this.init(); - }); + if (this.noClick) { + this.noClick= false; + if (res.confirm) { + this.$u.post("/customer/endReception", { + id: id, + houseId: this.buildingID + }).then(res => { + uni.showToast({ + icon: "none", + title: "操作成功" + }) + this.init(); + }); + } + setTimeout(()=> { + this.noClick= true; + }, 2000) + } else { + // 这里是重复点击的判断 } } }) diff --git a/pages/mine/details.vue b/pages/mine/details.vue index 3a1cae7..56f0235 100644 --- a/pages/mine/details.vue +++ b/pages/mine/details.vue @@ -183,7 +183,7 @@ 取消 - 确认 + 确认 @@ -370,27 +370,35 @@ //标记 alllogo() { let msg = ''; + var that = this; if (this.userlistobj.validInvalid != 0) { msg = '是否标记为"有效录音"?'; uni.showModal({ title: '提示', content: msg, success: (res) => { - if (res.confirm) { - let parames = { - id: this.customerId, - validInvalid: '', - invalidReason: 0 - } - if (this.userlistobj.validInvalid == 0) { - parames.validInvalid = 1; - } else { - parames.validInvalid = 0; - } - this.$u.post("/customer/updateValidInvalid", parames).then(res => { - console.log(res) - this.gituserlist() - }) + if (that.noClick) { + that.noClick= false; + if (res.confirm) { + let parames = { + id: this.customerId, + validInvalid: '', + invalidReason: 0 + } + if (this.userlistobj.validInvalid == 0) { + parames.validInvalid = 1; + } else { + parames.validInvalid = 0; + } + this.$u.post("/customer/updateValidInvalid", parames).then(res => { + console.log(res) + this.gituserlist() + }) + } + setTimeout(()=> { + that.noClick= true; + }, 2000) + } } }); diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue index db14df6..d3feaf5 100644 --- a/pages/mine/details2.vue +++ b/pages/mine/details2.vue @@ -146,7 +146,7 @@ 常错词: -