Ver código fonte

【Add】允许分享

liuxiangxin 7 meses atrás
pai
commit
4cc209af71
3 arquivos alterados com 21 adições e 2 exclusões
  1. 7 1
      pages/car/index.vue
  2. 7 0
      pages/score/product.vue
  3. 7 1
      pages/user/index.vue

+ 7 - 1
pages/car/index.vue

@@ -63,7 +63,13 @@
 			}
 		},
 		onLoad() {
-			
+			// #ifdef MP-WEIXIN
+			//分享按钮
+			uni.showShareMenu({
+				withShareTicket: true,
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+			// #endif
 		},
 		onShow() {
 			// 登录提示

+ 7 - 0
pages/score/product.vue

@@ -137,6 +137,13 @@
 				// 地址列表
 				that.addrList = data.list;
 			})
+			// #ifdef MP-WEIXIN
+			//分享按钮
+			uni.showShareMenu({
+				withShareTicket: true,
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+			// #endif
 		},
 		onShow() {
 			// 如果存在产品ID的话

+ 7 - 1
pages/user/index.vue

@@ -49,7 +49,13 @@
 			}
 		},
 		onLoad() {
-			
+			// #ifdef MP-WEIXIN
+			//分享按钮
+			uni.showShareMenu({
+				withShareTicket: true,
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+			// #endif
 		},
 		onShow() {
 			// 登录提示