Commit 2a2e5095 authored by lixin's avatar lixin

课程保存付费点播价格验证

parent be10520d
...@@ -888,6 +888,47 @@ export default { ...@@ -888,6 +888,47 @@ export default {
return 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 = []; const chaperList = [];
this.videoSeries.forEach((chapter, index) => { this.videoSeries.forEach((chapter, index) => {
chaperList.push(chapter); chaperList.push(chapter);
......
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