Pārlūkot izejas kodu

增加 消息页面

test
chenJinxu pirms 11 mēnešiem
vecāks
revīzija
d58fd3c249
2 mainītis faili ar 22 papildinājumiem un 6 dzēšanām
  1. +14
    -4
      src/views/Tabbar.vue
  2. +8
    -2
      src/views/myself/news/news.vue

+ 14
- 4
src/views/Tabbar.vue Parādīt failu

@@ -2,7 +2,7 @@
<template>
<div>
<!-- 头部导航 -->
<TopNavBar />
<TopNavBar @on-click-right="onClickNews" />
<!-- 页面 -->
<div class="tabbar-container">
<router-view />
@@ -22,14 +22,24 @@ export default {
},
created() {},
mounted() {},
methods: {}
methods: {
onClickNews() {
let currentRoute = this.$route.name;
this.$router.push({
name: 'news',
query: {
toRouter: currentRoute
}
});
}
}
};
</script>
<style>
.van-tabbar {
z-index: 999 !important;
}
.tabbar-container{
padding:100.06px 0px;
.tabbar-container {
padding: 100.06px 0px;
}
</style>

+ 8
- 2
src/views/myself/news/news.vue Parādīt failu

@@ -1,6 +1,7 @@
<template>
<div class="news">
<van-nav-bar title="消息通知" left-arrow @click-left="onNavBack" left-text="返回" />
<!-- <van-nav-bar title="消息通知" left-arrow @click-left="onNavBack" left-text="返回" /> -->
<NavBar title="消息通知" @on-click-left="onNavBack"> </NavBar>
<div class="list-con">
<van-list v-model="loading" :finished="finished" :immediate-check="false" @load="onLoad">
<div class="item">
@@ -33,7 +34,11 @@
import DialogService from '@/services/dialog-service';
import ToastService from '@/services/toast-service';
import APIUser from '@/api/user';
import NavBar from '@/components/NavBar';
export default {
components: {
NavBar
},
data() {
return {
personName: '',
@@ -50,7 +55,8 @@ export default {
onNavBack() {
// this.$router.go(-1);
// todo 此处不能修改为 go(-1);因为情景有:微信推送时进入该页面,此时点击返回就该路由至首页。
this.$router.push({ name: 'location' });

this.$router.push({ name: this.$route.query.toRouter || 'location' });
},
getData(begNumber, pageNumber, firstLoad) {
/* let url = "/api/Alarm/AlarmList";


Notiek ielāde…
Atcelt
Saglabāt