Browse Source

新增联系我们分享好友

LinWuTai 6 days ago
parent
commit
c1a6cefa59
1 changed files with 16 additions and 1 deletions
  1. 16 1
      pages/contactUs/contactUs.vue

+ 16 - 1
pages/contactUs/contactUs.vue

@@ -8,13 +8,28 @@
 
 <script setup>
 	import { ref } from 'vue'
-	import { onLoad } from '@dcloudio/uni-app'
+	import { onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
 	import { query } from '@/api/contactUs.js'
 	
 	const data = ref({
 		content: ''
 	})
 	
+	onShareAppMessage(async (res) => {
+		return {
+			title: '联系我们',
+			path: '/pages/contactUs/contactUs'
+		};
+	})
+	
+	onShareTimeline(async () => {
+		// console.log(imgurl.value)
+		return {
+			title: '联系我们',
+			query: ''
+		};
+	})
+	
 	onLoad(() => {
 		query().then(res => {
 			if (res && res.message === 'success') {