Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
online-edu
online-edu-admin
Commits
2a2e5095
Commit
2a2e5095
authored
Jul 06, 2021
by
lixin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程保存付费点播价格验证
parent
be10520d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletion
+42
-1
detail.vue
src/views/biz/course/detail.vue
+42
-1
No files found.
src/views/biz/course/detail.vue
View file @
2a2e5095
...
...
@@ -345,7 +345,7 @@
<a-button
type=
"primary"
@
click=
"onSave"
:disabled=
"isReadOnly"
:disabled=
"isReadOnly"
>
保存
</a-button>
...
...
@@ -887,7 +887,48 @@ export default {
this
.
$message
.
info
(
'请上传视频'
)
return
}
if
(
price
==
""
)
{
this
.
$message
.
info
(
"非会员价格不能为空"
);
return
;
}
if
(
price
==
"0"
)
{
this
.
$message
.
info
(
"非会员价格不能为0"
);
return
;
}
let
exp
=
/^
(([
1-9
]\d
*
)
|
\d)(\.\d{1,2})?
$/
;
if
(
!
exp
.
test
(
price
))
{
this
.
$message
.
info
(
"非会员价格金额格式不正确"
);
return
;
}
if
(
validPeriod
==
""
)
{
this
.
$message
.
info
(
"有效时间不能为空"
);
return
;
}
if
(
validPeriod
==
"0"
)
{
this
.
$message
.
info
(
"有效时间不能为0"
);
return
;
}
let
exp1
=
/^
[
0-9
]
*$/
;
if
(
!
exp1
.
test
(
validPeriod
))
{
this
.
$message
.
info
(
"有效时间只能为空数字"
);
return
;
}
if
(
vipPrice
==
""
)
{
this
.
$message
.
info
(
"会员价格不能为空"
);
return
;
}
if
(
vipPrice
==
"0"
)
{
this
.
$message
.
info
(
"会员价格不能为0"
);
return
;
}
if
(
!
exp
.
test
(
vipPrice
))
{
this
.
$message
.
info
(
"会员价格金额格式不正确"
);
return
;
}
// validateValidPeriod
// validateVipPrice
const
chaperList
=
[];
this
.
videoSeries
.
forEach
((
chapter
,
index
)
=>
{
chaperList
.
push
(
chapter
);
...
...
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