From 76a345ef78361bd394a21ea4ca35ff46fe1b2107 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Thu, 31 Mar 2022 23:17:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=9B=B8=E5=85=B3=E9=97=A8=E5=BA=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E3=80=81=E9=97=A8=E5=BA=97=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BB=9F=E4=B8=80=E7=BB=84=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/css/page.css | 4 + common/css/plugins.css | 41 ++++ components/online-service/online-service.vue | 22 +-- components/realstore-list/realstore-list.vue | 185 +++++++++++++++++++ pages/article-detail/article-detail.vue | 2 +- pages/goods-detail/goods-detail.css | 10 + pages/goods-detail/goods-detail.vue | 60 +++++- pages/plugins/blog/detail/detail.vue | 2 +- pages/plugins/realstore/index/index.css | 41 ---- pages/plugins/realstore/index/index.vue | 136 +------------- pages/plugins/realstore/search/search.css | 37 ---- pages/plugins/realstore/search/search.vue | 137 +------------- 12 files changed, 317 insertions(+), 360 deletions(-) create mode 100644 components/realstore-list/realstore-list.vue diff --git a/common/css/page.css b/common/css/page.css index d9fba017..f33bca6b 100644 --- a/common/css/page.css +++ b/common/css/page.css @@ -42,6 +42,10 @@ iframe, .bottom-fixed { right: 0 !important; } +.web-html-content iframe { + width: 100% !important; + max-height: 500rpx !important; +} /** * 隐藏导航栏内容、仅展示返回按钮 */ diff --git a/common/css/plugins.css b/common/css/plugins.css index 8a362986..4afe2972 100644 --- a/common/css/plugins.css +++ b/common/css/plugins.css @@ -178,4 +178,45 @@ .plugins-blog-grid-list .item .blog-img { width: 100%; height: 230rpx !important; +} + +/** +* 门店 - 数据列表 +*/ +.plugins-realstore-data-list .item .address-content { + width: calc(100% - 220rpx); +} +.plugins-realstore-data-list .item .icon-list { + right: 20rpx; + bottom: 20rpx; +} +.plugins-realstore-data-list .item .icon-list .icon-item { + width: 50rpx; + height: 50rpx; + line-height: 50rpx; +} +.plugins-realstore-data-list .item .icon-item .badge-icon { + top: -10px; + right: 2px; +} +.plugins-realstore-data-list .item .icon-list .icon-item:not(:last-child) { + margin-right: 15rpx; +} +.plugins-realstore-data-list .item .logo { + width: 110rpx; + height: 110rpx !important; +} +.plugins-realstore-data-list .item .base-right { + width: calc(100% - 130rpx); +} +.plugins-realstore-data-list .item .base-right .title { + width: calc(100% - 110rpx); +} +.plugins-realstore-data-list .item .base-right .status-icon { + border-top-left-radius: 50rpx; + border-bottom-left-radius: 50rpx; + top: 20rpx; + right: -1px; + padding: 5rpx 20rpx; + box-shadow: -1px 1px 3px rgb(0 0 0 / 10%); } \ No newline at end of file diff --git a/components/online-service/online-service.vue b/components/online-service/online-service.vue index ae164296..8c661f07 100644 --- a/components/online-service/online-service.vue +++ b/components/online-service/online-service.vue @@ -4,14 +4,14 @@ - - 客服 + + 客服 @@ -31,13 +31,13 @@ @@ -47,7 +47,7 @@ @@ -253,7 +253,7 @@ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); background: rgba(0, 0, 0, 0.6); } - .online-service-event-submit image { + .online-service-event-submit .icon { width: 21px !important; height: 21px !important; } @@ -270,12 +270,12 @@ font-size: 24rpx; background: transparent; } - .goods-chat-container image { + .goods-chat-container .icon { width: 40rpx; height: 40rpx; margin: 10rpx 0 5rpx 0; } - .goods-chat-container .dis-block { + .goods-chat-container .text { margin-top: -10rpx; } \ No newline at end of file diff --git a/components/realstore-list/realstore-list.vue b/components/realstore-list/realstore-list.vue new file mode 100644 index 00000000..8e2ca8ee --- /dev/null +++ b/components/realstore-list/realstore-list.vue @@ -0,0 +1,185 @@ + + + \ No newline at end of file diff --git a/pages/article-detail/article-detail.vue b/pages/article-detail/article-detail.vue index 2ea74202..73e3bdbe 100644 --- a/pages/article-detail/article-detail.vue +++ b/pages/article-detail/article-detail.vue @@ -14,7 +14,7 @@ - + diff --git a/pages/goods-detail/goods-detail.css b/pages/goods-detail/goods-detail.css index 4279fade..7220fbac 100644 --- a/pages/goods-detail/goods-detail.css +++ b/pages/goods-detail/goods-detail.css @@ -699,4 +699,14 @@ .plugins-intellectstools-content-top-container .panel-title, .plugins-intellectstools-content-top-container .panel-content .item:not(:last-child) { border-bottom: 1px solid #c8e4fb !important; +} + +/** + * 门店 - 插件 + */ +.plugins-realstore-popup { + max-height: 60vh; + overflow-y: scroll; + overflow-x: hidden; + margin-top: 20rpx; } \ No newline at end of file diff --git a/pages/goods-detail/goods-detail.vue b/pages/goods-detail/goods-detail.vue index f28ce39c..fdc913a9 100644 --- a/pages/goods-detail/goods-detail.vue +++ b/pages/goods-detail/goods-detail.vue @@ -199,9 +199,17 @@ - - + + + + + 相关门店 + 更多 + + + + @@ -299,7 +307,7 @@ - + @@ -519,6 +527,25 @@ + + + + + + + + + + + + + + + 无相关门店信息 + + + + @@ -544,6 +571,7 @@ import componentNoData from "../../components/no-data/no-data"; import componentBottomLine from "../../components/bottom-line/bottom-line"; import componentOnlineService from "../../components/online-service/online-service"; + import componentRealstoreList from "../../components/realstore-list/realstore-list"; var common_static_url = app.globalData.get_static_url('common'); var system_info = app.globalData.get_system_info() || {}; @@ -659,6 +687,9 @@ plugins_intellectstools_data: null, // 客服插件 plugins_chat_data: null, + // 门店插件 + plugins_realstore_data: null, + popup_realstore_status: false }; }, @@ -670,7 +701,8 @@ componentNoData, componentTrnNav, componentBottomLine, - componentOnlineService + componentOnlineService, + componentRealstoreList }, onLoad(params) { @@ -826,7 +858,8 @@ plugins_wholesale_data: ((data.plugins_wholesale_data || null) == null) ? null : data.plugins_wholesale_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_intellectstools_data: data.plugins_intellectstools_data || null, - plugins_chat_data: data.plugins_chat_data || null + plugins_chat_data: data.plugins_chat_data || null, + plugins_realstore_data: data.plugins_realstore_data || null, }; // 导航首页按钮 if ((data.nav_home_button_info || null) != null) { @@ -1005,7 +1038,7 @@ case 'show': app.globalData.call_tel(value || this.common_app_customer_service_tel); break; - // 购买、加入购物车 + // 购买、加入购物车 case 'buy': case 'cart': this.setData({ @@ -1013,7 +1046,13 @@ buy_event_type: type }); break; - // 默认 + // 门店 + case 'plugins-realstore' : + this.setData({ + popup_realstore_status: true + }); + break; + // 默认 default: app.globalData.showToast('事件未处理'); } @@ -1698,6 +1737,13 @@ } }, + // 门店弹层关闭 + popup_realstore_close_event(e) { + this.setData({ + popup_realstore_status: false + }); + }, + // 评价图片预览 comment_images_show_event(e) { var index = e.currentTarget.dataset.index; diff --git a/pages/plugins/blog/detail/detail.vue b/pages/plugins/blog/detail/detail.vue index 763114d0..4cca556b 100644 --- a/pages/plugins/blog/detail/detail.vue +++ b/pages/plugins/blog/detail/detail.vue @@ -14,7 +14,7 @@ - + diff --git a/pages/plugins/realstore/index/index.css b/pages/plugins/realstore/index/index.css index 1fb02ba0..bd4cd181 100644 --- a/pages/plugins/realstore/index/index.css +++ b/pages/plugins/realstore/index/index.css @@ -9,45 +9,4 @@ } .nav-search { width: calc(100% - 210rpx); -} - -/** -* 数据列表 -*/ -.data-list .item .address-content { - width: calc(100% - 220rpx); -} -.data-list .item .icon-list { - right: 20rpx; - bottom: 20rpx; -} -.data-list .item .icon-list .icon-item { - width: 50rpx; - height: 50rpx; - line-height: 50rpx; -} -.data-list .item .icon-item .badge-icon { - top: -10px; - right: 2px; -} -.data-list .item .icon-list .icon-item:not(:last-child) { - margin-right: 15rpx; -} -.data-list .item .logo { - width: 110rpx; - height: 110rpx !important; -} -.data-list .item .base-right { - width: calc(100% - 130rpx); -} -.data-list .item .base-right .title { - width: calc(100% - 110rpx); -} -.data-list .item .base-right .status-icon { - border-top-left-radius: 50rpx; - border-bottom-left-radius: 50rpx; - top: 20rpx; - right: -1px; - padding: 5rpx 20rpx; - box-shadow: -1px 1px 3px rgb(0 0 0 / 10%); } \ No newline at end of file diff --git a/pages/plugins/realstore/index/index.vue b/pages/plugins/realstore/index/index.vue index 225e2a18..2ed8f7c6 100644 --- a/pages/plugins/realstore/index/index.vue +++ b/pages/plugins/realstore/index/index.vue @@ -49,46 +49,7 @@ - - - - - - - - {{item.status_info.msg}} - - {{item.alias}} - {{item.name}} - - - 营业时间:{{item.status_info.time}} - 距离您{{item.distance}} - - - - - - - - - {{item.province_name}}{{item.city_name}}{{item.county_name}}{{item.address}} - - - - - - - - - - - - - - - - + @@ -105,7 +66,8 @@ import componentBottomLine from "../../../../components/bottom-line/bottom-line"; import componentSearch from "../../../../components/search/search"; import componentBanner from "../../../../components/slider/slider"; - import componentIconNav from "../../../../components/icon-nav/icon-nav"; + import componentIconNav from "../../../../components/icon-nav/icon-nav"; + import componentRealstoreList from "../../../../components/realstore-list/realstore-list"; export default { data() { @@ -134,7 +96,8 @@ componentBottomLine, componentSearch, componentBanner, - componentIconNav + componentIconNav, + componentRealstoreList }, props: {}, @@ -235,67 +198,6 @@ }); }, - // 收藏事件 - favor_event(e) { - if(!app.globalData.is_single_page_check()) { - return false; - } - var user = app.globalData.get_user_info(this, 'favor_event'); - if (user != false) { - // 用户未绑定用户则转到登录页面 - if (app.globalData.user_is_need_login(user)) { - uni.navigateTo({ - url: "/pages/login/login?event_callback=favor_event" - }); - return false; - } else { - var index = e.currentTarget.dataset.index; - var info = this.data_list[index]; - uni.showLoading({ - title: '处理中...' - }); - uni.request({ - url: app.globalData.get_request_url("reversal", "favor", "realstore"), - method: 'POST', - data: { - "id": info.id - }, - dataType: 'json', - success: res => { - uni.hideLoading(); - if (res.data.code == 0) { - var temp_data = this.data_list; - var temp_favor = this.favor_user; - temp_data[index]['is_favor'] = res.data.data.status; - if(res.data.data.status == 1) { - if(temp_favor.indexOf(info.id) == -1) { - temp_favor.push(info.id); - } - } else { - if(temp_favor.indexOf(info.id) != -1) { - temp_favor.splice(index, 1); - } - } - this.setData({ - data_list: temp_data, - favor_user: temp_favor - }) - app.globalData.showToast(res.data.msg, "success"); - } else { - if (app.globalData.is_login_check(res.data, this, 'favor_event')) { - app.globalData.showToast(res.data.msg); - } - } - }, - fail: () => { - uni.hideLoading(); - app.globalData.showToast('服务器请求出错'); - } - }); - } - } - }, - // 搜索事件 search_button_event(e) { var params = (e || null) == null ? '' : '?keywords='+e; @@ -326,34 +228,6 @@ this.setData({ user_location: data }); - }, - - // 剪切板 - text_copy_event(e) { - app.globalData.text_copy_event(e); - }, - - // 地图查看 - address_map_event(e) { - var info = this.data_list[e.currentTarget.dataset.index]; - if (info.lat == 0 || info.lng == 0) { - app.globalData.showToast("地址有误"); - return false; - } - - // 打开地图 - var address = (info.province_name || '') + (info.city_name || '') + (info.county_name || '') + (info.address || ''); - app.globalData.open_location(info.lng, info.lat, info.name, address); - }, - - // 电话 - tel_event(e) { - app.globalData.call_tel(e.currentTarget.dataset.value || null); - }, - - // url事件 - url_event(e) { - app.globalData.url_event(e); } } }; diff --git a/pages/plugins/realstore/search/search.css b/pages/plugins/realstore/search/search.css index bd60dbec..696755ba 100644 --- a/pages/plugins/realstore/search/search.css +++ b/pages/plugins/realstore/search/search.css @@ -16,41 +16,4 @@ */ .scroll-box { height: calc(100vh - 180rpx); -} -.data-list .item .address-content { - width: calc(100% - 220rpx); -} -.data-list .item .icon-list { - right: 20rpx; - bottom: 20rpx; -} -.data-list .item .icon-list .icon-item { - width: 50rpx; - height: 50rpx; - line-height: 50rpx; -} -.data-list .item .icon-item .badge-icon { - top: -10px; - right: 2px; -} -.data-list .item .icon-list .icon-item:not(:last-child) { - margin-right: 15rpx; -} -.data-list .item .logo { - width: 110rpx; - height: 110rpx !important; -} -.data-list .item .base-right { - width: calc(100% - 130rpx); -} -.data-list .item .base-right .title { - width: calc(100% - 110rpx); -} -.data-list .item .base-right .status-icon { - border-top-left-radius: 50rpx; - border-bottom-left-radius: 50rpx; - top: 20rpx; - right: -1px; - padding: 5rpx 20rpx; - box-shadow: -1px 1px 3px rgb(0 0 0 / 10%); } \ No newline at end of file diff --git a/pages/plugins/realstore/search/search.vue b/pages/plugins/realstore/search/search.vue index 592dbff7..293f4b73 100644 --- a/pages/plugins/realstore/search/search.vue +++ b/pages/plugins/realstore/search/search.vue @@ -29,46 +29,9 @@ - - - - - - - - {{item.status_info.msg}} - - {{item.alias}} - {{item.name}} - - - 营业时间:{{item.status_info.time}} - 距离您{{item.distance}} - - - - - - - - - {{item.province_name}}{{item.city_name}}{{item.county_name}}{{item.address}} - - - - - - - - - - - - - - - - + + + @@ -85,6 +48,7 @@ import componentNoData from "../../../../components/no-data/no-data"; import componentBottomLine from "../../../../components/bottom-line/bottom-line"; import componentSearch from "../../../../components/search/search"; + import componentRealstoreList from "../../../../components/realstore-list/realstore-list"; export default { data() { @@ -112,7 +76,8 @@ components: { componentNoData, componentBottomLine, - componentSearch + componentSearch, + componentRealstoreList }, props: {}, @@ -293,68 +258,6 @@ } }); }, - - // 收藏事件 - favor_event(e) { - if(!app.globalData.is_single_page_check()) { - return false; - } - var user = app.globalData.get_user_info(this, 'favor_event'); - if (user != false) { - // 用户未绑定用户则转到登录页面 - if (app.globalData.user_is_need_login(user)) { - uni.navigateTo({ - url: "/pages/login/login?event_callback=favor_event" - }); - return false; - } else { - var index = e.currentTarget.dataset.index; - var info = this.data_list[index]; - uni.showLoading({ - title: '处理中...' - }); - uni.request({ - url: app.globalData.get_request_url("reversal", "favor", "realstore"), - method: 'POST', - data: { - "id": info.id - }, - dataType: 'json', - success: res => { - uni.hideLoading(); - if (res.data.code == 0) { - var temp_data = this.data_list; - var temp_favor = this.favor_user; - temp_data[index]['is_favor'] = res.data.data.status; - if(res.data.data.status == 1) { - if(temp_favor.indexOf(info.id) == -1) { - temp_favor.push(info.id); - } - } else { - var fi = temp_favor.indexOf(info.id); - if(fi != -1) { - temp_favor.splice(fi, 1); - } - } - this.setData({ - data_list: temp_data, - favor_user: temp_favor - }) - app.globalData.showToast(res.data.msg, "success"); - } else { - if (app.globalData.is_login_check(res.data, this, 'favor_event')) { - app.globalData.showToast(res.data.msg); - } - } - }, - fail: () => { - uni.hideLoading(); - app.globalData.showToast('服务器请求出错'); - } - }); - } - } - }, // 滚动加载 scroll_lower(e) { @@ -401,34 +304,6 @@ this.setData({ user_location: data }); - }, - - // 剪切板 - text_copy_event(e) { - app.globalData.text_copy_event(e); - }, - - // 地图查看 - address_map_event(e) { - var info = this.data_list[e.currentTarget.dataset.index]; - if (info.lat == 0 || info.lng == 0) { - app.globalData.showToast("地址有误"); - return false; - } - - // 打开地图 - var address = (info.province_name || '') + (info.city_name || '') + (info.county_name || '') + (info.address || ''); - app.globalData.open_location(info.lng, info.lat, info.name, address); - }, - - // 电话 - tel_event(e) { - app.globalData.call_tel(e.currentTarget.dataset.value || null); - }, - - // url事件 - url_event(e) { - app.globalData.url_event(e); } } };