适配头条导航

master
gongfuxiang 2022-07-30 21:53:12 +08:00
parent c2baedfd65
commit 955efcf02c
6 changed files with 38 additions and 13 deletions

View File

@ -5,7 +5,9 @@
"style": {
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP
"navigationStyle": "custom",
"navigationBarTitleText": "首页",
// #endif
// #ifndef MP-ALIPAY
"navigationBarTitleText": "ShopXO",
// #endif
// #ifdef MP-ALIPAY
"transparentTitle": "always",
@ -21,6 +23,8 @@
"style": {
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP
"navigationStyle": "custom",
// #endif
// #ifndef MP-ALIPAY
"navigationBarTitleText": "商品分类",
// #endif
// #ifdef MP-ALIPAY
@ -43,6 +47,8 @@
"style": {
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || H5 || APP
"navigationStyle": "custom",
// #endif
// #ifndef MP-ALIPAY
"navigationBarTitleText": "用户中心",
// #endif
// #ifdef MP-ALIPAY

View File

@ -9,6 +9,9 @@
/* #ifdef H5 || APP */
padding-right: 20rpx;
/* #endif */
/* #ifdef MP-TOUTIAO */
padding-right: 20rpx;
/* #endif */
padding-bottom: 10px;
}
.category-content {

View File

@ -191,12 +191,18 @@
import componentQuickNav from "../../components/quick-nav/quick-nav";
import componentNoData from "../../components/no-data/no-data";
var common_static_url = app.globalData.get_static_url('common');
var common_static_url = app.globalData.get_static_url('common');
//
var bar_height = 0;
// #ifndef MP-TOUTIAO
bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
// #endif
export default {
data() {
return {
common_static_url: common_static_url,
status_bar_height: parseInt(app.globalData.get_system_info('statusBarHeight', 0)),
status_bar_height: bar_height,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',

View File

@ -5,7 +5,10 @@
background-repeat: no-repeat;
background-size: 100% auto;
min-height: 410rpx;
padding-top: calc(var(--status-bar-height) + 8px);
padding-top: 8px;
/* #ifndef MP-TOUTIAO */
padding-top: calc(var(--status-bar-height) + 8px);
/* #endif */
}
.home-top-nav-title {
font-weight: bold;

View File

@ -296,8 +296,13 @@
import componentShopList from "../../components/shop-list/shop-list";
var common_static_url = app.globalData.get_static_url('common');
var static_url = app.globalData.get_static_url('home');
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
var static_url = app.globalData.get_static_url('home');
//
var bar_height = 0;
// #ifndef MP-TOUTIAO
bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
// #endif
export default {
data() {
return {
@ -495,6 +500,7 @@
//
onPageScroll(e) {
// #ifndef MP-TOUTIAO
if(this.common_app_is_header_nav_fixed == 1 && this.common_app_is_enable_search == 1) {
var top = e.scrollTop > 35 ? 35 : e.scrollTop;
var num = top*7;
@ -514,7 +520,8 @@
search_is_fixed: (top >= 35) ? 1 : 0,
});
}
}
}
// #endif
},
// url

View File

@ -8,7 +8,7 @@
border-bottom-left-radius: 100rpx;
border-bottom-right-radius: 100rpx;
height: 310rpx;
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-KUAISHOU */
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU */
height: 360rpx;
/* #endif */
}
@ -17,7 +17,7 @@
*/
.header-top {
padding-right: 250rpx;
/* #ifdef MP-ALIPAY */
/* #ifdef MP-ALIPAY || MP-TOUTIAO */
padding-top: 20rpx !important;
padding-right: 20rpx;
/* #endif */
@ -34,7 +34,7 @@
}
.nav-search {
width: calc(100% - 90rpx);
/* #ifdef MP-ALIPAY */
/* #ifdef MP-ALIPAY || MP-TOUTIAO */
width: 100%;
/* #endif */
}
@ -44,7 +44,7 @@
*/
.header-content {
top: 140rpx;
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-KUAISHOU */
/* #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU */
top: 200rpx;
/* #endif */
width: calc(100% - 80rpx);
@ -94,7 +94,7 @@
.tablecode {
background: rgb(255 255 255 / 60%);
padding: 2rpx 20rpx;
/* #ifdef MP-ALIPAY */
/* #ifdef MP-ALIPAY || MP-TOUTIAO */
margin-top: 15rpx;
/* #endif */
}
@ -108,7 +108,7 @@
/* #ifdef H5 || APP */
height: calc(100vh - 390rpx);
/* #endif */
/* #ifdef MP-ALIPAY */
/* #ifdef MP-ALIPAY || MP-TOUTIAO */
height: calc(100vh - 400rpx);
/* #endif */
}