From f8d32b6c07a64d0ad9f4a22b503a713f7f85b141 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Sat, 19 Oct 2024 18:16:07 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=AC=AC=E4=B8=80=E4=B8=AA=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=B7=9D=E7=A6=BB=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA=E7=9A=84?= =?UTF-8?q?=E8=B7=9D=E7=A6=BB=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 8 ++++---- common/js/common/common.js | 40 +++++++++++++++++++------------------- components/diy/custom.vue | 1 + 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/App.vue b/App.vue index 7c86b80b..4b63f298 100644 --- a/App.vue +++ b/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', diff --git a/common/js/common/common.js b/common/js/common/common.js index c8fb02c3..ad081bff 100644 --- a/common/js/common/common.js +++ b/common/js/common/common.js @@ -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; } } /** diff --git a/components/diy/custom.vue b/components/diy/custom.vue index 701c48aa..d8530bc1 100644 --- a/components/diy/custom.vue +++ b/components/diy/custom.vue @@ -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);