Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3795bd5b
authored
Jul 16, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'chenwq_dev_v2.6.0' into 'v2.6.0'
手机号验证 See merge request
!246
2 parents
b249837c
71ddd0e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
src/views/seckillActivity/editCrowdFund.vue
src/views/seckillActivity/editCrowdFund.vue
View file @
3795bd5
...
@@ -180,7 +180,7 @@ export default {
...
@@ -180,7 +180,7 @@ export default {
name
:
'editActivity'
,
name
:
'editActivity'
,
data
()
{
data
()
{
var
validatorPhone
=
function
(
rule
,
value
,
callback
)
{
var
validatorPhone
=
function
(
rule
,
value
,
callback
)
{
if
(
!
/^
(
0|86|17951
)?(
13
[
0-9
]
|15
[
0123456789
]
|17
[
678
]
|18
[
0-9
]
|14
[
57
])[
0-9
]{8}
$/
.
test
(
value
))
{
if
(
value
&&
!
/^
(
0|86|17951
)?(
13
[
0-9
]
|15
[
0123456789
]
|17
[
678
]
|18
[
0-9
]
|14
[
57
])[
0-9
]{8}
$/
.
test
(
value
))
{
callback
(
new
Error
(
'手机号格式错误'
))
callback
(
new
Error
(
'手机号格式错误'
))
}
else
{
}
else
{
callback
()
callback
()
...
@@ -276,7 +276,6 @@ export default {
...
@@ -276,7 +276,6 @@ export default {
// selectedAllProList: [],
// selectedAllProList: [],
// selectedProList: [],
// selectedProList: [],
editRule
:
{
editRule
:
{
customerServicePhone
:
{
required
:
false
,
validator
:
validatorPhone
,
trigger
:
'blur'
},
activityName
:
[{
required
:
true
,
message
:
'请输入活动名称'
,
trigger
:
'change'
}],
activityName
:
[{
required
:
true
,
message
:
'请输入活动名称'
,
trigger
:
'change'
}],
activityImg
:
[{
required
:
true
,
message
:
'请选择活动宣传图'
,
trigger
:
'change'
}],
activityImg
:
[{
required
:
true
,
message
:
'请选择活动宣传图'
,
trigger
:
'change'
}],
promotion
:
[{
required
:
true
,
message
:
'请输入活动宣传语'
,
trigger
:
'change'
}],
promotion
:
[{
required
:
true
,
message
:
'请输入活动宣传语'
,
trigger
:
'change'
}],
...
@@ -314,6 +313,7 @@ export default {
...
@@ -314,6 +313,7 @@ export default {
}
}
],
],
// 活动配置
// 活动配置
customerServicePhone
:
{
required
:
false
,
validator
:
validatorPhone
,
trigger
:
'change'
},
fictitiousViewQuantity
:
[
fictitiousViewQuantity
:
[
{
{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
...
@@ -1125,7 +1125,16 @@ export default {
...
@@ -1125,7 +1125,16 @@ export default {
this
.
$refs
.
configEditFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
configValid
,
configErrorObj
)
=>
{
this
.
$refs
.
configEditFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
configValid
,
configErrorObj
)
=>
{
validList
.
push
({
valid
:
!
configValid
,
errorObj
:
configErrorObj
})
validList
.
push
({
valid
:
!
configValid
,
errorObj
:
configErrorObj
})
if
(
this
.
checkValid
(
validList
))
{
if
(
this
.
checkValid
(
validList
))
{
this
.
addOrUpdate
()
if
(
this
.
$refs
.
serviceEditFormRef
)
{
this
.
$refs
.
serviceEditFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
serviceValid
,
serviceErrorObj
)
=>
{
validList
.
splice
(
2
,
0
,
{
valid
:
!
serviceValid
,
errorObj
:
serviceErrorObj
})
if
(
this
.
checkValid
(
validList
))
{
this
.
addOrUpdate
()
}
})
}
else
{
this
.
addOrUpdate
()
}
}
}
})
})
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment