mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-09-20 20:02:02 +08:00
refactor(login): 重构登录页面以优化用户体验
- 更新登录界面,简化手机号和验证码输入流程。 - 增强帐号密码登录选项的可用性,适配不同客户端。 - 改进隐私协议提示,确保用户清晰了解条款。 - 优化第三方登录入口的展示逻辑,提升界面友好性。
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div v-if="!wechatLogin" class="login-body">
|
||||
<u-navbar :auto-back="showBack" :border="false" :fixed="true" :placeholder="true"></u-navbar>
|
||||
<u-navbar :auto-back="false" :border="false" :fixed="true" :placeholder="true" @leftClick="back"></u-navbar>
|
||||
<div class="login-header">
|
||||
<div class="title">{{ loginTitleWay[current].title }}</div>
|
||||
<div :class="current == 1 ? 'desc-light' : 'desc'">
|
||||
@@ -173,7 +173,6 @@ const loginTitleWay = [
|
||||
{ title: '请输入验证码', desc: '已经发送验证码至' },
|
||||
]
|
||||
const userData = reactive({ username: '', password: '' })
|
||||
const showBack = ref(false)
|
||||
const enableFetchCode = ref(false)
|
||||
const enableUserBtnColor = ref(false)
|
||||
const enablePrivacy = ref(false)
|
||||
@@ -284,10 +283,6 @@ onMounted(() => {
|
||||
// #endif
|
||||
})
|
||||
|
||||
watch(current, (val) => {
|
||||
showBack.value = val ? true : false
|
||||
})
|
||||
|
||||
watch(
|
||||
userData,
|
||||
() => {
|
||||
@@ -577,6 +572,22 @@ function handleVerification(val: string) {
|
||||
flage.value = val == store.state.verificationKey ? true : false
|
||||
}
|
||||
|
||||
function back() {
|
||||
if (current.value === 1) {
|
||||
current.value = 0
|
||||
code.value = ''
|
||||
return
|
||||
}
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length > 1) {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
return
|
||||
}
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/index',
|
||||
})
|
||||
}
|
||||
|
||||
function navigateToPrivacy(val: string) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/mine/help/tips?type=' + val,
|
||||
|
||||
Reference in New Issue
Block a user