Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
de57ddd7
Commit
de57ddd7
authored
Nov 19, 2021
by
liuchenxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 模板库普通短信逻辑修改 短信群发时间选择器修改
parent
e0fd069c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
23 deletions
+24
-23
addTemp.vue
src/views/message/addTemp.vue
+9
-9
form.vue
src/views/message/form.vue
+15
-14
No files found.
src/views/message/addTemp.vue
View file @
de57ddd7
...
...
@@ -19,13 +19,14 @@
<div
class=
"rule"
>
<div
class=
"top"
>
短信发送规则
</div>
<div
class=
"content"
v-if=
"form.type == 0"
>
<p>
1、字数规范:单条短信按70字算(含签名);
</p>
<p>
1、字数规范:单条短信按70字算(含签名
、后缀和变量的实际取值
);
</p>
<p
class=
"pd90"
>
超过70字后,总长度按67字/条计算条数(比如140字按3条计费);
</p>
<p
class=
"pd90"
>
汉字、字母、数字、标点符号(不区分全角/半角)以及空格等都按1个字计算;
</p>
<p
class=
"pd90"
>
换行/Enter会导致短信分多条计算;
</p>
<p>
2、格式规范:不能包含【】、¥、★、^_^
&
等特殊符号,防止乱码,不能添加链接;
</p>
<p>
2、格式规范:不能包含【】、¥、★、^_^
&
等特殊符号,防止乱码;
</p>
<p>
2、变量规范:不支持全变量模板,不支持中文变量参数,不支持变量嵌套(如{1{3}});
</p>
<p>
3
、政策规范:不能发送房产、移民、贷款、政治、色情、暴力等违法类短信;
4
、政策规范:不能发送房产、移民、贷款、政治、色情、暴力等违法类短信;
<el-button
v-show=
"!showMoreFlag"
type=
"text"
@
click=
"showMoreFlag = true"
style=
"margin-left: 5px"
>
查看更多
<i
class=
"iconfont icon-zhankai- arrow_icon"
/></el-button>
</p>
<p
v-show=
"showMoreFlag"
>
...
...
@@ -54,7 +55,7 @@
<el-form-item
label=
"短信内容"
prop=
"content"
class=
"pb10"
>
<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"
>
<div
class=
"left"
>
<el-popover
v-model=
"templateVisbile"
placement=
"bottom-start"
width=
"650"
trigger=
"click"
>
<el-button
slot=
"reference"
type=
"text"
>
添加变量参数
</el-button>
<div
class=
"popver_content"
>
...
...
@@ -72,13 +73,12 @@
<!--
<
el
-
button
type
=
"text"
@
click
=
"reduceLink.show = true"
>
压缩
H5
链接
<
/el-button> --
>
<
/template
>
<
/div
>
<
div
v
-
else
><
/div
>
<
el
-
button
type
=
"primary"
style
=
"border-radius: 0"
:
disabled
=
"!contentLength"
@
click
=
"validateContent"
>
校验屏蔽词
<
/el-button
>
<
/div
>
<
div
class
=
"tip"
style
=
"margin-top: 8px;line-height: 17px"
>
已输入
<
span
style
=
"color: #303133"
>
{{
contentLength
}}
<
/span> 字
{{ isEcmMsg
?
'(不包含变量参数)' : ''
}}
<br /
>
已输入
<
span
style
=
"color: #303133"
>
{{
contentLength
}}
<
/span> 字
(不包含变量参数)
<br /
>
<!--
内容
+
签名
+
回
T
退订后缀
-->
短信长度
<
span
style
=
"color: #303133"
>
{{
contentLength
+
form
.
sign
.
length
+
(
isEcmMsg
?
4
:
0
)
}}
<
/span> 个字({{ isEcmMsg
?
'包含签名和后缀,不包含变量参数' : '包含签名'
}}
)计费条数以实际为准
。
短信长度
<
span
style
=
"color: #303133"
>
{{
contentLength
+
form
.
sign
.
length
+
(
isEcmMsg
?
4
:
0
)
}}
<
/span> 个字({{ isEcmMsg
?
'包含签名和后缀,不包含变量参数' : '包含签名
,不包含变量参数
'
}}
)计费条数以实际为准
。
<
/div
>
<
div
class
=
"validate_res success"
v
-
if
=
"validateStatus == 1"
><
i
class
=
"iconfont icon-chenggong mr6 icon_size"
/>
校验通过
<
/div
>
<
div
class
=
"validate_res error"
v
-
else
-
if
=
"validateStatus == 0"
>
...
...
@@ -308,7 +308,7 @@ export default {
if
(
this
.
templateVar
[
para
])
return
''
;
else
return
match
;
}
);
return
this
.
isEcmMsg
?
content
.
length
:
this
.
form
.
content
.
length
;
return
content
.
length
;
}
,
previewContent
()
{
const
reg
=
/\{
(\d
+
)
\
}
/g
;
...
...
@@ -316,7 +316,7 @@ export default {
if
(
this
.
templateVar
[
para
])
return
`{${this.templateVar[para]
}}
`
;
else
return
match
;
}
);
return
this
.
isEcmMsg
?
this
.
form
.
sign
+
(
content
||
'{内容区
}
'
)
+
(
this
.
isEcmMsg
?
'回T退订'
:
''
)
:
this
.
form
.
sign
+
this
.
form
.
content
;
return
this
.
form
.
sign
+
(
content
||
'{内容区
}
'
)
+
(
this
.
isEcmMsg
?
'回T退订'
:
''
)
;
}
,
isEcmMsg
()
{
return
this
.
form
.
type
==
1
;
...
...
src/views/message/form.vue
View file @
de57ddd7
...
...
@@ -53,7 +53,8 @@
<el-select
class=
"w250"
v-model=
"info.sendType"
>
<el-option
v-for=
"(v, i) in sendTypeOptions"
:key=
"i"
:value=
"v.value"
:label=
"v.label"
></el-option>
</el-select>
<el-date-picker
class=
"w250"
v-if=
"info.sendType"
v-model=
"info.sendTime"
type=
"datetime"
placeholder=
"选择日期时间"
align=
"right"
:picker-options=
"pickerOptions"
></el-date-picker>
<el-date-picker
class=
"w250"
v-if=
"info.sendType"
v-model=
"info.sendTime"
type=
"date"
placeholder=
"选择日期"
align=
"right"
:picker-options=
"pickerOptions"
></el-date-picker>
<el-time-picker
class=
"w250"
v-if=
"info.sendType && info.sendTime"
v-model=
"info.sendHourTime"
placeholder=
"选择时间"
:picker-options=
"pickerHourOptions"
></el-time-picker>
</el-form-item>
<span
v-show=
"smsType && info.sendType"
style=
"color:#909399;font-size:12px;padding-left:110px"
>
因运营商限制,营销短信发送时间为每日8:00-22:00,尽量避免夜间发送,减少用户投诉。
</span>
</section>
...
...
@@ -81,6 +82,9 @@ export default {
return
Date
.
now
()
>=
val
.
getTime
()
+
24
*
60
*
60
*
1000
;
}
},
pickerHourOptions
:
{
selectableRange
:
[
'8:00:00 - 22:00:00'
]
},
// 人群筛选器可传参数
sceneValue
:
'member'
,
// 场景值
useId
:
''
,
// 模板id
...
...
@@ -91,6 +95,7 @@ export default {
memberType
:
0
,
marketingActivityId
:
''
,
sendTime
:
''
,
sendHourTime
:
''
,
sendType
:
0
,
memberSearchDTO
:
''
,
openIds
:
''
,
...
...
@@ -112,6 +117,11 @@ export default {
computed
:
{
asideShow
()
{
return
this
.
$store
.
state
.
marketing
.
asideShow
;
},
combineDate
()
{
const
time
=
formatDateTimeByType
(
this
.
info
.
sendHourTime
,
'yyyy-MM-dd-HH-mm-ss'
,
true
).
h
;
const
date
=
formatDateTimeByType
(
this
.
info
.
sendTime
,
'yyyy-MM-dd-HH-mm-ss'
,
true
).
y
;
return
date
+
time
;
}
},
created
()
{
...
...
@@ -183,7 +193,7 @@ export default {
params
.
openIds
=
this
.
info
.
openIds
;
}
if
(
this
.
info
.
sendType
)
{
params
.
sendTime
=
formatDateTimeByType
(
this
.
info
.
sendTime
,
'yyyy-MM-dd-HH-mm-ss'
)
;
params
.
sendTime
=
this
.
combineDate
;
console
.
log
(
params
.
sendTime
);
}
saveSendSmsService
(
params
).
then
(
res
=>
{
...
...
@@ -197,14 +207,15 @@ export default {
},
//提交表单
sendSms
:
_debounce
(
async
function
()
{
console
.
log
(
new
Date
(
this
.
combineDate
));
if
(
this
.
loading
)
{
return
;
}
if
(
this
.
info
.
sendType
==
1
&&
!
this
.
info
.
sendTime
)
{
if
(
this
.
info
.
sendType
==
1
&&
(
!
this
.
info
.
sendTime
||
!
this
.
info
.
sendHourTime
)
)
{
this
.
$tips
({
type
:
'warning'
,
message
:
'请设置发送时间'
});
return
;
}
if
(
this
.
info
.
sendType
==
1
&&
new
Date
().
getTime
()
+
1000
*
60
*
5
>=
new
Date
(
this
.
info
.
sendTim
e
))
{
if
(
this
.
info
.
sendType
==
1
&&
new
Date
().
getTime
()
+
1000
*
60
*
5
>=
new
Date
(
this
.
combineDat
e
))
{
this
.
$tips
({
type
:
'warning'
,
message
:
'定时发送的时间点必须晚于当前时间5分钟后'
});
return
;
}
...
...
@@ -212,16 +223,6 @@ export default {
// await this.$refs.peopleFilter.confirmSet();
// if (this.checkAccountState()) return;
let
nowHour
=
null
;
if
(
this
.
info
.
sendType
)
{
nowHour
=
new
Date
(
this
.
info
.
sendTime
).
getHours
();
}
else
{
nowHour
=
new
Date
().
getHours
();
}
// 编辑情况下的判断
if
(
this
.
smsType
===
1
&&
(
nowHour
>=
22
||
nowHour
<
8
))
{
return
this
.
$tips
({
type
:
'warning'
,
message
:
'营销短信只能在8:00-22:00发送'
});
}
if
(
!
this
.
info
.
memberType
&&
this
.
toggleTag
&&
!
this
.
getSaveData
)
{
this
.
$tips
({
type
:
'warning'
,
message
:
'人群筛选未保存条件'
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment