refactor(custom): 登录页面增加显式返回键
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -316,7 +316,7 @@ const userMenuList = ref([
|
||||
|
||||
const clickLogin = () => {
|
||||
// isShowLogin.value = true
|
||||
Taro.redirectTo({
|
||||
Taro.navigateTo({
|
||||
url: '/pages/users/login/index',
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user