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 { html {
overflow-y: overlay; overflow-y: overlay;
height: 100%; height: 100%;

View File

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

View File

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

View File

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

View File

@ -181,6 +181,7 @@
} }
}, },
mounted() { mounted() {
// setInterval(()=>{
let userInfo = JSON.parse(sessionStorage.getItem("userInfo")); let userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
if (userInfo.user_id === sessionStorage.getItem("userId")) { if (userInfo.user_id === sessionStorage.getItem("userId")) {
this.isOwn = true this.isOwn = true
@ -198,7 +199,7 @@
user_id: r.personalInfo.user_id, user_id: r.personalInfo.user_id,
} }
}) })
// },1000)
}, },
methods: { methods: {
deleteLetter(id) { deleteLetter(id) {
@ -209,6 +210,27 @@
}).then(() => { }).then(() => {
this.$ajax.post("/hs/deleteLetter",{id:id},r=>{ this.$ajax.post("/hs/deleteLetter",{id:id},r=>{
if (r === 1) { 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({ this.$message({
type: 'success', type: 'success',
message: '删除成功' message: '删除成功'

View File

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