Commit cd087891 by yanju

修复细节 个人中心

parent e78ef7be
...@@ -42,7 +42,7 @@ export default { ...@@ -42,7 +42,7 @@ export default {
}, },
created(){ created(){
this.$axios.$get(config.api.get.Message.list,{params:{page:1, this.$axios.$get(config.api.get.Message.list,{params:{page:1,
size:7 size:4
}}).then((response)=>{ }}).then((response)=>{
/* console.log(response); /* console.log(response);
let message1 = []; let message1 = [];
...@@ -64,6 +64,8 @@ export default { ...@@ -64,6 +64,8 @@ export default {
} }
}, },
methods:{ methods:{
handleRead(){ handleRead(){
this.$axios.$put(config.api.put.Message.readAll).then((response)=>{ this.$axios.$put(config.api.put.Message.readAll).then((response)=>{
if(this.message.length!==0) { if(this.message.length!==0) {
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
</div> </div>
<div class="label-box"> <div class="label-box">
<p v-for="(val,index) in tags" :key="val.tagId">{{val.tagName}}</p> <p v-for="(val,index) in tags" :key="val.tagId">{{val.tagName}}</p>
<p v-if="isMy&&status===0" class="label-box__pass">正常</p>
<p v-if="isMy&&status===-1" class="label-box__zero">被锁定</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -82,7 +83,7 @@ ...@@ -82,7 +83,7 @@
userNick:'', userNick:'',
viewNumber:'', viewNumber:'',
showCard:true, showCard:true,
status:0
} }
}, },
created(){ created(){
...@@ -102,6 +103,7 @@ ...@@ -102,6 +103,7 @@
this.tags = info.tags; this.tags = info.tags;
this.userNick = info.userNick; this.userNick = info.userNick;
this.viewNumber = info.viewNumber; this.viewNumber = info.viewNumber;
this.status = info.status;
} }
if(this.info.itemId){ if(this.info.itemId){
this.questionTitle = info.title; this.questionTitle = info.title;
...@@ -299,6 +301,18 @@ ...@@ -299,6 +301,18 @@
} }
> .label-box{ > .label-box{
margin-left:32*$length; margin-left:32*$length;
.label-box__err{
color:#fff;
background-color: #f11818;
}
.label-box__zero{
color:#fff;
background-color: #ff780091;
}
.label-box__pass{
color:#fff;
background-color: #11ef1fb0;
}
> p{ > p{
display: inline-block; display: inline-block;
margin-right:10*$length; margin-right:10*$length;
......
<template> <template>
<div class="error-card-notfound"> <div class="error-card-notfound">
<div class="not-found"> <div class="not-found">
<img src="../../assets/svg/four.jpg" alt=""> <div class="box-404">
<img src="../../assets/svg/zero.jpg" alt=""> <img src="../../assets/svg/404.png" alt="">
<img class="rotating" src="../../assets/svg/four.jpg" alt=""> </div>
<p class="not-found-content">加载失败,请重新尝试</p> <p class="not-found-content">加载失败,请重新尝试</p>
<button class="reload" @click="reload">刷新页面</button> <button class="reload" @click="reload">返回首页</button>
</div> </div>
</div> </div>
</template> </template>
...@@ -15,7 +16,7 @@ export default { ...@@ -15,7 +16,7 @@ export default {
name: "errorCard", name: "errorCard",
methods:{ methods:{
reload(){ reload(){
location.reload() this.$router.replace('/')
} }
} }
} }
...@@ -25,13 +26,23 @@ export default { ...@@ -25,13 +26,23 @@ export default {
.error-card-notfound{ .error-card-notfound{
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: #fff; background-image: $bgImage;
margin: 0 auto; margin: 0 auto;
@extend %flex-row-center;
.not-found{ .not-found{
text-align: center; text-align: center;
img{ .box-404{
display: inline-block; width:442*$length;
height:200*$length;
margin:0 auto;
@extend %flex-row-center;
img{
width:442*$length;
height:auto;
}
} }
.rotating{ .rotating{
transform: rotate(25deg); transform: rotate(25deg);
margin-top: 25*$length; margin-top: 25*$length;
...@@ -39,7 +50,7 @@ export default { ...@@ -39,7 +50,7 @@ export default {
.not-found-content{ .not-found-content{
padding-top: 20*$length; padding-top: 20*$length;
padding-bottom: 47*$length; padding-bottom: 47*$length;
@include fontStyle(16,22,500,#333,center); @include fontStyle(16,22,500,#666,center);
} }
.reload{ .reload{
display: block; display: block;
......
...@@ -171,6 +171,11 @@ ...@@ -171,6 +171,11 @@
AlertsCard AlertsCard
}, },
validate ({ params }) {
// Must be a number
return /^\d+$/.test(params.id)
},
created(){ created(){
this.route = this.$route.name; this.route = this.$route.name;
this.progressShow = true; this.progressShow = true;
...@@ -183,6 +188,11 @@ ...@@ -183,6 +188,11 @@
this.detailType = type; this.detailType = type;
}); });
this.changeHeader(); this.changeHeader();
if(!this.$store.state.userProfile.userId){
if(this.$route.path.indexOf('personal-center') !== -1||this.$route.path.indexOf('release') !== -1){
this.$router.replace('/')
}
}
}, },
watch:{ watch:{
$route(route){ $route(route){
...@@ -192,6 +202,11 @@ ...@@ -192,6 +202,11 @@
setTimeout(()=>{ setTimeout(()=>{
this.progressShow = false; this.progressShow = false;
},900) },900)
if(!this.$store.state.userProfile.userId){
if(this.$route.path.indexOf('personal-center') !== -1||this.$route.path.indexOf('release') !== -1){
this.$router.replace('/')
}
}
} }
}, },
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
</div> </div>
<div class="label-box" v-if="cardType===1"> <div class="label-box" v-if="cardType===1">
<p v-for="(val,index) in cardTags" :key="val.tagId">{{val.tagName}}</p> <p v-for="(val,index) in cardTags" :key="val.tagId">{{val.tagName}}</p>
<p v-if="isMy&&status===-1" class="label-box__err">被锁定</p>
<p v-if="isMy&&status===0" class="label-box__zero">待审核</p>
<p v-if="isMy&&status===1" class="label-box__pass">审核通过</p>
</div> </div>
</div> </div>
...@@ -44,6 +47,8 @@ ...@@ -44,6 +47,8 @@
</div> </div>
<div class="label-box" v-if="cardType===2"> <div class="label-box" v-if="cardType===2">
<p v-for="(val,index) in cardTags" :key="val.tagId">{{val.tagName}}</p> <p v-for="(val,index) in cardTags" :key="val.tagId">{{val.tagName}}</p>
<p v-if="isMy&&status===0" class="label-box__pass">正常</p>
<p v-if="isMy&&status===-1" class="label-box__zero">被锁定</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -104,7 +109,7 @@ ...@@ -104,7 +109,7 @@
cardTags:[], cardTags:[],
cardTime:'', cardTime:'',
cardUser:'', cardUser:'',
status:0,
cardStar:'', cardStar:'',
cardLike:'', cardLike:'',
cardView:'', cardView:'',
...@@ -114,6 +119,25 @@ ...@@ -114,6 +119,25 @@
this.dateGet2Info(); this.dateGet2Info();
}, },
computed:{
cardState(){
if(this.status===0){
if(this.cardType===1){
return '待审核'
}
if(this.cardType===2){
}
}
if(this.status===1){
}
if(this.status===-1){
}
}
},
methods:{ methods:{
dateGet2Info(){ dateGet2Info(){
let info = this.info; let info = this.info;
...@@ -127,6 +151,8 @@ ...@@ -127,6 +151,8 @@
this.cardView = info.viewNumber; this.cardView = info.viewNumber;
this.cardUser = info.userNick; this.cardUser = info.userNick;
this.cardType = 2; this.cardType = 2;
this.status = info.status;
} }
if(this.info.projectId){ if(this.info.projectId){
this.cardName = info.projectName; this.cardName = info.projectName;
...@@ -139,6 +165,8 @@ ...@@ -139,6 +165,8 @@
this.cardTime = dateConvert(info.createTime); this.cardTime = dateConvert(info.createTime);
this.cardUser = info.author; this.cardUser = info.author;
this.cardType = 1; this.cardType = 1;
this.status = info.status;
} }
if(this.info.contentId){ if(this.info.contentId){
this.cardName = info.title; this.cardName = info.title;
...@@ -291,6 +319,8 @@ ...@@ -291,6 +319,8 @@
margin-left:5*$length; margin-left:5*$length;
@extend %flex-row-spb; @extend %flex-row-spb;
justify-content: flex-start; justify-content: flex-start;
> p{ > p{
margin-bottom: 8*$length; margin-bottom: 8*$length;
margin-right:10*$length; margin-right:10*$length;
...@@ -305,6 +335,20 @@ ...@@ -305,6 +335,20 @@
color:rgba(0,170,230,1); color:rgba(0,170,230,1);
} }
} }
.label-box__err{
color:#fff;
background-color: #f11818;
}
.label-box__zero{
color:#fff;
background-color: #ff780091;
}
.label-box__pass{
color:#fff;
background-color: #11ef1fb0;
}
} }
} }
...@@ -354,6 +398,7 @@ ...@@ -354,6 +398,7 @@
flex-wrap:wrap; flex-wrap:wrap;
@extend %flex-row-spb; @extend %flex-row-spb;
justify-content: flex-start; justify-content: flex-start;
> p{ > p{
margin-bottom: 8*$length; margin-bottom: 8*$length;
margin-right:10*$length; margin-right:10*$length;
...@@ -368,6 +413,18 @@ ...@@ -368,6 +413,18 @@
color:rgba(0,170,230,1); color:rgba(0,170,230,1);
} }
} }
.label-box__err{
color:#fff;
background-color: #f11818;
}
.label-box__zero{
color:#fff;
background-color: #ff780091;
}
.label-box__pass{
color:#fff;
background-color: #11ef1fb0;
}
} }
} }
} }
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
<div class="header-r"> <div class="header-r">
<yun-icon v-if="userId===$store.state.userProfile.userId" name="down_arrow" size="6px" color="#999" @click.native.stop="clickToShowDrop"></yun-icon> <yun-icon v-if="userId===$store.state.userProfile.userId" name="down_arrow" size="6px" color="#999" @click.native.stop="clickToShowDrop"></yun-icon>
<p v-if="isMy&&status===-1" class="label-box__pass">正常</p>
<p v-if="isMy&&status===-1" class="label-box__zero">被锁定</p>
<dropdown v-if="showDrop"> <dropdown v-if="showDrop">
<li @click="dateDeleteCard(postId)" ref="deleteButton">删除</li> <li @click="dateDeleteCard(postId)" ref="deleteButton">删除</li>
</dropdown> </dropdown>
...@@ -125,6 +127,10 @@ ...@@ -125,6 +127,10 @@
pageType:{ pageType:{
type:String, type:String,
default:'' default:''
},
isMy:{
type:Boolean,
default:false
} }
}, },
...@@ -155,6 +161,7 @@ ...@@ -155,6 +161,7 @@
followedAuthor:false, followedAuthor:false,
followLoading:false, followLoading:false,
showCommentCon:false, showCommentCon:false,
status:0,
} }
}, },
...@@ -272,6 +279,7 @@ ...@@ -272,6 +279,7 @@
this.userAvatar = info.userAvatar; this.userAvatar = info.userAvatar;
this.followedAuthor = info.followedAuthor; this.followedAuthor = info.followedAuthor;
this.commentNumber = info.commentNumber; this.commentNumber = info.commentNumber;
this.status = info.status;
} }
}, },
dateDeleteCard(id){ dateDeleteCard(id){
...@@ -399,6 +407,32 @@ ...@@ -399,6 +407,32 @@
} }
.header-r{ .header-r{
position:relative; position:relative;
.label-box__err{
color:#fff;
background-color: #f11818;
}
.label-box__zero{
color:#fff;
background-color: #ff780091;
}
.label-box__pass{
color:#fff;
background-color: #11ef1fb0;
}
> p{
position: absolute;
width:30px;
top:3px;
right:30*$length;
display: inline-block;
margin-right:10*$length;
padding:2*$length 8*$length;
background-color: #F4F8FA;
@include border-radius(2*$length);
@include fontStyle(12,16,500,#999,center);
@extend %animate-transition;
@extend %cursorPointer;
}
} }
} }
......
...@@ -17,6 +17,10 @@ export default { ...@@ -17,6 +17,10 @@ export default {
components: { components: {
ErrorCard ErrorCard
}, },
created() {
},
methods:{ methods:{
close(){ close(){
window.opener = null; window.opener = null;
...@@ -29,11 +33,15 @@ export default { ...@@ -29,11 +33,15 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.error-card__wrap{ .error-card__wrap{
position: fixed; position: fixed;
top: 50%; top: 0;
transform: translateY(-55%); bottom:0;
width: 100%; width: 100%;
text-align: center; text-align: center;
@extend %flex-row-center;
background-image: $bgImage;
.error-card{ .error-card{
margin: 0 auto; margin: 0 auto;
img{ img{
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<card-container <card-container
title="以发布的问题" title="以发布的问题"
width="302px" width="302px"
height="270px" style="padding-bottom: 20px"
> >
<div class="answer-release_List" v-for="val in questionList" :key="val.questionId" :info="val"> <div class="answer-release_List" v-for="val in questionList" :key="val.questionId" :info="val">
<div class="answer-box" @click="toDetail(val.questionId)"> <div class="answer-box" @click="toDetail(val.questionId)">
<p>{{val.questionTitle}}</p> <p class="answer-box__title">{{val.questionTitle}}</p>
<p style="color: #999">{{val.category}}</p> <p class="answer-box__type" style="color: #999">{{val.category}}</p>
</div> </div>
</div> </div>
</card-container> </card-container>
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
width="302px" width="302px"
height="400px" height="400px"
style="margin-top: 16px" style="margin-top: 16px"
v-if="false"
></card-container> ></card-container>
</div> </div>
<div class="answer-release-container__r"> <div class="answer-release-container__r">
...@@ -371,9 +372,15 @@ ...@@ -371,9 +372,15 @@
@extend %flex-row-spb; @extend %flex-row-spb;
@extend %cursorPointer; @extend %cursorPointer;
.answer-box__title { .answer-box__title {
width: 60%; width: 70%;
@extend %nowrap; @extend %nowrap;
} }
.answer-box__type{
width: 30%;
@extend %nowrap;
@include fontStyle(13, 17, 500, #999, right);
}
&:hover { &:hover {
color: #00AAE6; color: #00AAE6;
} }
......
...@@ -151,7 +151,6 @@ export default { ...@@ -151,7 +151,6 @@ export default {
}; };
this.$axios.$get(config.api.get.User.hotBloggers,{params:params}) this.$axios.$get(config.api.get.User.hotBloggers,{params:params})
.then((response)=>{ .then((response)=>{
console.log(response);
this.hotBloggerList = response.data.dataList; this.hotBloggerList = response.data.dataList;
}); });
}, },
......
...@@ -4,16 +4,17 @@ ...@@ -4,16 +4,17 @@
<card-container <card-container
title="已发布的博客" title="已发布的博客"
width="302px" width="302px"
height="400px" style="padding-bottom: 10px"
> >
<div class="blog-release_List" v-for="val in blogList" :key="val.blogId" :info="val"> <div class="blog-release_List" v-for="val in blogList" :key="val.blogId" :info="val">
<div class="blog-box" @click="toDetail(val.blogId)"> <div class="blog-box" @click="toDetail(val.blogId)">
<p>{{val.blogTitle}}</p> <p class="blog-box__title">{{val.blogTitle}}</p>
<p style="color: #999">{{val.category}}</p> <p class="blog-box__type" style="color: #999">{{val.category}}</p>
</div> </div>
</div> </div>
</card-container> </card-container>
<card-container <card-container
v-if="false"
title="博客草稿箱" title="博客草稿箱"
width="302px" width="302px"
height="400px" height="400px"
...@@ -518,8 +519,14 @@ export default { ...@@ -518,8 +519,14 @@ export default {
@extend %cursorPointer; @extend %cursorPointer;
.blog-box__title { .blog-box__title {
width: 60%; width: 70%;
@extend %nowrap;
}
.blog-box__type{
width: 30%;
@extend %nowrap; @extend %nowrap;
@include fontStyle(13, 17, 500, #999, right);
} }
&:hover { &:hover {
......
<template> <template>
<div> <div>
<release-card style="margin-top: 16px" @listenReleaseState="dataGetDynamic(1)"></release-card> <release-card style="margin-top: 16px" @listenReleaseState="dataGetDynamic(1)"></release-card>
<social-card pageType="my" @listenSocialCardState="dataGetDynamic(1)" v-for="(val,index) in rightList" :key="val.postId" :info="val"></social-card> <social-card :isMy="true" @listenSocialCardState="dataGetDynamic(1)" v-for="(val,index) in rightList" :key="val.postId" :info="val"></social-card>
<pagination key="container5" style="margin:20px auto;" :pages="pages" v-on:listenPageChange="changePage"></pagination> <pagination key="container5" style="margin:20px auto;" :pages="pages" v-on:listenPageChange="changePage"></pagination>
</div> </div>
</template> </template>
......
...@@ -15,29 +15,29 @@ ...@@ -15,29 +15,29 @@
<p class="line" v-if="selected==='全部'"></p> <p class="line" v-if="selected==='全部'"></p>
</div> </div>
<div class="left__item"> <!-- <div class="left__item">-->
<p class="abs"></p> <!-- <p class="abs"></p>-->
<p class="word">评论</p> <!-- <p class="word">评论</p>-->
<p class="line" v-if="selected==='评论'"></p> <!-- <p class="line" v-if="selected==='评论'"></p>-->
</div> <!-- </div>-->
<div class="left__item"> <!-- <div class="left__item">-->
<p class="abs"></p> <!-- <p class="abs"></p>-->
<p class="word">喜欢</p> <!-- <p class="word">喜欢</p>-->
<p class="line" v-if="selected==='评论'"></p> <!-- <p class="line" v-if="selected==='评论'"></p>-->
</div> <!-- </div>-->
<div class="left__item"> <!-- <div class="left__item">-->
<p class="abs"></p> <!-- <p class="abs"></p>-->
<p class="word">粉丝</p> <!-- <p class="word">粉丝</p>-->
<p class="line" v-if="selected==='评论'"></p> <!-- <p class="line" v-if="selected==='评论'"></p>-->
</div> <!-- </div>-->
<div class="left__item"> <!-- <div class="left__item">-->
<p class="abs"></p> <!-- <p class="abs"></p>-->
<p class="word">公告</p> <!-- <p class="word">公告</p>-->
<p class="line" v-if="selected==='评论'"></p> <!-- <p class="line" v-if="selected==='评论'"></p>-->
</div> <!-- </div>-->
</div> </div>
<p class="tab__right"> <p class="tab__right">
全部标记为已读 全部标记为已读
...@@ -59,10 +59,11 @@ ...@@ -59,10 +59,11 @@
import NoticeCard from '../../components/pc/noticeCard'; import NoticeCard from '../../components/pc/noticeCard';
import NavWrap from "../../components/pc/nav/navWrap"; import NavWrap from "../../components/pc/nav/navWrap";
import config from "../../action/config";
export default { export default {
data(){ data() {
return{ return {
list: [ list: [
{ {
label: '我的消息', label: '我的消息',
...@@ -70,45 +71,91 @@ ...@@ -70,45 +71,91 @@
id: '我的消息' id: '我的消息'
} }
], ],
selected:'全部' selected: '全部'
} }
}, },
components:{ components: {
NoticeCard,NavWrap NoticeCard, NavWrap
}, },
created() {
this.dataGetMessages()
},
methods:{ methods: {
showAlert(){ dataGetMessages() {
this.$axios.$get(config.api.get.Message.list, {
// $alert 使用方法 params: {
this.$alert('确认清空消息列表?', '', { page: 1,
confirmButtonText: '确定', size: 7
// callback: action => { }
// this.$message({ }).then((response) => {
// type: 'info', this.message = response.data.dataList;
// message: `action: ${ action }`, console.log(response.data.dataList);
// confirmButtonPosition: 'left',
// });
// }
}); });
}
}, },
dataPutRead() {
this.$axios.$put(config.api.put.Message.read).then((response) => {
if (this.message.length !== 0) {
this.$message({
type: 'success',
message: '已全部标记已读'
});
this.flag = 4
} else {
this.$message({
type: 'warning',
message: '没有未读信息'
});
}
})
},
dataPutReadAll() {
this.$axios.$put(config.api.put.Message.readAll).then((response) => {
if (this.message.length !== 0) {
this.$message({
type: 'success',
message: '已全部标记已读'
});
this.flag = 4
} else {
this.$message({
type: 'warning',
message: '没有未读信息'
});
}
})
},
dataDeleteMessage() {
this.$axios.$delete(config.api.delete.Messages.delete).then((response) => {
this.$message({
type: 'success',
message: '已全部清空'
});
this.message.length = 0;
})
mounted(){ },
// this.$popupbox();
// message 使用方法
// this.$message({ mounted() {
// message:'hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello', // this.$popupbox();
// type:'info'
// })
// message 使用方法
// this.$message({
// message:'hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello',
// type:'info'
// })
}
} }
} }
</script> </script>
......
...@@ -4,16 +4,17 @@ ...@@ -4,16 +4,17 @@
<card-container <card-container
title="已发布项目" title="已发布项目"
width="302px" width="302px"
height="400px" style="padding-bottom: 10px"
> >
<div class="project-release_List" v-for="val in projectList" :key="val.projectId" :info="val"> <div class="project-release_List" v-for="val in projectList" :key="val.projectId" :info="val">
<div class="project-box" @click="toDetail(val.projectId)"> <div class="project-box" @click="toDetail(val.projectId)">
<p>{{val.projectName}}</p> <p class="project-box__title">{{val.projectName}}</p>
<p style="color: #999">{{val.category}}</p> <p class="project-box__type" style="color: #999">{{val.category}}</p>
</div> </div>
</div> </div>
</card-container> </card-container>
<card-container <card-container
v-if="false"
title="项目草稿箱" title="项目草稿箱"
width="302px" width="302px"
height="400px" height="400px"
...@@ -513,8 +514,14 @@ export default { ...@@ -513,8 +514,14 @@ export default {
@extend %flex-row-spb; @extend %flex-row-spb;
@extend %cursorPointer; @extend %cursorPointer;
.project-box__title { .project-box__title {
width: 60%; width: 70%;
@extend %nowrap;
}
.project-box__type{
width: 30%;
@extend %nowrap; @extend %nowrap;
@include fontStyle(13, 17, 500, #999, right);
} }
&:hover { &:hover {
color: #00AAE6; color: #00AAE6;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment