Browse Source

feat: 新增 onShareAppMessage,启用页面转发功能

Developer 1 day ago
parent
commit
0d1c0d6a7d
1 changed files with 9 additions and 1 deletions
  1. 9 1
      pages/home.vue

+ 9 - 1
pages/home.vue

@@ -231,7 +231,7 @@
 			})
 		}
 	})
-	
+
 	onMounted(()=>{
 		if(uni.getStorageSync('userInfo')){
 			queryParams.value.userId = JSON.parse(uni.getStorageSync('userInfo'))?.id;
@@ -240,6 +240,14 @@
 		getTypeList()
 		getActivityList()
 	})
+
+	import { onShareAppMessage } from '@dcloudio/uni-app'
+	onShareAppMessage(() => {
+		return {
+			title: '善行少年 - 公益活动平台',
+			path: '/pages/home'
+		}
+	})
 </script>
 
 <style scoped lang="scss">