Commit a9e98776 authored by shilei's avatar shilei

注册验证

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