Browse Source

通知相关

wgl 4 năm trước cách đây
mục cha
commit
d2cef23938

+ 4 - 4
src/projects/business/views/Common/Notice/Info.vue

@@ -14,8 +14,7 @@
 			<div v-if="noticeList.length" class="vongi-notice-list">
 				<h3><img src="~$project/assets/img/text.png" width="12" />相关内容</h3>
 				<div class="vongi-floor-padded">
-					<router-link :to="{name:'CommonNoticeInfo',query:{id:item.messageId}}" v-for="(item,index) in noticeList" :key="index"
-					 class="mui-ellipsis" v-text="item.title"></router-link>
+					<a @click="getDetail(item.messageId)" v-for="(item,index) in noticeList" :key="index" class="mui-ellipsis" v-text="item.title"></a>
 				</div>
 			</div>
 		</div>
@@ -57,7 +56,8 @@
 		},
 		methods: {
 			//获取详情
-			getDetail() {
+			getDetail(id) {
+				var id = id || this.id;
 				this.isLoading = true;
 				API_Notice.getMessageInfo(this.id).then(response => {
 
@@ -100,7 +100,7 @@
 				openId: 'wx_openid',
 				token: 'token',
 			})
-		}
+		},
 	}
 </script>
 

+ 4 - 4
src/projects/pension/views/Common/Notice/Info.vue

@@ -14,8 +14,7 @@
 			<div v-if="noticeList.length" class="vongi-notice-list">
 				<h3><img src="~$project/assets/img/text.png" width="12" />相关内容</h3>
 				<div class="vongi-floor-padded">
-					<router-link :to="{name:'CommonNoticeInfo',query:{id:item.messageId}}" v-for="(item,index) in noticeList" :key="index"
-					 class="mui-ellipsis" v-text="item.title"></router-link>
+					<a @click="getDetail(item.messageId)" v-for="(item,index) in noticeList" :key="index" class="mui-ellipsis" v-text="item.title"></a>
 				</div>
 			</div>
 		</div>
@@ -57,7 +56,8 @@
 		},
 		methods: {
 			//获取详情
-			getDetail() {
+			getDetail(id) {
+				var id = id || this.id;
 				this.isLoading = true;
 				API_Notice.getMessageInfo(this.id).then(response => {
 
@@ -100,7 +100,7 @@
 				openId: 'wx_openid',
 				token: 'token',
 			})
-		}
+		},
 	}
 </script>