瀏覽代碼

分享跳转bug

lilei 4 年之前
父節點
當前提交
443c3f2ca3
共有 1 個文件被更改,包括 17 次插入0 次删除
  1. 17 0
      pages/webView/webView.vue

+ 17 - 0
pages/webView/webView.vue

@@ -13,6 +13,10 @@
 		},
 		onLoad(option) {
 			// console.log(option,'option')
+			uni.showToast({
+				icon:'none',
+				title: JSON.stringify(option)
+			})
 			this.src = option.src
 			// 开启分享
 			uni.showShareMenu({
@@ -22,6 +26,19 @@
 		},
 		methods: {
 			
+		},
+		onShareAppMessage(res){
+			return {
+				title:'',
+				path:'pages/webView/webView?src='+this.src
+			}
+		},
+		onShareTimeline(res){
+			return {
+				title:'',
+				path:'pages/webView/webView',
+				query:'src='+this.src
+			}
 		}
 	}
 </script>