顶部导航颜色设置
parent
10dafc898c
commit
c2d3ca7a6a
30
App.vue
30
App.vue
|
|
@ -7,12 +7,12 @@
|
|||
data: {
|
||||
// 基础配置
|
||||
// 数据接口请求地址
|
||||
request_url: 'http://shopxo.com/',
|
||||
// request_url:'https://new.shopxo.vip/',
|
||||
//request_url: 'http://shopxo.com/',
|
||||
request_url:'https://new.shopxo.vip/',
|
||||
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
|
||||
static_url: 'http://shopxo.com/',
|
||||
// static_url:'https://new.shopxo.vip/',
|
||||
//static_url: 'http://shopxo.com/',
|
||||
static_url:'https://new.shopxo.vip/',
|
||||
|
||||
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
|
||||
system_type: 'default',
|
||||
|
|
@ -2857,6 +2857,25 @@
|
|||
});
|
||||
},
|
||||
|
||||
// 设置导航背景色和颜色
|
||||
set_navigation_bar_color(is_white = null) {
|
||||
var color = '#000';
|
||||
var bg_color = '#fff';
|
||||
var arr = [
|
||||
'pages/index/index',
|
||||
'pages/diy/diy',
|
||||
];
|
||||
var page = this.current_page(false);
|
||||
if(is_white === true || (is_white === null && arr.indexOf(page) != -1)) {
|
||||
color = '#ffffff';
|
||||
bg_color = '#000000';
|
||||
}
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: color,
|
||||
backgroundColor: bg_color,
|
||||
});
|
||||
},
|
||||
|
||||
// 底部浮动按钮样式处理
|
||||
bottom_fixed_style_handle() {
|
||||
var obj = this.get_page_object();
|
||||
|
|
@ -2885,6 +2904,9 @@
|
|||
|
||||
// 页面顶部导航标题设置
|
||||
this.set_pages_navigation_bar_title();
|
||||
|
||||
// 设置导航背景色和颜色
|
||||
this.set_navigation_bar_color();
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -283,11 +283,12 @@
|
|||
temp_sticky_top: this.sticky_top,
|
||||
temp_header_top: this.header_top,
|
||||
});
|
||||
|
||||
// 设置顶部导航的默认颜色
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: parseInt(this.propValue.header.com_data.style.function_buttons_type) == 0 ? '#000000' : '#ffffff',
|
||||
backgroundColor: 'transparent',
|
||||
});
|
||||
this.propValue.header.com_data.style.function_buttons_type = 1;
|
||||
app.globalData.set_navigation_bar_color(parseInt(this.propValue.header.com_data.style.function_buttons_type || 0) == 1);
|
||||
|
||||
// 缓存数据
|
||||
uni.setStorageSync(this.cache_key + this.tabs_home_id, this.propValue.diy_data);
|
||||
},
|
||||
// 顶部导航沉浸模式回调
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
"titlePenetrate": "YES",
|
||||
// #endif
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
|
|
@ -76,7 +75,6 @@
|
|||
"titlePenetrate": "YES",
|
||||
// #endif
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue