|
|
@@ -15,13 +15,13 @@
|
|
|
<text>{{title}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view :style="[{height:is_fixed? `${$tools.topHeight()+bgHeight}px`:`${$tools.topHeight()+fixedHeight}px`}]">
|
|
|
+ <view :style="[{height:is_fixed? `${40+bgHeight}px`:`${40+fixedHeight}px`}]">
|
|
|
</view>
|
|
|
<!-- 带背景插槽 start-->
|
|
|
<slot></slot>
|
|
|
<!-- 带背景插槽 end-->
|
|
|
<view class="sys-list-background-color header" style="z-index: 2;"
|
|
|
- :style="[{height:is_fixed?`${$tools.topHeight()+navsHeight}px` :`${$tools.topHeight()+fixedHeight}px`},{opacity:is_fixed?navOpacity:1}]">
|
|
|
+ :style="[{height:is_fixed?`${navsHeight}px` :`${fixedHeight}px`},{opacity:is_fixed?navOpacity:1}]">
|
|
|
<image class="" style="width: 100%;height: 100%;" :src="bgList[genre].nav_path" mode="">
|
|
|
</image>
|
|
|
</view>
|
|
|
@@ -31,17 +31,16 @@
|
|
|
<script>
|
|
|
// 获取系统状态栏的高度
|
|
|
import tools from "@/service/tools";
|
|
|
-
|
|
|
- let systemInfo = uni.getSystemInfoSync();
|
|
|
+ let systemInfo = uni.getSystemInfoSync();
|
|
|
let menuButtonInfo = {};
|
|
|
- // #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
|
|
- menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
|
|
- // #endif
|
|
|
+ // // #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
|
|
|
+ // menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
|
|
+ // // #endif
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- height: 0,
|
|
|
+ height: 40,
|
|
|
paddingTop: 0,
|
|
|
navOpacity: 0,
|
|
|
navHeight: 0,
|
|
|
@@ -96,10 +95,10 @@
|
|
|
type: Boolean,
|
|
|
default: true
|
|
|
},
|
|
|
- toBack: {
|
|
|
- type: Boolean,
|
|
|
- default: true
|
|
|
- },
|
|
|
+ toBack: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ },
|
|
|
is_fixed: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
@@ -127,10 +126,10 @@
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
- const navTop = uni.getMenuButtonBoundingClientRect()
|
|
|
- this.height = navTop.height + 'px'
|
|
|
- this.paddingTop = navTop.top + 'px'
|
|
|
- this.navHeight = `${navTop.height+navTop.top}px`
|
|
|
+ // const navTop = uni.getMenuButtonBoundingClientRect()
|
|
|
+ // this.height = navTop.height + 'px'
|
|
|
+ // this.paddingTop = navTop.top + 'px'
|
|
|
+ // this.navHeight = `${navTop.height+navTop.top}px`
|
|
|
},
|
|
|
watch: {
|
|
|
opacity(newValue, oldValue) {
|
|
|
@@ -141,10 +140,10 @@
|
|
|
methods: {
|
|
|
// 左侧返回按钮调用
|
|
|
onBack() {
|
|
|
- console.log('toBack:',this.toBack)
|
|
|
- if(this.toBack){
|
|
|
- tools.leftClick()
|
|
|
- }
|
|
|
+ console.log('toBack:', this.toBack)
|
|
|
+ if (this.toBack) {
|
|
|
+ tools.leftClick()
|
|
|
+ }
|
|
|
this.$emit('onBack')
|
|
|
},
|
|
|
getTopBg(type) {
|
|
|
@@ -170,7 +169,7 @@
|
|
|
align-items: center;
|
|
|
font-size: 26rpx;
|
|
|
z-index: 1;
|
|
|
- // padding-bottom: 10rpx;
|
|
|
+ // padding-top: 15rpx;
|
|
|
top: 0;
|
|
|
|
|
|
.left {
|
|
|
@@ -194,6 +193,7 @@
|
|
|
font-size: 32rpx;
|
|
|
font-weight: bold;
|
|
|
font-family: Source Han Sans CN;
|
|
|
+ padding-top: 30rpx;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -206,4 +206,4 @@
|
|
|
.nav-bg2 {
|
|
|
background-image: url("https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-bg.png?imageMogr2/quality/20");
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|