From 8f3dd4fdceceaad538a7892641d7069e3784b6c3 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Thu, 17 Mar 2022 14:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=AF=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 6 ++++-- common/js/common/share.js | 4 ++-- pages/goods-detail/goods-detail.vue | 15 +++++++++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/App.vue b/App.vue index 3c9eddb4..46f46220 100644 --- a/App.vue +++ b/App.vue @@ -31,8 +31,10 @@ default_round_success_icon: "/static/images/common/round-success-icon.png", // 错误圆形提示图片 default_round_error_icon: "/static/images/common/round-error-icon.png", - // 分享及转发使用页面设置的默认图片及系统默认图片(true 是, false 否) - is_share_use_image: true, + // 分享及转发使用页面设置的默认图片及系统默认图片(0 否, 1 是) + is_share_use_image: 1, + // 商品详情页底部导航是否开启购物车功能(0 否, 1 是) + is_goods_bottom_opt_cart: 0, // tabbar页面 tabbar_pages: [ "/pages/index/index", diff --git a/common/js/common/share.js b/common/js/common/share.js index bf333f06..9ce3bf68 100644 --- a/common/js/common/share.js +++ b/common/js/common/share.js @@ -23,7 +23,7 @@ export default { desc: share.desc, path: share.path + share.query } - if(app.globalData.data.is_share_use_image) { + if(app.globalData.data.is_share_use_image == 1) { data['imageUrl'] = share.img; } return data; @@ -37,7 +37,7 @@ export default { title: share.title, query: ((share.query || null) != null && share.query.substr(0, 1) == '?') ? share.query.slice(1) : share.query }; - if(app.globalData.data.is_share_use_image) { + if(app.globalData.data.is_share_use_image == 1) { data['imageUrl'] = share.img; } return data; diff --git a/pages/goods-detail/goods-detail.vue b/pages/goods-detail/goods-detail.vue index 774bfc47..6ae2c0fe 100644 --- a/pages/goods-detail/goods-detail.vue +++ b/pages/goods-detail/goods-detail.vue @@ -320,7 +320,7 @@ - + @@ -335,7 +335,7 @@ {{nav_home_button_info.text}} - + @@ -648,7 +648,9 @@ // 智能工具插件 plugins_intellectstools_data: null, // 是否单页预览 - is_single_page: app.globalData.is_current_single_page() || 0 + is_single_page: app.globalData.is_current_single_page() || 0, + // 是否开启购物车 + is_opt_cart: app.globalData.data.is_goods_bottom_opt_cart || 0, }; }, @@ -670,9 +672,14 @@ // 是否自定义购买事件 buy_event_type: params.opt_buy_event_type || 'buy', // 是否指定开启购买弹窗、默认0否、1是 - popup_status: (parseInt(params.is_opt_buy_status) || 0) == 1 + popup_status: (parseInt(params.is_opt_buy_status) || 0) == 1, }); + // 是否自定义购物车状态 + if(params.is_opt_cart !== undefined) { + this.setData({is_opt_cart: params.is_opt_cart || 0}); + } + // 数据加载 this.init(); },