refactor(custom): 登录页面增加显式返回键
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-16 23:17:57 +08:00
parent 6ca3669950
commit 6f5d722e6e
4 changed files with 85 additions and 2 deletions

View File

@@ -316,7 +316,7 @@ const userMenuList = ref([
const clickLogin = () => {
// isShowLogin.value = true
Taro.redirectTo({
Taro.navigateTo({
url: '/pages/users/login/index',
});
};

View File

@@ -4,11 +4,27 @@ import UserModal from '@/components/UserModal.vue';
import { ref } from 'vue';
import { getPhone, login, getPersonalInfo } from '@/api/user';
import logoImg from '../../../static/logo.jpg';
import { Left, Home } from '@nutui/icons-vue-taro';
const statusBarHeight = Taro.getSystemInfoSync().statusBarHeight;
const BarHeight = ref((statusBarHeight as number) - 7);
const isShow = ref(false);
const val = ref(false);
const returns = () => {
Taro.navigateBack({
delta: 1,
});
};
const goHome = () => {
Taro.switchTab({
url: '/pages/index/index',
});
};
const getCode = () => {
if (!val.value)
return Taro.showToast({
@@ -133,6 +149,12 @@ const clickText = (type: number, text: string) => {
<template>
<view class="wrapper">
<view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
<view class="head-menu">
<!-- <Left class="iconfont" @click="returns" /> -->
<Home class="iconfont" @click="goHome" />
</view>
</view>
<image src="../../../static/wechat_login.jpg" />
<view class="logo">
<image :src="logoImg" />
@@ -227,4 +249,30 @@ page {
display: flex;
}
}
.head-wrapper {
z-index: 999;
display: flex;
align-items: center;
position: fixed;
left: 30px;
top: 0;
//height: 114px;
}
.head-menu {
display: flex;
align-items: center;
height: 54px;
width: 100px;
background: rgba(0, 0, 0, 0.25);
border-radius: 27px;
.iconfont {
flex: 1;
text-align: center;
color: #fff;
box-sizing: border-box;
}
}
</style>