Bläddra i källkod

【Add】领券活动,分享功能

liuxiangxin 6 månader sedan
förälder
incheckning
8d64f87717
1 ändrade filer med 13 tillägg och 0 borttagningar
  1. 13 0
      pages/coupon/active.vue

+ 13 - 0
pages/coupon/active.vue

@@ -84,6 +84,19 @@
 		},
 		onLoad(param) {
 			this.requestParam.id = param.id;
+			// #ifdef MP-WEIXIN
+			//分享按钮
+			uni.showShareMenu({
+				withShareTicket: true,
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+			// #endif
+		},
+		onShareAppMessage(obj) {
+			return {
+				title: this.activeInfo.name,
+				path: '/pages/coupon/active?id='+this.requestParam.id,
+			}
 		},
 		onShow() {
 			// 登录提示