bebae732 by 张猛

登录

1 parent bb440033
......@@ -105,6 +105,7 @@ import {
const isActive = ref(0)
const agree = ref(false)
const isRember = ref(true)
const loading = ref(false)
const codeUrl = ref(null)
const inputstyle = ref({
borderColor: 'transparent',
......@@ -176,13 +177,15 @@ function login() {
})
return
}
if (loading.value) return;
loading.value = true
pcLogin(form.value).then((res) => {
app.globalData.isLogin = true
uni.redirectTo({
url: '/pages/index/home'
})
}).finally(() => {
loading.value = false
})
} else if (isActive.value == 1) {
if (!form2.value.telNo) {
......@@ -208,14 +211,17 @@ function login() {
})
return
}
if (loading.value) return;
loading.value = true
loginByPhone(form2.value.telNo, form2.value.code)
.then(() => {
app.globalData.isLogin = true
uni.redirectTo({
url: '/pages/index/home'
})
})
}).finally(() => {
loading.value = false
})
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!