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 @@
常错词:
-
+
@@ -407,7 +407,7 @@
取消
- 确认
+ 确认
@@ -869,20 +869,28 @@
title: '提示',
content: msg,
success: function(res) {
- if (res.confirm) {
- let parames = {
- id: that.customerId,
- validInvalid: '',
- invalidReason: 0
- }
- if (that.userlistobj.validInvalid == 0) {
- parames.validInvalid = 1;
- } else {
- parames.validInvalid = 0;
- }
- that.$u.post("/customer/updateValidInvalid", parames).then(res => {
- that.Thetapeidisshow = false;
- })
+ if (that.noClick) {
+ that.noClick= false;
+ if (res.confirm) {
+ let parames = {
+ id: that.customerId,
+ validInvalid: '',
+ invalidReason: 0
+ }
+ if (that.userlistobj.validInvalid == 0) {
+ parames.validInvalid = 1;
+ } else {
+ parames.validInvalid = 0;
+ }
+ that.$u.post("/customer/updateValidInvalid", parames).then(res => {
+ that.Thetapeidisshow = false;
+ })
+ }
+ setTimeout(()=> {
+ that.noClick= true;
+ }, 2000)
+ } else {
+ // 这里是重复点击的判断
}
}
});
@@ -1277,6 +1285,8 @@
title: '正确词错误词不能超过8个字',
type: 'warning',
})
+
+ this.isshow2 = true;
}else{
let reg = /^[0-9]+$/
if(reg.test(this.thewrongword)){
@@ -1284,6 +1294,8 @@
title: '错误词不能为纯数字',
type: 'warning',
})
+
+ this.isshow2 = true;
}else{
if (this.thewrongword) {
if (this.reswrongword) {
@@ -1310,17 +1322,19 @@
this.reswrongword = "";
})
} else {
- uni.showToast({
+ this.$refs.uToast.show({
title: '正确值不能为空',
- duration: 2000
- });
+ type: 'warning',
+ })
+ this.isshow2 = true;
return
}
} else {
- uni.showToast({
+ this.$refs.uToast.show({
title: '错误词不能为空',
- duration: 2000
- });
+ type: 'warning',
+ })
+ this.isshow2 = true;
return
}
}
diff --git a/pages/mine/reception/addreception.vue b/pages/mine/reception/addreception.vue
index ffcc9c1..4af0995 100644
--- a/pages/mine/reception/addreception.vue
+++ b/pages/mine/reception/addreception.vue
@@ -71,7 +71,7 @@
- 确定
+ 确定
@@ -89,7 +89,8 @@
export default {
data() {
- return {
+ return {
+ noClick: true,
Showhiddenunits: false,
list: [{
label: '自然到访',