Commit bfb68cf8 authored by jyx's avatar jyx

兼容首页 TAB 超出组件

parent 019aa62e
......@@ -19,6 +19,9 @@
// #endif
this.globalData.windowWidth = res.windowWidth;
this.globalData.clientHeight = res.windowHeight - this.globalData.windowWidth / 7;
this.globalData.tabHeight = this.globalData.windowWidth / 7;
// 抖音
// #ifdef MP-TOUTIAO
this.globalData.statusBarHeight = 0;
......@@ -51,12 +54,6 @@
}
// checkUpdate(this);
uni.getSystemInfo({
success: (res => {
this.globalData.clientHeight = res.windowHeight - 65
})
});
},
onShow: function(options) {
this.globalData.resetLogin = true
......@@ -80,6 +77,7 @@
// baseUrl: 'http://192.168.110.71:8301/miniApi',
titleButtonWidth: 38,
clientHeight: 0,
tabHeight: 0,
token: '',
userId: 0,
inviteUId: '',
......
......@@ -6,7 +6,7 @@
<view v-if="Math.abs(displayIndex-index)==0" style="height: 100%;" @click="tapVideoHover()">
<tt-video-player v-if="Math.abs(displayIndex-index)==0" :id="'remmend'+list.vedioId"
:album-id="list.douyinAlbumId" :episode-id="list.douyinEpisodeId" :cloud-type="1" version="1"
object-fit="contain" :controls="controls" :poster="data.coverImage" :loop="!isplay"
object-fit="fill" :controls="controls" :poster="data.coverImage" :loop="!isplay"
:autoplay="false" :enable-progress-gesture="false" :show-loading="true" @play="startPlay"
:show-fullscreen-btn="false" @controlstoggle="controlstoggle" @ended="ended" />
</view>
......
......@@ -6,10 +6,9 @@
v-show="currentPage==1" ref="recommend" />
<userPage v-show="currentPage==2" ref="user" />
</view>
<view v-if="!isShowBlackBar" class="tabs-bar" style="height: 65px;">
<view :class="currentPage==0?'tab active': 'tab'" :style="'padding-bottom:' + bottomSafePadding + 'px;'"
@click="tabChange(0)">
<view style="margin: 16rpx 0 11rpx;">
<view v-if="!isShowBlackBar" class="tabs-bar" :style="{'height': tabHeight + 'px'}">
<view :class="currentPage==0?'tab active': 'tab'" @click="tabChange(0)">
<view style="margin-top: 15rpx;">
<image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png"
mode="heightFix">
</image>
......@@ -19,7 +18,7 @@
</view>
<view :class="currentPage == 1?'tab active': 'tab'" :style="'padding-bottom:' + bottomSafePadding + 'px;'"
@click="tabChange(1)">
<view style="margin: 16rpx 0 11rpx;">
<view style="margin-top: 15rpx;">
<image v-if="currentPage==1" class="tabs-image" src="/static/tab/promote_selected.png"
mode="heightFix"></image>
<image v-else class="tabs-image" src="/static/tab/promote_unselected.png" mode="heightFix"></image>
......@@ -28,7 +27,7 @@
</view>
<view :class="currentPage == 2?'tab active': 'tab'" :style="'padding-bottom:' + bottomSafePadding + 'px;'"
@click="tabChange(2)">
<view style="margin: 16rpx 0 11rpx;">
<view style="margin-top: 15rpx;">
<image v-if="currentPage==2" class="tabs-image" src="/static/tab/my_selected.png" mode="heightFix">
</image>
<image v-else class="tabs-image" src="/static/tab/my_unselected.png" mode="heightFix"></image>
......@@ -37,10 +36,9 @@
</view>
</view>
<view v-if="isShowBlackBar" class="tabs-bar2" style="height: 65px;">
<view :class="currentPage==0?'tab active': 'tab'" :style="'padding-bottom:' + bottomSafePadding + 'px;'"
@click="tabChange(0)">
<view style="margin: 16rpx 0 11rpx;">
<view v-if="isShowBlackBar" class="tabs-bar2" :style="{'height': tabHeight + 'px'}">
<view :class="currentPage==0?'tab active': 'tab'" @click="tabChange(0)">
<view style="margin-top: 15rpx;">
<image v-if="currentPage==0" class="tabs-image" src="/static/tab/index_selected.png"
mode="heightFix">
</image>
......@@ -48,18 +46,16 @@
</view>
剧场
</view>
<view :class="currentPage == 1?'tab active': 'tab'" :style="'padding-bottom:' + bottomSafePadding + 'px;'"
@click="tabChange(1)">
<view style="margin: 16rpx 0 11rpx;">
<view :class="currentPage == 1?'tab active': 'tab'" @click="tabChange(1)">
<view style="margin-top: 15rpx;">
<image v-if="currentPage==1" class="tabs-image" src="/static/tab/promote_selected.png"
mode="heightFix"></image>
<image v-else class="tabs-image" src="/static/tab/promote_unselected.png" mode="heightFix"></image>
</view>
推荐
</view>
<view :class="currentPage == 2?'tab active': 'tab'" :style="'padding-bottom:' + bottomSafePadding + 'px;'"
@click="tabChange(2)">
<view style="margin: 16rpx 0 11rpx;">
<view :class="currentPage == 2?'tab active': 'tab'" @click="tabChange(2)">
<view style="margin-top: 15rpx;">
<image v-if="currentPage==2" class="tabs-image" src="/static/tab/my_selected.png" mode="heightFix">
</image>
<image v-else class="tabs-image" src="/static/tab/my_unselected.png" mode="heightFix"></image>
......@@ -68,7 +64,7 @@
</view>
</view>
<view v-if="showEditBar" class="editBar" :style="'padding-bottom:' + bottomSafePadding + 'px;'">
<view v-if="showEditBar" class="editBar" :style="{'height': tabHeight + 'px'}">
<view class="editItem" @click="!isFullChoice?fullChoice():noChoice()">
{{!isFullChoice?'全选':'全不选'}}
</view>
......@@ -112,6 +108,7 @@
isFullChoice: false,
isShowBlackBar: false,
clientHeight: app.globalData.clientHeight,
tabHeight: app.globalData.tabHeight,
}
},
onLoad(options) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment