diff --git a/App.vue b/App.vue
index 8bc47ce1..4382e771 100644
--- a/App.vue
+++ b/App.vue
@@ -79,7 +79,10 @@
*/
is_current_single_page() {
var scene = this.get_scene_data();
- return (scene == 1154 || scene == 1155) ? 1 : 0;
+ // #ifdef MP-WEIXIN
+ return (scene == 1154) ? 1 : 0;
+ // #endif
+ return 0;
},
/**
@@ -759,15 +762,23 @@
// #ifdef MP-WEIXIN
// 微信小程序展示系统分享好友和朋友圈按钮
- // 其他端小程序不用展示会调起分享窗口
- uni.showShareMenu({
- withShareTicket: true,
- title: share.title,
- desc: share.desc,
- path: share.path + share.query,
- imageUrl: share.img,
- menus: ['shareAppMessage', 'shareTimeline']
- });
+ // 其他端小程序不用展示会调起分享窗口
+ var not_pages = ['/pages/user/user', '/pages/cart/cart'];
+ var menu = ['shareAppMessage', 'shareTimeline'];
+ if(not_pages.indexOf(share.url) == -1) {
+ uni.showShareMenu({
+ withShareTicket: true,
+ title: share.title,
+ desc: share.desc,
+ path: share.path + share.query,
+ imageUrl: share.img,
+ menus: menu
+ });
+ } else {
+ wx.hideShareMenu({
+ menus: ['shareTimeline']
+ });
+ }
// #endif
// #ifdef H5
// H5处理微信环境分享自定义信息
diff --git a/pages/goods-category/goods-category.vue b/pages/goods-category/goods-category.vue
index 508628c9..79948a8d 100644
--- a/pages/goods-category/goods-category.vue
+++ b/pages/goods-category/goods-category.vue
@@ -1,98 +1,102 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{v.name}}
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
- {{data_content.vice_name}}
- {{data_content.describe}}
-
-
-
-
-
-
-
-
-
-
- {{v.name}}
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{v.name}}
-
-
-
-
-
- {{v.name}}
- {{v.describe}}
- 更多
-
-
-
-
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+ {{data_content.vice_name}}
+ {{data_content.describe}}
+
+
+
+
+
+
+
+
-
- {{vs.name}}
+
+ {{v.name}}
+
+
+
+
+ {{v.name}}
+ {{v.describe}}
+ 更多
+
+
+
+
+
+
+ {{vs.name}}
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
+
@@ -114,7 +118,9 @@
category_show_level: 3,
data_bottom_line_status: false,
// 自定义分享信息
- share_info: {}
+ share_info: {},
+ // 是否单页预览
+ is_single_page: app.globalData.is_current_single_page() || 0
};
},
diff --git a/pages/goods-detail/goods-detail.vue b/pages/goods-detail/goods-detail.vue
index 1bdf9ecb..e301155f 100644
--- a/pages/goods-detail/goods-detail.vue
+++ b/pages/goods-detail/goods-detail.vue
@@ -1,9 +1,9 @@
-
+
-
+
@@ -631,7 +631,7 @@
// 标签插件
plugins_label_data: null,
// 是否单页预览
- is_single_page: app.globalData.is_current_single_page()
+ is_single_page: app.globalData.is_current_single_page() || 0
};
},
@@ -976,9 +976,12 @@
// 导航购买按钮事件
nav_buy_submit_event(e) {
+ if(this.is_single_page == 1) {
+ app.globalData.showToast('请前往小程序使用完整服务');
+ return false;
+ }
var type = e.currentTarget.dataset.type || 'buy';
var value = e.currentTarget.dataset.value || null;
-
switch (type) {
// 展示型、拨打电话
case 'show':
@@ -1000,6 +1003,10 @@
// 收藏事件
goods_favor_event(e) {
+ if(this.is_single_page == 1) {
+ app.globalData.showToast('请前往小程序使用完整服务');
+ return false;
+ }
var user = app.globalData.get_user_info(this, 'goods_favor_event');
if (user != false) {
// 用户未绑定用户则转到登录页面
@@ -1480,6 +1487,10 @@
// 分享开启弹层
popup_share_event(e) {
+ if(this.is_single_page == 1) {
+ app.globalData.showToast('请前往小程序使用完整服务');
+ return false;
+ }
this.setData({
popup_share_status: true
});
@@ -1554,6 +1565,10 @@
// 优惠券开启弹层
popup_coupon_event(e) {
+ if(this.is_single_page == 1) {
+ app.globalData.showToast('请前往小程序使用完整服务');
+ return false;
+ }
this.setData({
popup_coupon_status: true
});
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 98f75fc7..0cf907b6 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -379,7 +379,7 @@
// 哀悼灰度插件
plugins_mourning_data: 0,
// 是否单页预览
- is_single_page: app.globalData.is_current_single_page()
+ is_single_page: app.globalData.is_current_single_page() || 0
};
},
@@ -403,10 +403,7 @@
this.init();
// 初始化配置
- this.init_config();
-
-
- console.log(this.is_single_page);
+ this.init_config();
},
// 下拉刷新