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 1/2] =?UTF-8?q?1.=E7=AC=AC=E4=B8=80=E4=B8=AA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E8=B7=9D=E7=A6=BB=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E7=9A=84=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); From ba2179460a8b50d59414f9ef1099e447b66f4383 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Sat, 19 Oct 2024 18:23:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1.=E7=AC=AC=E4=B8=80=E4=B8=AA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E8=B7=9D=E7=A6=BB=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E7=9A=84=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 --- common/js/common/common.js | 44 +++++++++++++++++++------------------- components/diy/diy.vue | 41 ++++++++++++++++++----------------- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/common/js/common/common.js b/common/js/common/common.js index ad081bff..74d8c42f 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;` + padding_top; + 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;`; } } /** @@ -216,8 +216,8 @@ export function common_styles_computer (new_style) { return gradient_computer(new_style) + margin_computer(new_style) + radius_computer(new_style) + box_shadow_computer(new_style) + `overflow:hidden;`; } -export function common_img_computer (new_style, index) { - return padding_computer(new_style, 1, false, index) + background_computer(new_style) + `overflow:hidden;box-sizing: border-box;`; +export function common_img_computer (new_style, index, bool) { + return padding_computer(new_style, 1, false, index, bool) + background_computer(new_style) + `overflow:hidden;box-sizing: border-box;`; } /** * 生成一个随机数学字符串。 diff --git a/components/diy/diy.vue b/components/diy/diy.vue index 6c1887a4..a7babdaa 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -16,30 +16,30 @@ @@ -319,6 +319,7 @@ // 顶部导航高度是否变化-------------------------------------------------- is_search_alone_row: header.com_data.content.data_alone_row_value.length > 0 ? true : false, data_alone_row_space: parseInt(header.com_data.style.data_alone_row_space || 5), + is_immersive_style_and_general_safe_distance_value: header_style.immersive_style == '1' && header_style.general_safe_distance_value == '1', }); var client_value = app.globalData.application_client_type(); var client_brand = app.globalData.application_client_brand();