Commit af3d0138 by 前端

添加兑换码限制

1 parent 694adfc1
......@@ -285,7 +285,7 @@ export default {
item.attContent = JSON.parse(item.attContent)
}
})
preview.length>0&&this.$refs.welcome.updateList(preview)
preview.length > 0 && this.$refs.welcome.updateList(preview)
})
this.dialogVisible = true
}
......@@ -374,9 +374,17 @@ export default {
return
}
const previewList = this.autoSend && this.$refs.welcome.previewList ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : []
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replace(/(@昵称|#兑换码)/g, '[$1]')
if (item.attContent.match(/#兑换码/g).length > 10) {
this.$message({
message: '兑换码已达上限',
type: 'error'
})
return
}
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
......@@ -416,7 +424,6 @@ export default {
if(!util.isShowBtn(null,'兑换码')) {
this.btnList.splice(-1)
}
}
}
</script>
......@@ -598,7 +605,7 @@ export default {
.import-link {
display: flex;
cursor: pointer;
margin-bottom:8px;
margin-bottom: 8px;
.upload-btn {
position: relative;
display: inline-block;
......@@ -635,14 +642,14 @@ export default {
}
.gl-form-min /deep/.el-form .welcome-box {
width: 100% !important;
.add-btn:nth-last-child(1){
padding-right:0px;
.add-btn:nth-last-child(1) {
padding-right: 0px;
}
.text-num{
.text-num {
color: #999999;
}
}
.gl-form-page .el-form {
padding-left: 0px !important;;
padding-left: 0px !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!