app适配处理

master
gongfuxiang 2023-11-24 09:42:01 +08:00
parent bae50f87b1
commit 73fbae1fd4
2 changed files with 9 additions and 14 deletions

View File

@ -946,7 +946,7 @@
{
"path": "detail/detail",
"style": {
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || APP
"navigationStyle": "custom",
// #endif
// #ifdef MP-ALIPAY

View File

@ -490,13 +490,8 @@
//
if (this.load_status == 0) {
if (data.banner_list && data.banner_list.length > 0 && (data.banner_list[0]['bg_color'] || null) != null) {
upd_data['top_content_bg_color'] = 'background: linear-gradient(180deg, ' + data.banner_list[0].bg_color + ' 0%, #f5f5f5 80%);';
upd_data['top_content_search_bg_color'] = 'background: linear-gradient(180deg, ' + data.banner_list[0].bg_color + ' 0%, #f5f5f5 460%);';
} else {
upd_data['top_content_bg_color'] = 'background: linear-gradient(180deg, ' + theme_color + ' 0%, #f5f5f5 80%);';
upd_data['top_content_search_bg_color'] = 'background: linear-gradient(180deg, ' + theme_color + ' 0%, #f5f5f5 460%);';
}
var color = (data.banner_list && data.banner_list.length > 0 && (data.banner_list[0]['bg_color'] || null) != null) ? data.banner_list[0].bg_color : theme_color;
this.change_banner(color);
}
//
@ -617,13 +612,13 @@
//
change_banner(color) {
if ((color || null) != null) {
this.top_content_bg_color = 'background: linear-gradient(180deg, ' + color + ' 0%, #f5f5f5 80%);';
this.top_content_search_bg_color = 'background: linear-gradient(180deg, ' + color + ' 0%, #f5f5f5 460%);';
} else {
this.top_content_bg_color = 'background: linear-gradient(180deg, ' + this.theme_color + ' 0%, #f5f5f5 80%);';
this.top_content_search_bg_color = 'background: linear-gradient(180deg, ' + this.theme_color + ' 0%, #f5f5f5 460%);';
if ((color || null) == null) {
color = this.theme_color;
}
this.setData({
top_content_bg_color: 'background: linear-gradient(180deg, ' + color + ' 0%, #f5f5f5 80%);',
top_content_search_bg_color: 'background: linear-gradient(180deg, ' + color + ' 0%, #f5f5f5 460%);',
});
},
// icon