<template>
|
<view>
|
<view class="school" :style="{
|
'padding-top': (StatusBar) + 'px'
|
, height: CustomBar + 'rpx', 'line-height': CustomBar + 'rpx'
|
}"></view>
|
<!-- 自定义导航栏 -->
|
<view class="custom-navbar">
|
<view class="navbar-content">
|
<!-- 左侧图标 + 标题 -->
|
<view class="left">
|
<u-icon name="/static/images/tabbar/line-Film.png" size="40" color="#fff" />
|
<text class="title">光影旅程</text>
|
</view>
|
|
<!-- 右侧按钮 -->
|
<view class="right">
|
<!-- <u-button type="info" class="login-btn" size="mini" @click="goLogin">
|
<u-icon name="/static/images/tabbar/user.png" size="30" />
|
登录
|
</u-button> -->
|
<view class="login-view" @click="goLogin">
|
<u-icon name="/static/images/tabbar/user.png" size="30" />
|
<text class="login-text">登录</text>
|
</view>
|
|
|
<u-icon name="list" size="40" color="#fff" @click="openMenu" />
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
CustomBar: uni.getStorageSync('CustomBar'),
|
StatusBar: uni.getStorageSync('StatusBar'),
|
statusBarHeight: 20 // 默认值
|
};
|
},
|
onLoad() {
|
const sys = uni.getSystemSetting();
|
this.statusBarHeight = sys.statusBarHeight || 20;
|
},
|
methods: {
|
goLogin() {
|
uni.navigateTo({
|
url: '/pages/login/login'
|
});
|
},
|
openMenu() {
|
console.log('打开菜单');
|
}
|
}
|
};
|
</script>
|
|
<style scoped>
|
.page {
|
background-color: #000;
|
color: #fff;
|
/* min-height: 100vh; */
|
}
|
|
.custom-navbar {
|
background-color: #111;
|
padding: 6rpx 20rpx;
|
}
|
|
.navbar-content {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
height: 44px;
|
}
|
|
.left {
|
display: flex;
|
align-items: center;
|
}
|
|
.left .title {
|
font-size: 17px;
|
font-weight: bold;
|
margin-left: 15rpx;
|
color: #fff;
|
letter-spacing: 4rpx;
|
}
|
|
.right {
|
display: flex;
|
align-items: center;
|
gap: 16rpx;
|
}
|
|
.login-btn {
|
background-color: #eee;
|
color: #000;
|
font-size: 14px;
|
padding: 0 12rpx;
|
}
|
|
.login-view {
|
display: flex;
|
align-items: center;
|
padding: 8rpx 16rpx;
|
background-color: #fff;
|
border-radius: 10rpx;
|
color: #333;
|
}
|
|
.login-text {
|
margin-left: 10rpx;
|
font-size: 28rpx;
|
font-weight: bold;
|
}
|
</style>
|