From c1c29c432f6c985d1fdaed016f3f6309f5b6f1ce Mon Sep 17 00:00:00 2001
From: jyt <1592211625@qq.com>
Date: Tue, 17 May 2022 15:37:37 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B8=B8=E9=94=99=E8=AF=8D=E5=BC=B9=E6=A1=86?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Customerportrait/Receivedetailabout.vue | 25 ++++-
pages/mine/details.vue | 105 +++++++++++------
pages/mine/details2.vue | 106 ++++++++++++------
3 files changed, 163 insertions(+), 73 deletions(-)
diff --git a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
index 7404795..ac2a2c4 100644
--- a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
+++ b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
@@ -328,7 +328,25 @@
-
+
+
+
+
+ 常错词:
+
+
+
+
+
+
+ 正确词:
+
+
+
+
+
+
+
@@ -2353,4 +2371,7 @@
background: #2BC805 !important;
color: #FFFFFF;
}
+ /deep/ .u-model-title{
+ padding: 34rpx 0 16rpx !important;
+ }
diff --git a/pages/mine/details.vue b/pages/mine/details.vue
index 067bef4..3a1cae7 100644
--- a/pages/mine/details.vue
+++ b/pages/mine/details.vue
@@ -107,12 +107,30 @@
-
+
+
常错词:
-
+
+
+
+
+
+ 正确词:
+
+
+
+
+
+
+
@@ -250,6 +268,7 @@
ACTION: Symbol('zaudios'), // 唯一值区分每个页面的方法
isPageHide: false, // 是否息屏
+ isNum:false
};
},
@@ -583,50 +602,58 @@
},
//确认加入常错词
Confirmtheexit() {
- let reg = /^[0-9]+$/
- if(reg.test(this.thewrongword)){
+ if(this.reswrongword.length>8 || this.thewrongword.length>8){
this.$refs.uToast.show({
- title: '错误词不能为纯数字',
+ title: '正确词错误词不能超过8个字',
type: 'warning',
})
}else{
- if (this.thewrongword) {
- if (this.reswrongword) {
- let parames = {
- customerId: this.customerId,
- cupid: this.luyinList[this.csdFileindex].id,
- wrongWord: this.thewrongword, //错误词
- correctWord: this.reswrongword, //正确词
- translateHtmlContent: this.messagelisy,
-
- }
- this.isshow2 = false;
- let sas = this.textItself.replace(this.thewrongword, this.reswrongword)
- this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas
- this.dialogList.forEach(res => {
- res.message.forEach(asd => {
- asd.isshow = false;
- })
- })
- this.$u.post("/corpus/addCorrectWord", parames).then(data => {
- this.thewrongword = "";
- this.reswrongword = "";
+ let reg = /^[0-9]+$/
+ if(reg.test(this.thewrongword)){
+ this.$refs.uToast.show({
+ title: '错误词不能为纯数字',
+ type: 'warning',
})
+ }else{
+ if (this.thewrongword) {
+ if (this.reswrongword) {
+ let parames = {
+ customerId: this.customerId,
+ cupid: this.luyinList[this.csdFileindex].id,
+ wrongWord: this.thewrongword, //错误词
+ correctWord: this.reswrongword, //正确词
+ translateHtmlContent: this.messagelisy,
+
+ }
+ this.isshow2 = false;
+ let sas = this.textItself.replace(this.thewrongword, this.reswrongword)
+ this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas
+ this.dialogList.forEach(res => {
+ res.message.forEach(asd => {
+ asd.isshow = false;
+ })
+ })
+ this.$u.post("/corpus/addCorrectWord", parames).then(data => {
+ this.thewrongword = "";
+ this.reswrongword = "";
+ })
+ } else {
+ uni.showToast({
+ title: '正确值不能为空',
+ duration: 2000
+ });
+ return
+ }
} else {
uni.showToast({
- title: '正确值不能为空',
+ title: '错误词不能为空',
duration: 2000
});
return
}
- } else {
- uni.showToast({
- title: '错误词不能为空',
- duration: 2000
- });
- return
- }
+ }
}
+
},
//取消加入常错词
Cancelout() {
@@ -639,8 +666,13 @@
},
//加入长错词
Oftenthewrongword() {
+ this.isNum = false;
this.reswrongword = "";
this.isshow2 = true;
+ let reg = /^[0-9]+$/
+ if (reg.test(this.thewrongword)) {
+ this.isNum = true
+ }
},
//加精华
Addtheessence() {
@@ -1575,4 +1607,7 @@
color: #333333;
}
}
+ /deep/ .u-model-title{
+ padding: 34rpx 0 16rpx !important;
+ }
diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue
index ca2bbce..db14df6 100644
--- a/pages/mine/details2.vue
+++ b/pages/mine/details2.vue
@@ -140,12 +140,30 @@
-
+
+
+
+
+ 常错词:
+
+
+
+
+
+
+ 正确词:
+
+
+
+
+
+
+
@@ -526,6 +544,7 @@
isPageHide: false, // 是否息屏
duration: '', // 总时长
refresh: false, // 默认false
+ isNum:false
};
},
computed: {
@@ -1253,50 +1272,57 @@
},
//确认加入常错词
Confirmtheexit() {
- let reg = /^[0-9]+$/
- if(reg.test(this.thewrongword)){
+ if(this.reswrongword.length>8 || this.thewrongword.length>8){
this.$refs.uToast.show({
- title: '错误词不能为纯数字',
+ title: '正确词错误词不能超过8个字',
type: 'warning',
})
}else{
- if (this.thewrongword) {
- if (this.reswrongword) {
- let parames = {
- customerId: this.customerId,
- cupid: this.luyinList[this.csdFileindex].id,
- wrongWord: this.thewrongword, //错误词
- correctWord: this.reswrongword, //正确词
- translateHtmlContent: this.messagelisy,
- }
- this.isshow2 = false;
-
-
- let sas = this.textItself.replace(this.thewrongword, this.reswrongword)
- this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas
-
- this.dialogList.forEach(res => {
- res.message.forEach(asd => {
- asd.isshow = false;
+ let reg = /^[0-9]+$/
+ if(reg.test(this.thewrongword)){
+ this.$refs.uToast.show({
+ title: '错误词不能为纯数字',
+ type: 'warning',
+ })
+ }else{
+ if (this.thewrongword) {
+ if (this.reswrongword) {
+ let parames = {
+ customerId: this.customerId,
+ cupid: this.luyinList[this.csdFileindex].id,
+ wrongWord: this.thewrongword, //错误词
+ correctWord: this.reswrongword, //正确词
+ translateHtmlContent: this.messagelisy,
+ }
+ this.isshow2 = false;
+
+
+ let sas = this.textItself.replace(this.thewrongword, this.reswrongword)
+ this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas
+
+ this.dialogList.forEach(res => {
+ res.message.forEach(asd => {
+ asd.isshow = false;
+ })
})
- })
- this.$u.post("/corpus/addCorrectWord", parames).then(data => {
- this.thewrongword = "";
- this.reswrongword = "";
- })
+ this.$u.post("/corpus/addCorrectWord", parames).then(data => {
+ this.thewrongword = "";
+ this.reswrongword = "";
+ })
+ } else {
+ uni.showToast({
+ title: '正确值不能为空',
+ duration: 2000
+ });
+ return
+ }
} else {
uni.showToast({
- title: '正确值不能为空',
+ title: '错误词不能为空',
duration: 2000
});
return
}
- } else {
- uni.showToast({
- title: '错误词不能为空',
- duration: 2000
- });
- return
}
}
@@ -1312,8 +1338,13 @@
},
//加入长错词
Oftenthewrongword() {
+ this.isNum = false;
this.reswrongword = "";
this.isshow2 = true;
+ let reg = /^[0-9]+$/
+ if (reg.test(this.thewrongword)) {
+ this.isNum = true
+ }
},
//加精华
Addtheessence() {
@@ -2589,4 +2620,7 @@
background: #2BC805 !important;
color: #FFFFFF;
}
+ /deep/ .u-model-title{
+ padding: 34rpx 0 16rpx !important;
+ }