登录页面多一个返回按钮,个人中心页面未登录时,昵称作为登录按钮
This commit is contained in:
parent
7da3bc1f65
commit
6cee9d90b1
|
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<view class="login-container">
|
||||
<view :style="{ top: getNavBarHeight() + 'rpx' }" class="goback" @click="goback">
|
||||
<uni-icons :size="getTitleBarHeight()" type="left"></uni-icons>
|
||||
</view>
|
||||
|
||||
<view class="logo-section">
|
||||
<image :src="CommonEnum.LOGIN_SRC" class="logo-image"></image>
|
||||
</view>
|
||||
|
|
@ -78,6 +82,7 @@ import { wxLogin } from '@/api/auth/auth.js'
|
|||
import { forceHideLoading, AutoLoadingManager } from '@/utils/request.js'
|
||||
import { getServiceTerms, getPrivacyPolicy } from '@/api/article/article.js'
|
||||
import { commonEnum } from '../../enum/commonEnum'
|
||||
import { getNavBarHeight, getTitleBarHeight } from '../../utils/system'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -122,6 +127,11 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
getTitleBarHeight,
|
||||
getNavBarHeight,
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
getUrlParam(key, url) {
|
||||
const regex = new RegExp(`[?&]${key}=([^&#]*)`)
|
||||
const match = url.match(regex)
|
||||
|
|
@ -321,9 +331,16 @@ export default {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
position: relative;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.goback {
|
||||
color: #e80a0a;
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
padding-bottom: 40rpx;
|
||||
max-width: 750rpx;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<view v-else style="padding: 30rpx"></view>
|
||||
</view>
|
||||
<view class="user-details">
|
||||
<text class="user-name">{{ userInfo.nickName || '未登录' }}</text>
|
||||
<text class="user-name" @click="goLogin()">{{ userInfo.nickName || '点击登录' }}</text>
|
||||
|
||||
<view class="settings-icon" @click="goToSettings">
|
||||
<image :src="commonEnum.SET" class="settings-img" mode="aspectFit" />
|
||||
|
|
@ -275,6 +275,10 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
goLogin() {
|
||||
if (checkLoginStatus()) {
|
||||
}
|
||||
},
|
||||
// 跳转到设置页面,传递用户信息
|
||||
goToSettings() {
|
||||
// 检查登录状态
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user