From 4e4f6f3ae552ebd5b98336f5559ff1a14e67000b Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Wed, 31 May 2023 17:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=95=86=E6=88=B7=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=AF=84=E5=88=86=E3=80=81=E8=B5=84=E8=B4=A8=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +- components/cart/cart.vue | 4 +- pages.json | 7 ++ pages/plugins/shop/design/design.css | 21 +++-- pages/plugins/shop/design/design.vue | 97 ++++++++++++++------- pages/plugins/shop/detail/detail.css | 12 ++- pages/plugins/shop/detail/detail.vue | 75 ++++++++++++----- pages/plugins/shop/license/license.vue | 112 +++++++++++++++++++++++++ 8 files changed, 266 insertions(+), 66 deletions(-) create mode 100644 pages/plugins/shop/license/license.vue diff --git a/App.vue b/App.vue index ad46b95e..d09fda2c 100644 --- a/App.vue +++ b/App.vue @@ -44,9 +44,7 @@ // 门店详情顶部导航返回按钮(0 否, 1 是) is_realstore_top_nav_back: 1, // 门店详情搜索框内扫码加购(0否, 1是) - is_realstore_top_search_scan: 1, - // 多商户详情页面展示全站搜索(0否, 1是) - is_shop_whole_search: 1, + is_realstore_top_search_scan: 1, // 开启浮动客服、前提是后台需要开启客服功能(0 否, 1 是) is_online_service_fixed: 1, // 分类页面商品列表模式一级分类使用图标类型(0 大图片, 1 icon图标) diff --git a/components/cart/cart.vue b/components/cart/cart.vue index 576f1cd4..e634158d 100644 --- a/components/cart/cart.vue +++ b/components/cart/cart.vue @@ -317,8 +317,8 @@ // 数量处理方法 goods_buy_number_func(index, buy_number) { var temp_data_list = this.data_list; - var buy_min_number = parseInt(temp_data_list[index]['buy_min_number']) || 1; - var buy_max_number = parseInt(temp_data_list[index]['buy_max_number']) || 0; + var buy_min_number = parseInt(temp_data_list[index]['spec_buy_min_number']) || 1; + var buy_max_number = parseInt(temp_data_list[index]['spec_buy_max_number']) || 0; var inventory = parseInt(temp_data_list[index]['inventory']); var inventory_unit = temp_data_list[index]['inventory_unit']; if (buy_number < buy_min_number) { diff --git a/pages.json b/pages.json index 3f1dcc9d..816a9b37 100644 --- a/pages.json +++ b/pages.json @@ -793,6 +793,13 @@ "enablePullDownRefresh": true, "navigationBarTitleText": "店铺收藏" } + }, + { + "path": "license/license", + "style": { + "enablePullDownRefresh": true, + "navigationBarTitleText": "工商资质" + } } ] }, diff --git a/pages/plugins/shop/design/design.css b/pages/plugins/shop/design/design.css index a44a6412..01817d97 100644 --- a/pages/plugins/shop/design/design.css +++ b/pages/plugins/shop/design/design.css @@ -43,14 +43,14 @@ font-size: 24rpx; } .shop-logo { - width: 280rpx; + width: 90rpx; } .base-bottom image { width: 28rpx; height: 28rpx; } .header .base { - width: calc(100% - 320rpx); + width: calc(100% - 110rpx); } .shop-title { line-height: 40rpx; @@ -67,13 +67,16 @@ font-size: 24rpx; -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); box-shadow: 0 10px 10px rgb(0 0 0 / 30%); -} +} .header-service .item:first-child { border-top: 0 !important; +} +.header-service .qrcode .item:not(:last-child) { + margin-right: 20rpx; } .header-service image { - width: 260rpx; - height: 260rpx; + width: 130rpx; + height: 130rpx; } .header-service .chat-info image { width: 40rpx; @@ -98,6 +101,14 @@ .nav-shop-category { padding-right: 38rpx !important; background-size: 14px 14px; +} +.nav .nav-items { + width: 380rpx; + left: calc(50% - 190rpx); + top: 300rpx; + z-index: 1; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); } /** diff --git a/pages/plugins/shop/design/design.vue b/pages/plugins/shop/design/design.vue index 4e63e9ba..27b8ea55 100644 --- a/pages/plugins/shop/design/design.vue +++ b/pages/plugins/shop/design/design.vue @@ -4,28 +4,23 @@ - + - - + + - + - - - - - - - + + @@ -35,15 +30,24 @@ {{shop.name}} - - - - 在线客服 - - - - {{shop_favor_info.text}}({{shop_favor_info.count}}) - + + + + + 在线客服 + + + + + {{shop_favor_info.text}}({{shop_favor_info.count}}) + + + + + + + {{shop.score_data.value}}分 + @@ -68,7 +72,7 @@ 时间: {{shop.open_week_name}}至{{shop.close_week_name}},{{shop.open_time}}-{{shop.close_time}} - + 长按微信咨询 @@ -83,10 +87,18 @@ 查看商品分类 - - - {{item.name}} - + + + {{item.name}} + + + {{item.name}} + + + {{items.name}} + + + @@ -109,7 +121,6 @@ - @@ -130,7 +141,7 @@ data() { return { common_static_url: common_static_url, - is_shop_whole_search: app.globalData.data.is_shop_whole_search || 0, + is_shop_search_all_search_button: 0, data_bottom_line_status: false, data_list_loding_status: 1, data_list_loding_msg: '', @@ -194,20 +205,22 @@ success: res => { uni.stopPullDownRefresh(); if (res.data.code == 0) { - var data = res.data.data; + var data = res.data.data; + var base = data.base || null; this.setData({ - data_base: data.base || null, + data_base: base, shop: (data.shop || null) == null || data.shop.length <= 0 ? null : data.shop, shop_favor_user: data.shop_favor_user || [], shop_navigation: data.shop_navigation || [], - shop_goods_category: data.shop_goods_category || [], + shop_goods_category: data.shop_goods_category || [], + is_shop_search_all_search_button: (base == null || parseInt(base.is_shop_search_all_search_button || 0) != 1) ? 0 : 1, data: (data.data || null) != null && data.data.length != 0 ? data.data : null, layout_data: data.layout_data || [], data_list_loding_msg: '', data_list_loding_status: 0, data_bottom_line_status: true }); - + // 收藏信息 if ((this.shop || null) != null) { var status = this.shop_favor_user.indexOf(this.shop.id) != -1 ? 1 : 0; @@ -342,7 +355,27 @@ // 导航事件 nav_event(e) { - app.globalData.url_event(e); + // 存在子级则做子级显示隐藏处理 + var value = e.currentTarget.dataset.value || null; + if(value == null) { + var index = e.currentTarget.dataset.index; + var temp_nav = this.shop_navigation; + for(var i in temp_nav) { + if(i == index) { + temp_nav[i]['items_status'] = ((temp_nav[i]['items_status'] || 0) == 0) ? 1 : 0; + } else { + temp_nav[i]['items_status'] = 0; + } + } + this.setData({shop_navigation: temp_nav}); + } else { + app.globalData.url_event(e); + } + }, + + // url事件 + url_event(e) { + app.globalData.url_event(e); }, // 剪切板 diff --git a/pages/plugins/shop/detail/detail.css b/pages/plugins/shop/detail/detail.css index 86905b09..48dc9f39 100644 --- a/pages/plugins/shop/detail/detail.css +++ b/pages/plugins/shop/detail/detail.css @@ -45,14 +45,14 @@ font-size: 24rpx; } .shop-logo { - width: 280rpx; + width: 90rpx; } .base-bottom image { width: 28rpx; height: 28rpx; } .header .base { - width: calc(100% - 320rpx); + width: calc(100% - 110rpx); } .shop-title { line-height: 40rpx; @@ -103,6 +103,14 @@ .nav-shop-category { padding-right: 38rpx !important; background-size: 14px 14px; +} +.nav .nav-items { + width: 380rpx; + left: calc(50% - 190rpx); + top: 300rpx; + z-index: 1; + -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%); + box-shadow: 0 10px 10px rgb(0 0 0 / 30%); } /** diff --git a/pages/plugins/shop/detail/detail.vue b/pages/plugins/shop/detail/detail.vue index ce655a7e..62bde02f 100644 --- a/pages/plugins/shop/detail/detail.vue +++ b/pages/plugins/shop/detail/detail.vue @@ -2,28 +2,23 @@ - + - - + + - + - - - - - - - + + @@ -33,14 +28,23 @@ {{shop.name}} - + + 在线客服 - + + {{shop_favor_info.text}}({{shop_favor_info.count}}) + + + + + + + {{shop.score_data.value}}分 @@ -66,7 +70,7 @@ 时间: {{shop.open_week_name}}至{{shop.close_week_name}},{{shop.open_time}}-{{shop.close_time}} - + 长按微信咨询 @@ -82,8 +86,18 @@ 查看商品分类 - - {{item.name}} + + + {{item.name}} + + + {{item.name}} + + + {{items.name}} + + + @@ -172,7 +186,7 @@ data_list_loding_status: 1, data_list_loding_msg: '', currency_symbol: app.globalData.data.currency_symbol, - is_shop_whole_search: app.globalData.data.is_shop_whole_search || 0, + is_shop_search_all_search_button: 0, params: null, user: null, data_base: null, @@ -247,14 +261,16 @@ success: res => { uni.stopPullDownRefresh(); if (res.data.code == 0) { - var data = res.data.data; + var data = res.data.data; + var base = data.base || null; var temp_data = data.data || []; this.setData({ - data_base: data.base || null, + data_base: base, shop: data.shop || null, shop_favor_user: data.shop_favor_user || [], shop_navigation: data.shop_navigation || [], - shop_goods_category: data.shop_goods_category || [], + shop_goods_category: data.shop_goods_category || [], + is_shop_search_all_search_button: (base == null || parseInt(base.is_shop_search_all_search_button || 0) != 1) ? 0 : 1, data: temp_data, slider: data.slider || [], data_list_loding_msg: '', @@ -393,8 +409,23 @@ }, // 导航事件 - nav_event(e) { - app.globalData.url_event(e); + nav_event(e) { + // 存在子级则做子级显示隐藏处理 + var value = e.currentTarget.dataset.value || null; + if(value == null) { + var index = e.currentTarget.dataset.index; + var temp_nav = this.shop_navigation; + for(var i in temp_nav) { + if(i == index) { + temp_nav[i]['items_status'] = ((temp_nav[i]['items_status'] || 0) == 0) ? 1 : 0; + } else { + temp_nav[i]['items_status'] = 0; + } + } + this.setData({shop_navigation: temp_nav}); + } else { + app.globalData.url_event(e); + } }, // url事件 diff --git a/pages/plugins/shop/license/license.vue b/pages/plugins/shop/license/license.vue new file mode 100644 index 00000000..1fbb4eba --- /dev/null +++ b/pages/plugins/shop/license/license.vue @@ -0,0 +1,112 @@ + + + \ No newline at end of file