我们发布啦

This commit is contained in:
张乐
2020-08-13 16:12:57 +08:00
parent ec2ddb4e10
commit acd9b0cb1a
1884 changed files with 344865 additions and 2 deletions

30
app/utils/validate.js Normal file
View File

@@ -0,0 +1,30 @@
/**
* 验证小数点后两位及多个小数
* money 金额
*/
export function isMoney(money) {
var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
if (reg.test(money)) {
return true
} else {
return false
}
}
/**
* 验证手机号码
* money 金额
*/
export function checkPhone(phone) {
var reg = /^1(3|4|5|6|7|8|9)\d{9}$/
if (reg.test(phone)) {
return true
} else {
return false
}
}