Browse Source

访客登记表

dev
jyt 2 years ago
parent
commit
9d512fae1b
3 changed files with 89 additions and 64 deletions
  1. +57
    -49
      pages/mine/details2.vue
  2. +2
    -4
      pages/mine/registerCode.vue
  3. +30
    -11
      pages/mine/registerForm.vue

+ 57
- 49
pages/mine/details2.vue View File

@@ -1551,54 +1551,61 @@
}); });
}, },
//确认加入常错词 //确认加入常错词
Confirmtheexit() {
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: '错误词不能为空',
duration: 2000
});
return
}
}
Confirmtheexit() {
if(this.reswrongword.length>8 || this.thewrongword.length>8){
this.$refs.uToast.show({
title: '正确词错误词不能超过8个字',
type: 'warning',
})
}else{
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: '错误词不能为空',
duration: 2000
});
return
}
}
}
}, },
//取消加入常错词 //取消加入常错词
Cancelout() { Cancelout() {
@@ -1610,7 +1617,8 @@
}) })
}, },
//加入长错词 //加入长错词
Oftenthewrongword() {
Oftenthewrongword() {
this.isNum = false;
this.reswrongword = ""; this.reswrongword = "";
this.isshow2 = true; this.isshow2 = true;
let reg = /^[0-9]+$/ let reg = /^[0-9]+$/


+ 2
- 4
pages/mine/registerCode.vue View File

@@ -16,19 +16,17 @@
return { return {
qrCodeUrl: "", qrCodeUrl: "",
projectId:"", projectId:"",
projectName:"",
appid:"", appid:"",
}; };
}, },
onShow() { onShow() {
this.projectId = uni.getStorageSync('buildingID').id; this.projectId = uni.getStorageSync('buildingID').id;
this.projectName = uni.getStorageSync('buildingID').name;
this.appid = uni.getAccountInfoSync().miniProgram.appId; this.appid = uni.getAccountInfoSync().miniProgram.appId;
this.qrCodeUrl = domain.baseUrl; this.qrCodeUrl = domain.baseUrl;
}, },
methods: {
methods: {
down() { down() {
let url = this.qrCodeUrl+'/customer/getQrCode?appid='+this.appid+'&page=pages/mine/registerForm&scene='+this.projectId+'&projectName='+this.projectName
let url = this.qrCodeUrl+'/customer/getQrCode?appid='+this.appid+'&page=pages/mine/registerForm&scene='+this.projectId
console.log(url) console.log(url)
uni.getImageInfo({ uni.getImageInfo({
src:url, src:url,


+ 30
- 11
pages/mine/registerForm.vue View File

@@ -88,9 +88,12 @@
<text class="books" @click="openModel">《{{tit}}》</text> <text class="books" @click="openModel">《{{tit}}》</text>
</view> </view>
</view> </view>
<u-modal v-model="modelShow" @confirm="readOk" :title="tit" width="720rpx">
<view class="slot-content" style="padding: 20rpx;">
<rich-text :nodes="content"></rich-text>
<u-modal v-model="modelShow" :title="tit" width="720rpx" :mask-close-able="true" :show-confirm-button="false">
<view class="slot-content" style="padding:0 20rpx;">
<u-icon class="close" @click="readOk" name="close-circle" color="#CCCCCC" size="60"></u-icon>
<view class="cont">
<rich-text :nodes="content"></rich-text>
</view>
</view> </view>
</u-modal> </u-modal>
@@ -131,7 +134,7 @@
projectId: '', projectId: '',
projectName: 'xxx', projectName: 'xxx',
version:"", version:"",
checked: false,
checked: true,
}, },
pname:"", pname:"",
daitiReceptionobj: {}, daitiReceptionobj: {},
@@ -144,10 +147,9 @@
}; };
}, },
onLoad(options) { onLoad(options) {
const sceneStr = decodeURIComponent(options.scene);
console.log(options) console.log(options)
this.parames.projectId = sceneStr
this.pname = options.projectName
const sceneStr = decodeURIComponent(options.scene);
this.parames.projectId = sceneStr
this.initFetch() this.initFetch()
}, },
watch: { watch: {
@@ -179,16 +181,18 @@
url: config.service.privacyAgr, url: config.service.privacyAgr,
method: "GET", method: "GET",
data:{ data:{
id:appid
id:appid,
projectId:this.parames.projectId
}, },
header: { header: {
'content-type': 'application/json', 'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
}, },
success: (res) => { success: (res) => {
this.content = res.data.data.content
this.content = res.data.data.content
this.tit = res.data.data.title this.tit = res.data.data.title
this.parames.version = res.data.data.version
this.parames.version = res.data.data.version
this.pname = res.data.data.projectName
} }
}) })
}, },
@@ -197,6 +201,7 @@
}, },
readOk(){ readOk(){
this.parames.checked = true; this.parames.checked = true;
this.modelShow = false;
}, },
save() { save() {
if(this.parames.checked == false){ if(this.parames.checked == false){
@@ -291,7 +296,21 @@
} }
}; };
</script> </script>
<style lang="scss" scoped>
<style lang="scss" scoped>
/deep/ .u-model-title{
padding-top: 0 !important;
}
.slot-content{
position: relative;
.close{
position: absolute;
top: 0;
right: 0;
}
.cont{
padding: 80rpx 0;
}
}
.cented-box { .cented-box {
position: relative; position: relative;
padding: 0 0 50rpx 0; padding: 0 0 50rpx 0;


Loading…
Cancel
Save