Commit f576da6c authored by 郭志伟's avatar 郭志伟

fix: 华贵表单验证完善

parent 20e7c738
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
z-index: 9999;
.loading { .loading {
padding: 6px; padding: 6px;
border-radius: 6px; border-radius: 6px;
......
...@@ -69,6 +69,15 @@ export function isIdNo(str) { ...@@ -69,6 +69,15 @@ export function isIdNo(str) {
return false; return false;
} }
// 判断输入的字符是否为中文姓名最少两个中文字符
export function isChineseName(str) {
if (!isNull(str)) {
const reg = /^[\u0391-\uFFE5]{2,}$/;
return reg.test(str);
}
return false;
}
// 判断输入的字符是否以数字开头 // 判断输入的字符是否以数字开头
export function isStartWithInteger(str) { export function isStartWithInteger(str) {
if (!isNull(str)) { if (!isNull(str)) {
...@@ -258,6 +267,15 @@ export function isBankNumber(str) { ...@@ -258,6 +267,15 @@ export function isBankNumber(str) {
return false; return false;
} }
// 判断中文地址不能少于5个汉字,且必须有一位数字
export function isChnAddress(str) {
if (!isNull(str)) {
const reg = /^(\d|[\u4e00-\u9fa5]){5,10}$/;
return reg.test(str);
}
return false;
}
// 判断微信环境 // 判断微信环境
export const isWeixinBrower = window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger"; export const isWeixinBrower = window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger";
// 判断信用钱包环境 // 判断信用钱包环境
......
...@@ -109,60 +109,6 @@ export default { ...@@ -109,60 +109,6 @@ export default {
{ title: "重疾险", price: "50万" }, { title: "重疾险", price: "50万" },
{ title: "意外险", price: "60万" }, { title: "意外险", price: "60万" },
{ title: "寿险", price: "350万" } { title: "寿险", price: "350万" }
],
overviewList: [
{
id: 1,
goods: "国民保·百万医疗险",
type: "mi",
title: "医疗险",
amount: "600万",
range: "1年",
way: "趸交",
price: "350元",
goodsPirce: "3000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
{
id: 2,
goods: "康惠保2020终身重疾险",
type: "cii",
title: "重疾险",
amount: "50万",
range: "终身",
way: "20年",
price: "6000元",
goodsPirce: "6000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
{
id: 3,
goods: "国民保·百万意外险",
type: "ai",
title: "意外险",
amount: "50万",
range: "1年",
way: "趸交",
price: "350元",
goodsPirce: "3000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
{
id: 4,
goods: "国民保·百万寿险",
type: "li",
title: "寿险",
amount: "350万",
range: "保至70岁",
way: "20年",
price: "3725元",
goodsPirce: "3000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
}
] ]
}; };
}, },
......
This diff is collapsed.
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