|
@@ -6,14 +6,14 @@
|
|
|
<div class="mui-content margin49">
|
|
|
<ul class="mui-table-view vongi-news">
|
|
|
<li class="mui-table-view-cell mui-media">
|
|
|
- <a href="javascript:;">
|
|
|
+ <router-link :to="{name:'CommonNotice'}">
|
|
|
<img class="mui-media-object mui-pull-left" src="~$project/assets/img/bell1.png">
|
|
|
<div class="mui-media-body">
|
|
|
- <h3 class="flew-sp">通知公告<span class="mui-h6">09.20</span></h3>
|
|
|
- <p class='mui-ellipsis'>9月园区活动通知</p>
|
|
|
+ <h3 class="flew-sp">通知公告<span class="mui-h6" v-text="lastNotice.createTime"></span></h3>
|
|
|
+ <p class='mui-ellipsis' v-text="lastNotice.title"></p>
|
|
|
</div>
|
|
|
- <span class="mui-badge mui-badge-danger">5</span>
|
|
|
- </a>
|
|
|
+ <!-- <span class="mui-badge mui-badge-danger">5</span> -->
|
|
|
+ </router-link>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<ul class="mui-table-view vongi-news">
|
|
@@ -54,6 +54,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as API_Notice from '@/apis/Common/notice'
|
|
|
import Common from '$project/components/Common.vue'
|
|
|
import Loading from '$project/components/Loading.vue'
|
|
|
import TopHeader from '$project/components/TopHeader.vue'
|
|
@@ -75,12 +76,31 @@
|
|
|
pageTitle: '消息',
|
|
|
|
|
|
isLoading: false,
|
|
|
+
|
|
|
+ lastNotice: {}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ //获取最新一条通知消息
|
|
|
+ getLastNotice() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Notice.getNoticeList({
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ }).then(response => {
|
|
|
+ let data = response.data;
|
|
|
+ if (data.length > 0) {
|
|
|
+ this.lastNotice = data[0];
|
|
|
+ }
|
|
|
+ this.isLoading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
asynCallBack() {
|
|
|
//如果用户信息不存在则跳转到注册信息
|
|
|
if (!this.person_data) {
|
|
@@ -92,7 +112,8 @@
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
+ //获取最新一条通知消息
|
|
|
+ this.getLastNotice();
|
|
|
},
|
|
|
destroyed() {
|
|
|
|