修改视频高度问题

master
于肖磊 2025-09-23 18:49:15 +08:00
parent 6e9645ee4d
commit 22a822fe7d
5 changed files with 29 additions and 129 deletions

View File

@ -2038,6 +2038,10 @@
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP
"navigationStyle": "custom",
// #endif
// #ifdef MP-ALIPAY
"transparentTitle": "always",
"titlePenetrate": "YES",
// #endif
"enablePullDownRefresh": false,
"navigationBarTitleText": ""
}
@ -2048,6 +2052,10 @@
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP
"navigationStyle": "custom",
// #endif
// #ifdef MP-ALIPAY
"transparentTitle": "auto",
"titlePenetrate": "YES",
// #endif
"enablePullDownRefresh": false,
"navigationBarTitleText": ""
}
@ -2058,6 +2066,10 @@
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP
"navigationStyle": "custom",
// #endif
// #ifdef MP-ALIPAY
"transparentTitle": "auto",
"titlePenetrate": "YES",
// #endif
"enablePullDownRefresh": false,
"navigationBarTitleText": ""
}
@ -2068,6 +2080,10 @@
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP
"navigationStyle": "custom",
// #endif
// #ifdef MP-ALIPAY
"transparentTitle": "auto",
"titlePenetrate": "YES",
// #endif
"enablePullDownRefresh": false,
"navigationBarTitleText": ""
}

View File

@ -2,7 +2,7 @@
<view class="content pr">
<!-- 搜索框 -->
<view v-if="!show_comment_modal" class="header-top" :style="top_content_style + menu_button_info">
<view class="search-height flex-row align-c">
<view id="search-height" class="flex-row align-c">
<view class="cp" @tap="handle_back">
<iconfont name="icon-arrow-left " size="36rpx" color="#333" class="mr-10"></iconfont>
</view>
@ -144,16 +144,7 @@
},
data() {
return {
// 5,7,0 10 ,bar_height
// #ifdef MP
top_content_style: 'padding-top:' + (bar_height + 5) + 'px;padding-bottom:10px;',
// #endif
// #ifdef H5 || MP-TOUTIAO
top_content_style: 'padding-top:' + (bar_height + 7) + 'px;padding-bottom:10px;',
// #endif
// #ifdef APP
top_content_style: 'padding-top:' + bar_height + 'px;padding-bottom:10px;',
// #endif
videoData: videoList,
display_video_list: [],
current_index: 0,
@ -233,7 +224,6 @@
if (is_current_single_page == 0) {
const custom = uni.getMenuButtonBoundingClientRect();
menu_button_info = `max-width:calc(100% - ${custom.width + 10}px);`;
this.get_top_content_style(custom.height);
}
// #endif
// #endif
@ -264,32 +254,6 @@
this.getVideoByIndex(2) //
];
},
get_top_content_style(custom_height) {
//
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
//
query.select('.search-height').boundingClientRect((res) => {
if ((res || null) != null) {
//
const top_height = custom_height == 0 ? 0 : (res.height - custom_height) / 2;
let top_content_style = '';
// #ifdef MP
top_content_style = 'padding-top:' + (bar_height + 5 - top_height) + 'px;padding-bottom:10px;';
// #endif
// #ifdef H5 || MP-TOUTIAO
top_content_style = 'padding-top:' + (bar_height + 7 - top_height) + 'px;padding-bottom:10px;';
// #endif
// #ifdef APP
top_content_style = 'padding-top:' + bar_height - top_height + 'px;padding-bottom:10px;';
// #endif
this.setData({
top_content_style: top_content_style
});
}
}).exec(); //
}, 500);
},
//
getVideoByIndex(index) {
//

View File

@ -5,7 +5,7 @@
<!-- 搜索框 -->
<view class="header-top">
<view class="ht-auto" :style="top_content_style + menu_button_info">
<view class="search-height">
<view id="search-height" class="wh-auto ht-auto">
<search-component :propSearchQuery="search_query" :propIsDisabled="true" @disabledSearch="handle_search"/>
</view>
</view>
@ -65,16 +65,7 @@ export default {
},
data() {
return {
// 5,7,0 10 ,bar_height
// #ifdef MP
top_content_style: 'padding-top:' + (bar_height + 5) + 'px;padding-bottom:10px;',
// #endif
// #ifdef H5 || MP-TOUTIAO
top_content_style: 'padding-top:' + (bar_height + 7) + 'px;padding-bottom:10px;',
// #endif
// #ifdef APP
top_content_style: 'padding-top:' + bar_height + 'px;padding-bottom:10px;',
// #endif
search_query: '',
tabs: ['推荐', 'DIV装修', '商城管理', '多商户', '多门店', '客服','多门店', '客服'],
currentTab: 0,
@ -100,7 +91,6 @@ export default {
if (is_current_single_page == 0) {
const custom = uni.getMenuButtonBoundingClientRect();
menu_button_info = `max-width:calc(100% - ${custom.width + 10}px);`;
this.get_top_content_style(custom.height);
}
// #endif
// #endif
@ -139,14 +129,16 @@ export default {
},
]
});
}, 10000);
}, 100);
},
get_top_content_style(custom_height) {
const this_ = this;
//
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
//
query.select('.search-height').boundingClientRect((res) => {
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this_);
//
query.select('#search-height').boundingClientRect((res) => {
console.log(res, '1144');
if ((res || null) != null) {
//
const top_height = custom_height == 0 ? 0 : (res.height - custom_height) / 2;
@ -160,12 +152,12 @@ export default {
// #ifdef APP
top_content_style = 'padding-top:' + bar_height - top_height + 'px;padding-bottom:10px;';
// #endif
this.setData({
this_.setData({
top_content_style: top_content_style
});
}
}).exec(); //
}, 500);
});
},
handle_search() {
//

View File

@ -2,7 +2,7 @@
<view class="wh-auto ht pr search-record-container">
<!-- 搜索框 -->
<view class="header-top" :style="top_content_style + menu_button_info">
<view class="search-height flex-row align-c">
<view id="search-height" class="flex-row align-c">
<view class="cp" @tap="handle_back">
<iconfont name="icon-arrow-left " size="36rpx" color="#333" class="mr-10"></iconfont>
</view>
@ -69,16 +69,7 @@ export default {
},
data() {
return {
// 5,7,0 10 ,bar_height
// #ifdef MP
top_content_style: 'padding-top:' + (bar_height + 5) + 'px;padding-bottom:10px;',
// #endif
// #ifdef H5 || MP-TOUTIAO
top_content_style: 'padding-top:' + (bar_height + 7) + 'px;padding-bottom:10px;',
// #endif
// #ifdef APP
top_content_style: 'padding-top:' + bar_height + 'px;padding-bottom:10px;',
// #endif
search_query: '',
search_history: [
{ text: '软件升级规则' },
@ -117,7 +108,6 @@ export default {
if (is_current_single_page == 0) {
const custom = uni.getMenuButtonBoundingClientRect();
menu_button_info = `max-width:calc(100% - ${custom.width + 10}px);`;
this.get_top_content_style(custom.height);
}
// #endif
// #endif
@ -125,32 +115,6 @@ export default {
menu_button_info: menu_button_info
});
},
get_top_content_style(custom_height) {
//
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
//
query.select('.search-height').boundingClientRect((res) => {
if ((res || null) != null) {
//
const top_height = custom_height == 0 ? 0 : (res.height - custom_height) / 2;
let top_content_style = '';
// #ifdef MP
top_content_style = 'padding-top:' + (bar_height + 5 - top_height) + 'px;padding-bottom:10px;';
// #endif
// #ifdef H5 || MP-TOUTIAO
top_content_style = 'padding-top:' + (bar_height + 7 - top_height) + 'px;padding-bottom:10px;';
// #endif
// #ifdef APP
top_content_style = 'padding-top:' + bar_height - top_height + 'px;padding-bottom:10px;';
// #endif
this.setData({
top_content_style: top_content_style
});
}
}).exec(); //
}, 500);
},
//
handle_back() {
app.globalData.page_back_prev_event();

View File

@ -5,7 +5,7 @@
<!-- 搜索框 -->
<view class="header-top">
<view class="header-search" :style="top_content_style + menu_button_info">
<view class="search-height flex-row align-c">
<view id="search-height" class="flex-row align-c">
<view class="cp" @tap="handle_back">
<iconfont name="icon-arrow-left " size="36rpx" color="#333" class="mr-10"></iconfont>
</view>
@ -91,16 +91,7 @@ export default {
},
data() {
return {
// 5,7,0 10 ,bar_height
// #ifdef MP
top_content_style: 'padding-top:' + (bar_height + 5) + 'px;padding-bottom:10px;',
// #endif
// #ifdef H5 || MP-TOUTIAO
top_content_style: 'padding-top:' + (bar_height + 7) + 'px;padding-bottom:10px;',
// #endif
// #ifdef APP
top_content_style: 'padding-top:' + bar_height + 'px;padding-bottom:10px;',
// #endif
search_query: '',
tabs: ['推荐', 'DIV装修', '商城管理', '多商户', '多门店', '客服','多门店', '客服'],
currentTab: 0,
@ -176,7 +167,6 @@ export default {
if (is_current_single_page == 0) {
const custom = uni.getMenuButtonBoundingClientRect();
menu_button_info = `max-width:calc(100% - ${custom.width + 10}px);`;
this.get_top_content_style(custom.height);
}
// #endif
// #endif
@ -200,32 +190,6 @@ export default {
.exec(); //
}, 500);
},
get_top_content_style(custom_height) {
//
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
//
query.select('.search-height').boundingClientRect((res) => {
if ((res || null) != null) {
//
const top_height = custom_height == 0 ? 0 : (res.height - custom_height) / 2;
let top_content_style = '';
// #ifdef MP
top_content_style = 'padding-top:' + (bar_height + 5 - top_height) + 'px;padding-bottom:10px;';
// #endif
// #ifdef H5 || MP-TOUTIAO
top_content_style = 'padding-top:' + (bar_height + 7 - top_height) + 'px;padding-bottom:10px;';
// #endif
// #ifdef APP
top_content_style = 'padding-top:' + bar_height - top_height + 'px;padding-bottom:10px;';
// #endif
this.setData({
top_content_style: top_content_style
});
}
}).exec(); //
}, 500);
},
handle_back() {
app.globalData.page_back_prev_event();
},