Commit 9b11cfa8 by liuchenxi

update: 短信营销优化

parent f97c953a
......@@ -55,7 +55,7 @@
<dm-input ref="textarea" type="textarea" placeholder="请输入短信内容" :rows="8" v-model="form.content" resize="none" :maxlength="450" @input="resetValidateStatus"></dm-input>
<div class="other_fn">
<div class="left" v-if="form.type">
<el-popover placement="bottom-start" width="650" trigger="click">
<el-popover v-model="templateVisbile" placement="bottom-start" width="650" trigger="click">
<el-button slot="reference" type="text">添加变量参数</el-button>
<div class="popver_content">
<p>模板示列如下,其中{数字}为可插入的变量值,参照表如下:注意考虑变量值的文本长度,以免超出67字/条的文本上限。</p>
......@@ -238,6 +238,7 @@ export default {
linkData: {}
},
// 模板变量
templateVisbile: false,
templateVar: {
1: '姓名',
2: '姓名+先生/女士',
......@@ -347,7 +348,9 @@ export default {
}
try {
this.loading = true;
await saveTempService(this.form);
const para = Object.assign({}, this.form);
delete para.sign;
await saveTempService(para);
this.$tips({ type: 'success', message: '操作成功' });
this.$router.push('/message/temp');
this.loading = false;
......@@ -423,6 +426,7 @@ export default {
const curPos = this.$refs['textarea'].$el.firstChild.firstChild.selectionStart;
let curContent = this.form.content;
this.form.content = curContent.slice(0, curPos) + `{${key}}` + curContent.slice(curPos, curContent.length);
this.templateVisbile = false;
},
// 校验屏蔽词
validateContent() {
......@@ -442,7 +446,7 @@ export default {
// 获取短信签名
getMsgSign() {
getSign().then(res => {
this.form.sign = res.result.signText || '';
this.form.sign = `【${res.result.signText}】` || '';
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment