Commit a9e98776 authored by shilei's avatar shilei

注册验证

parent 4c16e803
...@@ -317,14 +317,13 @@ const verify = (type: string = 'all') => { ...@@ -317,14 +317,13 @@ const verify = (type: string = 'all') => {
proxy.$refs.phoneInput.style.borderColor = '#c0322b'; proxy.$refs.phoneInput.style.borderColor = '#c0322b';
} }
errorMsg.value = '请输入有效的手机号码'; errorMsg.value = '请输入有效的手机号码';
if (type === 'all') { return false;
return false;
} else {
return true;
}
} else { } else {
if (errorMsg.value === '请输入有效的手机号码') { if (errorMsg.value === '请输入有效的手机号码') {
errorMsg.value = null; errorMsg.value = null;
if (proxy.$refs.passWord?.style.borderColor === 'rgb(192, 50, 43)') {
errorMsg.value = '请输入6-20位有效密码';
}
} }
if (proxy.$refs.phoneInput) { if (proxy.$refs.phoneInput) {
proxy.$refs.phoneInput.style.borderColor = 'rgba(0, 0, 0, 0.15)'; proxy.$refs.phoneInput.style.borderColor = 'rgba(0, 0, 0, 0.15)';
...@@ -345,7 +344,7 @@ const verify = (type: string = 'all') => { ...@@ -345,7 +344,7 @@ const verify = (type: string = 'all') => {
if (modalType.value !== 'loginByPhone') { if (modalType.value !== 'loginByPhone') {
if (!/^.{6,20}$/.test(password.value?.toString() || '')) { if (!/^.{6,20}$/.test(password.value?.toString() || '')) {
if (proxy.$refs.passWord) proxy.$refs.passWord.style.borderColor = '#c0322b'; if (proxy.$refs.passWord) proxy.$refs.passWord.style.borderColor = '#c0322b';
errorMsg.value = '请输入6-20位有效密码'; errorMsg.value = errorMsg.value || '请输入6-20位有效密码';
if (type === 'all') { if (type === 'all') {
return false; return false;
} }
...@@ -509,7 +508,6 @@ const handleBlur = (type: string) => { ...@@ -509,7 +508,6 @@ const handleBlur = (type: string) => {
} }
setTimeout(() => { setTimeout(() => {
console.log(444);
if (_modalType === modalType.value) { if (_modalType === modalType.value) {
verify(type); verify(type);
} }
......
...@@ -37,17 +37,17 @@ ...@@ -37,17 +37,17 @@
找产业园 找产业园
</span> </span>
<span <span
:class="{ active: searchType === 'land' }" :class="{ active: searchType === 'carrier' }"
@click="changeSearchType('land', '160px', '土地')" @click="changeSearchType('carrier', '175px', '载体')"
> >
土地 载体
</span> </span>
<span <span
style="margin-right: 28px" style="margin-right: 28px"
:class="{ active: searchType === 'carrier' }" :class="{ active: searchType === 'land' }"
@click="changeSearchType('carrier', '225px', '载体')" @click="changeSearchType('land', '240px', '土地')"
> >
载体 土地
</span> </span>
<span <span
style="margin-right: 46px" style="margin-right: 46px"
......
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