|
@@ -1,19 +1,21 @@
|
|
|
<template>
|
|
|
- <view class="content">
|
|
|
- <!-- 顶部导航 -->
|
|
|
- <view class="nav-bar">
|
|
|
- <view class="nav-left" @click="goBack">
|
|
|
- <u-icon name="arrow-leftward" color="rgba(51, 51, 51, 1)" style="font-size: 38rpx;"></u-icon>
|
|
|
- </view>
|
|
|
- <view class="nav-title">公司介绍</view>
|
|
|
- <view class="nav-right">
|
|
|
- <view class="nav-icons">
|
|
|
- <view class="nav-icon" @click="setCollection">
|
|
|
- <image v-if="isCollection==0" src="/static/images/index/guanzhu.svg" class="icon-img"></image>
|
|
|
- <image v-else src="/static/images/index/gzActive.svg" class="icon-img"></image>
|
|
|
- </view>
|
|
|
- <view class="nav-icon" @click="showShare">
|
|
|
- <image src="/static/images/index/fenxiang.svg" class="icon-img"></image>
|
|
|
+ <view class="content" :style="{ paddingTop: (12 + statusBarHeight + 88 - 60) + 'px' }">
|
|
|
+ <!-- 固定顶部导航 -->
|
|
|
+ <view class="fixed-nav" :style="{ paddingTop: (12 + statusBarHeight) + 'px' }">
|
|
|
+ <view class="nav-bar">
|
|
|
+ <view class="nav-left" @click="goBack">
|
|
|
+ <u-icon name="arrow-leftward" color="rgba(51, 51, 51, 1)" style="font-size: 38rpx;"></u-icon>
|
|
|
+ </view>
|
|
|
+ <view class="nav-title">公司介绍</view>
|
|
|
+ <view class="nav-right">
|
|
|
+ <view class="nav-icons">
|
|
|
+ <view class="nav-icon" @click="setCollection">
|
|
|
+ <image v-if="isCollection==0" src="/static/images/index/guanzhu.svg" class="icon-img"></image>
|
|
|
+ <image v-else src="/static/images/index/gzActive.svg" class="icon-img"></image>
|
|
|
+ </view>
|
|
|
+ <view class="nav-icon" @click="showShare">
|
|
|
+ <image src="/static/images/index/fenxiang.svg" class="icon-img"></image>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -204,6 +206,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ statusBarHeight: 0, // 状态栏高度
|
|
|
backStyle: {
|
|
|
color: '#ffffff'
|
|
|
},
|
|
@@ -271,6 +274,10 @@
|
|
|
// }
|
|
|
// },
|
|
|
onLoad(option) {
|
|
|
+ // 获取状态栏高度
|
|
|
+ let systemInfo = uni.getSystemInfoSync();
|
|
|
+ this.statusBarHeight = systemInfo.statusBarHeight || 0;
|
|
|
+
|
|
|
// 获取邀请码保存到本地
|
|
|
if (option.invitation) {
|
|
|
this.$queue.setData('inviterCode', option.invitation);
|
|
@@ -437,15 +444,28 @@
|
|
|
}
|
|
|
|
|
|
.content {
|
|
|
- padding-top: 88rpx!important;
|
|
|
+ // padding-top 已改为动态计算,在模板中通过 :style 设置
|
|
|
+ }
|
|
|
+
|
|
|
+ .fixed-nav {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ z-index: 9999;
|
|
|
+ background-color: #ffffff;
|
|
|
+ padding: 0 32rpx;
|
|
|
+ // padding-top 已改为动态计算,在模板中通过 :style 设置
|
|
|
}
|
|
|
|
|
|
.nav-bar {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- margin-bottom: 30rpx;
|
|
|
- padding: 0 40rpx;
|
|
|
+ height: 88rpx;
|
|
|
+ padding: 0 8rpx;
|
|
|
+ // margin-bottom: 30rpx; // 已移除,因为现在是固定导航栏
|
|
|
+ // padding: 0 40rpx; // 已调整,因为外层 fixed-nav 已有 padding
|
|
|
|
|
|
.nav-left {
|
|
|
display: flex;
|