1.第一个组件距离顶部导航的距离计算
parent
80e8ffcdbf
commit
f8d32b6c07
8
App.vue
8
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',
|
||||
|
|
|
|||
|
|
@ -109,29 +109,29 @@ export function gradient_handle (color_list, direction, is_return_all = true) {
|
|||
* @returns {string}
|
||||
*/
|
||||
export function padding_computer (new_style, scale = 1, is_custom = false, index) {
|
||||
let padding_top = '';
|
||||
if (index == 0) {
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
|
||||
// #ifdef MP-TOUTIAO
|
||||
bar_height = 0;
|
||||
// #endif
|
||||
let sticky_top = 0;
|
||||
// #ifdef MP
|
||||
sticky_top = bar_height + 5 + 12;
|
||||
// #endif
|
||||
// #ifdef H5 || MP-TOUTIAO
|
||||
sticky_top = bar_height + 7 + 12;
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
sticky_top = bar_height + 0 + 12;
|
||||
// #endif
|
||||
padding_top = `padding-top:calc(${new_style.padding_top * 2 || 0}rpx + ${sticky_top}px);`;
|
||||
}
|
||||
if (!is_custom) {
|
||||
let padding_top = '';
|
||||
if (index == 0) {
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
|
||||
// #ifdef MP-TOUTIAO
|
||||
bar_height = 0;
|
||||
// #endif
|
||||
let sticky_top = 0;
|
||||
// #ifdef MP
|
||||
sticky_top = bar_height + 5 + 12;
|
||||
// #endif
|
||||
// #ifdef H5 || MP-TOUTIAO
|
||||
sticky_top = bar_height + 7 + 12;
|
||||
// #endif
|
||||
// #ifdef APP
|
||||
sticky_top = bar_height + 0 + 12;
|
||||
// #endif
|
||||
padding_top = `padding-top:calc(${new_style.padding_top * 2 || 0}rpx + ${sticky_top}px);`;
|
||||
}
|
||||
return `padding: ${new_style.padding_top * 2 || 0}rpx ${new_style.padding_right * 2 || 0}rpx ${new_style.padding_bottom * 2 || 0}rpx ${new_style.padding_left * 2 || 0}rpx;` + padding_top;
|
||||
} else {
|
||||
return `padding: ${new_style.padding_top * scale || 0}px ${new_style.padding_right * scale || 0}px ${new_style.padding_bottom * scale || 0}px ${new_style.padding_left * scale || 0}px;`;
|
||||
return `padding: ${new_style.padding_top * scale || 0}px ${new_style.padding_right * scale || 0}px ${new_style.padding_bottom * scale || 0}px ${new_style.padding_left * scale || 0}px;` + padding_top;
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@
|
|||
style_img_container: common_img_computer(new_style.common_style, this.propIndex),
|
||||
div_height: new_form.height,
|
||||
});
|
||||
console.log(this.propIndex);
|
||||
},
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue