|
@ -41,12 +41,12 @@ export default { |
|
|
data(){ |
|
|
data(){ |
|
|
return{ |
|
|
return{ |
|
|
fields:{ |
|
|
fields:{ |
|
|
name:{placeholder:"请输入企业名称(中文)"}, |
|
|
// name:{placeholder:"请输入企业名称(中文)"}, |
|
|
creditCode:{placeholder:"请输入统一社会信用代码"}, |
|
|
// creditCode:{placeholder:"请输入统一社会信用代码"}, |
|
|
type:{placeholder:"请选择企业类型",type:"select",columns:[[]],value:[]}, |
|
|
// type:{placeholder:"请选择企业类型",type:"select",columns:[[]],value:[]}, |
|
|
connectUser:{placeholder:"请输入企业联系人"}, |
|
|
// connectUser:{placeholder:"请输入企业联系人"}, |
|
|
connectPhone:{placeholder:"请输入手机号码"}, |
|
|
// connectPhone:{placeholder:"请输入手机号码"}, |
|
|
password:{placeholder:"请输入密码(6-20位字母和数字的组合)",type:"password"}, |
|
|
password:{placeholder:"请输入密码(大小写字母、数字、特殊字符)",type:"password"}, |
|
|
}, |
|
|
}, |
|
|
formData:{ |
|
|
formData:{ |
|
|
name: "", |
|
|
name: "", |
|
@ -72,7 +72,7 @@ export default { |
|
|
}, trigger:"blur"}, |
|
|
}, trigger:"blur"}, |
|
|
password:{required:true, validator(rule,val,call){ |
|
|
password:{required:true, validator(rule,val,call){ |
|
|
if(!val)call(new Error('密码必填!')); |
|
|
if(!val)call(new Error('密码必填!')); |
|
|
else if(!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/.test(val))call(new Error('密码格式为(6-20位字母和数字的组合)!')); |
|
|
else if(!/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[^\da-zA-Z\s]).+$/.test(val))call(new Error('密码格式为(大小写字母、数字、特殊字符)!')); |
|
|
else call(); |
|
|
else call(); |
|
|
}, trigger:"blur"}, |
|
|
}, trigger:"blur"}, |
|
|
}, |
|
|
}, |
|
@ -101,6 +101,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
async submit(){ |
|
|
async submit(){ |
|
|
|
|
|
console.log(this.formData.password) |
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|
if(valid){ |
|
|
if(valid){ |
|
|
var res=await request("/base/api/plantCompany/register",{ |
|
|
var res=await request("/base/api/plantCompany/register",{ |
|
|