From d5b18f5f12de9242b9301c063ad1149d506d10c9 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Thu, 9 Jan 2025 15:06:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=90=9C=E7=B4=A2+=E8=BD=AC=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods-search/goods-search.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/goods-search/goods-search.vue b/pages/goods-search/goods-search.vue index 94436280..6737c1e0 100644 --- a/pages/goods-search/goods-search.vue +++ b/pages/goods-search/goods-search.vue @@ -324,7 +324,7 @@ this.setData({ params: params, post_data: { - wd: params.keywords || '' + wd: (params.keywords || '').replace(/\+/g, ' ') } }); }, From 6821b91200115f15740f6231e5c0b6d20af7c73d Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Thu, 9 Jan 2025 15:57:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?diy=E6=B5=AE=E5=8A=A8=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=BF=AB=E6=8D=B7=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/float-window.vue | 26 ++++++++++++++++++++------ components/quick-nav/quick-nav.vue | 10 +++++++--- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/components/diy/float-window.vue b/components/diy/float-window.vue index e957231b..6099a38d 100644 --- a/components/diy/float-window.vue +++ b/components/diy/float-window.vue @@ -1,6 +1,6 @@ @@ -22,10 +23,12 @@ import { isEmpty } from '@/common/js/common/common.js'; import imageEmpty from '@/components/diy/modules/image-empty.vue'; import componentOnlineService from '@/components/online-service/online-service'; + import componentQuickNav from '@/components/quick-nav/quick-nav'; export default { components: { imageEmpty, - componentOnlineService + componentOnlineService, + componentQuickNav }, props: { propValue: { @@ -83,11 +86,22 @@ y: y }); }, - url_open() { + // 按钮事件 + btn_event() { const { button_jump, button_link } = this.form; - // 如果是指定链接,并且链接不为空的情况下跳转 - if (button_jump == 'link' && !isEmpty(button_link)) { - app.globalData.url_open(button_link.page); + switch(button_jump) { + // 链接 + case 'link' : + if (!isEmpty(button_link)) { + app.globalData.url_open(button_link.page); + } + break; + // 快捷导航 + case 'quick_nav' : + if ((this.$refs.quick_nav || null) != null) { + this.$refs.quick_nav.quick_open_event(); + } + break; } }, }, diff --git a/components/quick-nav/quick-nav.vue b/components/quick-nav/quick-nav.vue index bd215851..c2db9b74 100644 --- a/components/quick-nav/quick-nav.vue +++ b/components/quick-nav/quick-nav.vue @@ -1,7 +1,7 @@ + \ No newline at end of file diff --git a/pages/index/index.css b/pages/index/index.css index 3db744d8..8e944b06 100644 --- a/pages/index/index.css +++ b/pages/index/index.css @@ -165,31 +165,4 @@ } .plugins-homemiddleadv .item { flex: 1 1 calc(50% - 20rpx); -} - -/** - * 弹屏广告 - 插件 - */ -.plugins-popupscreen { - position: fixed; - left: 0; - top: 0; - z-index: 20; - background-color: rgb(0 0 0 / 0.3); -} -.plugins-popupscreen .close { - right: 10%; - top: 0; - z-index: 1; - width: 46rpx; - height: 46rpx; - line-height: 46rpx; - background-color: rgb(4 4 4 / 0.3); - border: solid 1px #a9a9a9; -} -.plugins-popupscreen .content { - margin-top: calc(50vh - 200rpx) !important; -} -.plugins-popupscreen .content image { - width: 600rpx; } \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 19938310..1d5048a5 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -261,16 +261,6 @@ - - - - - - - - - - @@ -392,11 +382,6 @@ plugins_label_data: null, // 首页中间广告插件 plugins_homemiddleadv_data: null, - // 弹屏广告、这里设置一天后可以再次显示 - plugins_popupscreen_data: null, - plugins_popupscreen_status: 0, - plugins_popupscreen_cache_key: 'plugins_popupscreen_cache_key', - plugins_popupscreen_timer: null, // 哀悼灰度插件 plugins_mourning_data_is_app: app.globalData.is_app_mourning(), // 标签插件 @@ -554,7 +539,6 @@ plugins_activity_data: (data.plugins_activity_data || null) == null || data.plugins_activity_data.length <= 0 ? null : data.plugins_activity_data, plugins_label_data: (data.plugins_label_data || null) == null || (data.plugins_label_data.base || null) == null || (data.plugins_label_data.data || null) == null || data.plugins_label_data.data.length <= 0 ? null : data.plugins_label_data, plugins_homemiddleadv_data: (data.plugins_homemiddleadv_data || null) == null || data.plugins_homemiddleadv_data.length <= 0 ? null : data.plugins_homemiddleadv_data, - plugins_popupscreen_data: data.plugins_popupscreen_data || null, plugins_mourning_data_is_app: parseInt(data.plugins_mourning_data || 0) == 1, plugins_blog_data: data.plugins_blog_data || null, plugins_realstore_data: data.plugins_realstore_data || null, @@ -574,9 +558,6 @@ // 设置顶部导航的默认颜色 this.set_navigation_bar_color(); - // 弹屏广告插件处理 - this.plugins_popupscreen_handle(); - // 是否需要重新加载数据 if (parseInt(data.is_result_data_cache || 0) == 1) { this.init({ is_cache: 0 }); @@ -661,48 +642,6 @@ app.globalData.url_event(e); }, - // 弹屏广告插件处理 - plugins_popupscreen_handle() { - if (this.plugins_popupscreen_data != null) { - // 不存在关闭缓存或者超过间隔时间则显示 - var cv = parseInt(uni.getStorageSync(this.plugins_popupscreen_cache_key)) || 0; - var pv = parseInt(this.plugins_popupscreen_data.interval_time) || 86400; - if (cv == 0 || cv + pv < app.globalData.get_timestamp()) { - // 是否开启自动关闭 - var timer = null; - var ct = parseInt(this.plugins_popupscreen_data.close_time) || 0; - if (ct > 0) { - var self = this; - timer = setTimeout(function () { - self.setData({ - plugins_popupscreen_status: 0, - }); - uni.setStorage({ - key: self.plugins_popupscreen_cache_key, - data: app.globalData.get_timestamp(), - }); - }, ct * 1000); - } - this.setData({ - plugins_popupscreen_status: 1, - plugins_popupscreen_timer: timer, - }); - } - } - }, - - // 弹屏广告 - 插件 关闭事件 - plugins_popupscreen_close_event(e) { - this.setData({ - plugins_popupscreen_status: 0, - }); - uni.setStorage({ - key: this.plugins_popupscreen_cache_key, - data: app.globalData.get_timestamp(), - }); - clearInterval(this.plugins_popupscreen_timer); - }, - // 轮播改变、背景色处理 change_banner(color) { if ((color || null) == null) {