这次为登陆后会显示的几个主要页面
-
关注页面
<template>
<b-row>
<b-col cols="3">
<v-jianyouquan></v-jianyouquan>
</b-col>
<b-col cols="8">
<router-view></router-view>
</b-col>
</b-row>
</template>
<script>
import vJianyouquan from '../common/Jianyouquan'
import vTimeline from '../common/Timeline'
export default {
name: "Subscriptions",
components:{
vJianyouquan,
vTimeline
}
}
</script>
<style scoped>
</style>
<v-jianyouquan></v-jianyouquan>部分
<template>
<div class="main">
<ul>
<div class="guanzhu">全部关注
<router-link to="/subscriptions/guanzhu">
<a class="addguanzhu">
添加关注
</a>
</router-link>
</div>
<router-link to="/subscriptions/timeline">
<li class="beginhead">
<img src="https://cdn2.jianshu.io/assets/web/jianyouquan-2fb0cd72e35147c79d6507c3a3a2591b.png">简友圈
</li>
</router-link>
<li v-for="friends in friendList"><div class="l1"><img v-bind:src="friends.img">{{friends.title}}<a>{{friends.guanzhu}}</a></div></li>
</ul>
</div>
</template>
<script>
export default {
name: "jianyouquan",
data() {
return {
friendList:[
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
},
{
"img":"https://upload.jianshu.io/collections/images/16/computer_guy.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/120/h/120/format/webp",
"title":"程序员",
"guanzhu":88
}
]
}
}
}
</script>
<style scoped>
img {
width: 40px;
height: 40px;
border-radius: 5px;
}
li {
list-style-type: none;
height: 60px;
cursor: pointer;
margin-top: 5px;
}
li:hover {
background: gainsboro;
}
a {
margin-left: 100px;
text-decoration: none;
}
a:link {
color: black;
}
.addguanzhu {
margin-left: 5px;
cursor: pointer;
}
.addguanzhu:link {
color: black;
}
.beginhead {
border-top-style: solid;
border-top-color: gainsboro;
margin-bottom: -20px;
}
.guanzhu {
height: auto;
}
ul {
height: 550px;
width: 300px;
overflow-y: scroll;
}
.main {
margin-top: 50px;
}
</style>
-
消息页面
<template>
<div class="container">
<ul class="col-md-4">
<li>
<router-link to="/notifications/comments">
<div class="1">
<img src="../../../static/img/评论.png">
<a class="info">评论</a>
</div>
</router-link>
</li>
<router-link to="/notifications/jianxin">
<li>
<img src="../../../static/img/信息.png">
<a>简信</a>
</li>
</router-link>
<li>
<img src="../../../static/img/上传-互动.png">
<a>投稿请求</a>
</li>
<li>
<img src="../../../static/img/喜欢.png">
<a>喜欢和赞</a>
</li>
<li>
<img src="../../../static/img/已关注.png">
<a>关注</a>
</li>
<li>
<img src="../../../static/img/钱.png">
<a>赞赏和付费</a>
</li>
<li>
<img src="../../../static/img/更多.png">
<a>其它提醒</a>
</li>
</ul>
<div class="col-md-8">
<router-view>
</router-view>
</div>
</div>
</template>
<script>
export default {
name: "Notifications"
}
</script>
<style scoped>
.col-md-4 {
list-style-type: none;
float: left;
}
li {
cursor: pointer;
width: 263.2px;
height: 50.71px;
border-radius: 5px;
}
li:hover {
background: gainsboro;
}
.container {
margin-top: 50px;
display: inline-block;
}
a {
/*margin-left: 10px;*/
list-style-type: none;
}
a:hover {
text-decoration: none;
}
a:link {
color: black;
}
img {
margin-top: 10px;
}
.col-md-8 {
float: right;
}
</style>
二级路由
{
//消息组件
path: '/notifications',
component: resolve => require(['../components/page/Notifications.vue'], resolve),
meta: {title: '消息'},
children: [
{
path: '/notifications/comments',
component: Comments,
meta: {title: '收到的评论'}
},
{
path: '/notifications/jianxin',
component: Jianxin,
meta: {title: '简信'}
}
]
},