This commit is contained in:
裴浩宇 2020-04-15 10:05:21 +08:00
parent 23ca05e0a8
commit b822927b21
6 changed files with 51 additions and 24 deletions

View File

@ -1,3 +1,6 @@
*{
user-select: none;
}
html {
overflow-y: overlay;
height: 100%;

View File

@ -65,7 +65,7 @@
<span>等级:</span>
<div class="number">
<span>博客</span>
<span>2</span>
<span>{{Math.floor(all.integral/1000)+1}}</span>
</div>
</div>
<div class="integral">

View File

@ -274,7 +274,7 @@
cursor: pointer;
}
.merit-student .one div:nth-child(2){
flex: 2;
flex: 3;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -297,7 +297,7 @@
cursor: pointer;
}
.prominent-teacher .one div:nth-child(2){
flex: 2;
flex: 3;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@ -353,7 +353,7 @@
flex: 1;
}
.one .release-time{
flex: 1.5;
flex: 1.6;
}
.module{
border: 1px solid #419EFF;

View File

@ -74,6 +74,8 @@
goPersonalInfo(userId) {
this.$router.push({name: 'personalinfo'});
sessionStorage.setItem("userId",userId);
setTimeout(()=>{location.reload()},100)
},
goMore() {
this.$message({

View File

@ -181,24 +181,25 @@
}
},
mounted() {
let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
if (userInfo.user_id === sessionStorage.getItem("userId")) {
this.isOwn = true
} else {
this.isOwn = false
}
this.$ajax.post("/hs/getPersonalInfo",{text:"",releaseId: sessionStorage.getItem("userId")},r=>{
this.list = r.personalList;
this.length = r.personalList.length;
this.all = {
real_name: r.personalInfo.real_name,
header_photo: r.personalInfo.real_name.substring(0, 1),
integral: r.personalInfo.integral,
letter_number: r.personalInfo.letter_number,
user_id: r.personalInfo.user_id,
// setInterval(()=>{
let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
if (userInfo.user_id === sessionStorage.getItem("userId")) {
this.isOwn = true
} else {
this.isOwn = false
}
})
this.$ajax.post("/hs/getPersonalInfo",{text:"",releaseId: sessionStorage.getItem("userId")},r=>{
this.list = r.personalList;
this.length = r.personalList.length;
this.all = {
real_name: r.personalInfo.real_name,
header_photo: r.personalInfo.real_name.substring(0, 1),
integral: r.personalInfo.integral,
letter_number: r.personalInfo.letter_number,
user_id: r.personalInfo.user_id,
}
})
// },1000)
},
methods: {
deleteLetter(id) {
@ -209,6 +210,27 @@
}).then(() => {
this.$ajax.post("/hs/deleteLetter",{id:id},r=>{
if (r === 1) {
let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
this.$ajax.post("/hs/getPersonalPrivateLetter",{userId:userInfo.user_id},res=>{
this.privateLetterList = res
if (res.length === 0) {
this.unreadIsNull = true;
this.alreadyReadIsNull = true;
}
for (let i = 0; i < res.length; i++) {
debugger
if (res[i].already_read === "0") {
this.unreadIsNull = false
} else {
this.unreadIsNull = true
}
if (res[i].already_read === "1") {
this.alreadyReadIsNull = false
} else {
this.unreadIsNull = true
}
}
})
this.$message({
type: 'success',
message: '删除成功'

View File

@ -6,15 +6,15 @@ Vue.use(Router)
export default new Router({
routes: [{
path: '/login',
path: '/',
name: 'login',
component:() => import('@/components/Login')
},
{
path:'/',
path:'/index',
name:'index',
component:() => import('@/components/Index'),
redirect: '/homepage',
// redirect: '/homepage',
children: [
{
path:'help',