Ver código fonte

接口联调

htc 13 horas atrás
pai
commit
c84b7765bb
3 arquivos alterados com 97 adições e 53 exclusões
  1. 12 2
      App.vue
  2. 2 2
      components/pages/nonprofitActivety/index.vue
  3. 83 49
      pagesHome/activityDetail.vue

+ 12 - 2
App.vue

@@ -4,8 +4,18 @@
 		onLaunch: function() {
 			console.log('App Launch')
 		},
-		onShow: function() {
-			console.log('App Show')
+		onShow: function(options) {
+			console.log('App Show')
+			//传递的参数 query
+			if (options.query) {
+				const shareADId = options.query.shareADId;
+				const shareUserId = options.query.shareUserId;
+				if(shareADId&&shareUserId) {
+					uni.reLaunch({
+						url: `/pagesHome/activityDetail?shareADId=${shareADId}&shareUserId=${shareUserId}`
+					});
+				}
+			}
 		},
 		onHide: function() {
 			console.log('App Hide')

+ 2 - 2
components/pages/nonprofitActivety/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="nonprofit-activety" @tap.self="handleDetail({})" v-if="item">
+	<view class="nonprofit-activety" @tap.self="handleDetail(item)" v-if="item">
 		<div class="na-top adf">
 			<div class="na-top-left">
 				<image :src="item.coverFile"></image>
@@ -52,7 +52,7 @@
 	
 	const handleDetail = item => {
 		uni.navigateTo({
-			url:'/pagesHome/activityDetail'
+			url:'/pagesHome/activityDetail?id='+item.id
 		})
 	}
 	

Diferenças do arquivo suprimidas por serem muito extensas
+ 83 - 49
pagesHome/activityDetail.vue