diff --git a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
index 35fa36d..867496f 100644
--- a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
+++ b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
@@ -400,7 +400,25 @@
-
+
+
+
+
+ 常错词:
+
+
+
+
+
+
+ 正确词:
+
+
+
+
+
+
+
@@ -2680,4 +2698,7 @@
.rotatearrow {
transform: rotate(270deg);
}
+ /deep/ .u-model-title{
+ padding: 34rpx 0 16rpx !important;
+ }
diff --git a/pages/mine/details.vue b/pages/mine/details.vue
index 06b571b..60310fa 100644
--- a/pages/mine/details.vue
+++ b/pages/mine/details.vue
@@ -145,12 +145,30 @@
-
+
+
+
+
+ 常错词:
+
+
+
+
+
+
+ 正确词:
+
+
+
+
+
+
+
@@ -270,7 +288,8 @@
effectiveitext:'',
textItself:'',
argtextindex1:0,
- argtextindex2:0
+ argtextindex2:0,
+ isNum:false
};
},
onLoad: function(options) {
@@ -804,50 +823,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() {
@@ -860,8 +887,13 @@
},
//加入长错词
Oftenthewrongword() {
+ this.isNum = false;
this.reswrongword = "";
this.isshow2 = true;
+ let reg = /^[0-9]+$/
+ if (reg.test(this.thewrongword)) {
+ this.isNum = true
+ }
},
//加精华
Addtheessence() {
@@ -1852,4 +1884,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 8f4ea6d..df52be6 100644
--- a/pages/mine/details2.vue
+++ b/pages/mine/details2.vue
@@ -215,8 +215,26 @@
-
-
+
+
+
+
+
+ 常错词:
+
+
+
+
+
+
+ 正确词:
+
+
+
+
+
+
+
@@ -496,12 +514,12 @@