From b31f1f60b5a1e96979cc7591c814eef339910bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Tue, 3 Jun 2025 13:38:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E6=B5=AE?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +-- pages/diy/components/diy/diy.vue | 55 +++++++++++++++++--------------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/App.vue b/App.vue index 4ff095d7..d3d2f178 100644 --- a/App.vue +++ b/App.vue @@ -7,10 +7,10 @@ data: { // 基础配置 // 数据接口请求地址 - request_url:'https://new.shopxo.vip/', + request_url:'http://shopxo.com/', // 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/) - static_url:'https://new.shopxo.vip/', + static_url:'http://shopxo.com/', // 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立) system_type: 'default', diff --git a/pages/diy/components/diy/diy.vue b/pages/diy/components/diy/diy.vue index 56ed83db..582c33e9 100644 --- a/pages/diy/components/diy/diy.vue +++ b/pages/diy/components/diy/diy.vue @@ -440,6 +440,7 @@ let new_diy_index = 0; let new_tabs_data = []; let new_diy_data = []; + // 数据逻辑处理,区别是否有选项卡头部区域 if (tabs_data.length > 0) { tabs_data.forEach((item) => { // 修改item的内容 @@ -450,33 +451,8 @@ new_diy_data = diy_data; } else { new_tabs_data = tabs_data; - const newMarginTopList = diy_data.filter((item) => { - const style = item.com_data?.style?.common_style; - return style && style.floating_up > 0; - }); - - const newMarginTopMap = new Set(newMarginTopList.map(item => item.id)); - - // 提前定义用于后续处理的数据 - const scaleComponents = new Set(this.scale_component_list); - const subset_scale_component_list = new Set(this.subset_scale_component_list); - // 数据比例 - let scale = sys_width / 390; - // 最大是2倍比例 - // if (sys_width <= 800) { - // scale = scale > 2 ? 2 : scale; - // } else { - // scale = scale; - // } // 过滤数据 diy_data.forEach((item, index) => { - // 缩放处理 - const style = item.com_data?.style?.common_style; - if (style && newMarginTopMap.has(item.id) && scaleComponents.has(diy_data[index - 1].key) && !subset_scale_component_list.has(item.key)) { - item.floating_up = '-' + (style?.floating_up || 0) * scale + 'px;'; - } else { - item.floating_up = '-' + (style?.floating_up || 0) * 2 + 'rpx;'; - } // 判断是否是商品列表 if (item.com_name == 'float-window') { item.index = -1; @@ -488,6 +464,35 @@ } }); } + // 获取到内部数据之后的处理 + const newMarginTopList = new_diy_data.filter((item) => { + const style = item.com_data?.style?.common_style; + return style && style.floating_up > 0; + }); + + const newMarginTopMap = new Set(newMarginTopList.map(item => item.id)); + + // 提前定义用于后续处理的数据 + const scaleComponents = new Set(this.scale_component_list); + const subset_scale_component_list = new Set(this.subset_scale_component_list); + // 数据比例 + let scale = sys_width / 390; + // 最大是2倍比例 + // if (sys_width <= 800) { + // scale = scale > 2 ? 2 : scale; + // } else { + // scale = scale; + // } + // 修改缩放比例参数 + new_diy_data.forEach((item, index) => { + // 缩放处理 + const style = item.com_data?.style?.common_style; + if (style && newMarginTopMap.has(item.id) && scaleComponents.has(diy_data[index - 1].key) && !subset_scale_component_list.has(item.key)) { + item.floating_up = '-' + (style?.floating_up || 0) * scale + 'px;'; + } else { + item.floating_up = '-' + (style?.floating_up || 0) * 2 + 'rpx;'; + } + }); const { padding_right = 0, padding_left = 0 } = header_style.common_style; const new_is_search_alone_row = header.com_data.content.data_alone_row_value.length > 0 ? true : false; const new_data_alone_row_space = parseInt(header_style.data_alone_row_space || 0); From c176434f68016bba6f7ccbe0e1d7b437a73fdb0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Tue, 3 Jun 2025 13:38:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/App.vue b/App.vue index d3d2f178..4ff095d7 100644 --- a/App.vue +++ b/App.vue @@ -7,10 +7,10 @@ data: { // 基础配置 // 数据接口请求地址 - 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/', // 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立) system_type: 'default', From fba582ba2c2fc8f2f4cf5c036ef00999bc2d5ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Tue, 3 Jun 2025 13:41:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E6=B5=AE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/diy/components/diy/diy.vue | 63 +++++++++++++++++--------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/pages/diy/components/diy/diy.vue b/pages/diy/components/diy/diy.vue index 582c33e9..8c3c2661 100644 --- a/pages/diy/components/diy/diy.vue +++ b/pages/diy/components/diy/diy.vue @@ -464,35 +464,6 @@ } }); } - // 获取到内部数据之后的处理 - const newMarginTopList = new_diy_data.filter((item) => { - const style = item.com_data?.style?.common_style; - return style && style.floating_up > 0; - }); - - const newMarginTopMap = new Set(newMarginTopList.map(item => item.id)); - - // 提前定义用于后续处理的数据 - const scaleComponents = new Set(this.scale_component_list); - const subset_scale_component_list = new Set(this.subset_scale_component_list); - // 数据比例 - let scale = sys_width / 390; - // 最大是2倍比例 - // if (sys_width <= 800) { - // scale = scale > 2 ? 2 : scale; - // } else { - // scale = scale; - // } - // 修改缩放比例参数 - new_diy_data.forEach((item, index) => { - // 缩放处理 - const style = item.com_data?.style?.common_style; - if (style && newMarginTopMap.has(item.id) && scaleComponents.has(diy_data[index - 1].key) && !subset_scale_component_list.has(item.key)) { - item.floating_up = '-' + (style?.floating_up || 0) * scale + 'px;'; - } else { - item.floating_up = '-' + (style?.floating_up || 0) * 2 + 'rpx;'; - } - }); const { padding_right = 0, padding_left = 0 } = header_style.common_style; const new_is_search_alone_row = header.com_data.content.data_alone_row_value.length > 0 ? true : false; const new_data_alone_row_space = parseInt(header_style.data_alone_row_space || 0); @@ -500,7 +471,7 @@ this.setData({ header_data: header, footer_data: this.propValue.footer, - diy_data: new_diy_data, + diy_data: this.set_diy_data_floating_up(new_diy_data), tabs_data: new_tabs_data, page_style: common_styles_computer(header_style.common_style), page_img_style: background_computer(header_style.common_style), @@ -539,6 +510,38 @@ } return item; }, + set_diy_data_floating_up(diy_data_list) { + // 获取到内部数据之后的处理 + const newMarginTopList = diy_data_list.filter((item) => { + const style = item.com_data?.style?.common_style; + return style && style.floating_up > 0; + }); + + const newMarginTopMap = new Set(newMarginTopList.map(item => item.id)); + + // 提前定义用于后续处理的数据 + const scaleComponents = new Set(this.scale_component_list); + const subset_scale_component_list = new Set(this.subset_scale_component_list); + // 数据比例 + let scale = sys_width / 390; + // 最大是2倍比例 + // if (sys_width <= 800) { + // scale = scale > 2 ? 2 : scale; + // } else { + // scale = scale; + // } + // 修改缩放比例参数 + diy_data_list.forEach((item, index) => { + // 缩放处理 + const style = item.com_data?.style?.common_style; + if (style && newMarginTopMap.has(item.id) && scaleComponents.has(diy_data_list[index - 1].key) && !subset_scale_component_list.has(item.key)) { + item.floating_up = '-' + (style?.floating_up || 0) * scale + 'px;'; + } else { + item.floating_up = '-' + (style?.floating_up || 0) * 2 + 'rpx;'; + } + }); + return diy_data_list; + }, // 选项卡回调更新数据 tabs_click_event(tabs_id, bool, params = {}) { let new_data = [];