|
|
|
@ -2,7 +2,8 @@ |
|
|
|
<!-- colto-section --> |
|
|
|
<footer class="footer" @click="toggleMenu($event,2)"> |
|
|
|
<div class="cszone"> |
|
|
|
<a href="javascript:void(0);" @click="scbox()"><img src="../assets/img/home/kefu.png"></a> |
|
|
|
<a href="javascript:void(0);" @click="scbox()"><img src="../assets/img/home/kefu.png"></a> |
|
|
|
<span class="circle-pulse1" v-if="newscount!==0">{{newscount>=100?'99+':newscount}}</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="content"> |
|
|
|
@ -280,6 +281,7 @@ |
|
|
|
import College from "@/api/college"; |
|
|
|
import ContactUs from "@/api/contactUs"; |
|
|
|
import Member from "@/api/member"; |
|
|
|
import Home from "@/api/home"; |
|
|
|
import { mapState } from "vuex"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
@ -356,7 +358,9 @@ export default { |
|
|
|
url: require("../assets/img/tw.jpg"), |
|
|
|
}, |
|
|
|
], |
|
|
|
showMenu: false |
|
|
|
showMenu: false, |
|
|
|
langer: '', |
|
|
|
newscount:0 |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -433,41 +437,54 @@ export default { |
|
|
|
.catch((err) => {}); |
|
|
|
}, |
|
|
|
scbox(e){ |
|
|
|
// under login |
|
|
|
if (this.isLogin) { |
|
|
|
// get user infomation |
|
|
|
let user_str = localStorage.getItem("auth"); |
|
|
|
if(user_str!=""){ |
|
|
|
let user = JSON.parse(user_str); |
|
|
|
// 查询对应的推荐人帐号 |
|
|
|
Member.getUnameByUid({user_id:user.referrer}).then(rfres=>{ |
|
|
|
// query referr uname |
|
|
|
this.ifurl ="https://sc.moabwalletss.com/chat/?toid="+rfres.username+"&room_id="+user.account+"&usid="+user.user_id; |
|
|
|
// show popup |
|
|
|
this.ispopup = ! this.ispopup |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
// |
|
|
|
console.log("login fisrt!!") |
|
|
|
this.$router.push({ path: '/sign-in' }); |
|
|
|
} |
|
|
|
// under login |
|
|
|
if (this.isLogin) { |
|
|
|
// get user infomation |
|
|
|
let user_str = localStorage.getItem("auth"); |
|
|
|
if(user_str!=""){ |
|
|
|
let user = JSON.parse(user_str); |
|
|
|
// 查询对应的推荐人帐号 |
|
|
|
Member.getUnameByUid({user_id:1}).then(rfres=>{ |
|
|
|
// query referr uname |
|
|
|
this.ifurl ="https://cs.moabwalletss.com/chat/?toid="+rfres.username+"&room_id="+user.account+"&usid="+user.user_id; |
|
|
|
// show popup |
|
|
|
this.ispopup = ! this.ispopup |
|
|
|
this.chatRead() |
|
|
|
}) |
|
|
|
} |
|
|
|
}else{ |
|
|
|
// |
|
|
|
this.$router.push({ path: '/sign-in' }); |
|
|
|
} |
|
|
|
}, |
|
|
|
// close |
|
|
|
closebox(){ |
|
|
|
if(this.ispopup){ |
|
|
|
this.ispopup = false |
|
|
|
} |
|
|
|
this.ispopup =false |
|
|
|
if(this.ispopup){ |
|
|
|
this.ispopup = false |
|
|
|
} |
|
|
|
this.ispopup =false |
|
|
|
}, |
|
|
|
chat(){ |
|
|
|
Home.chat().then(res => { |
|
|
|
this.newscount = res.count; |
|
|
|
}) |
|
|
|
}, |
|
|
|
chatRead(){ |
|
|
|
Home.chatRead().then(res => { |
|
|
|
console.log(res,'已读'); |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getCollegeLinks(); |
|
|
|
this.getServiceLink(); |
|
|
|
// console.log(this.service); |
|
|
|
this.getEmial(); |
|
|
|
if(this.isLogin){ |
|
|
|
this.chatcount = setInterval(()=>{ |
|
|
|
this.chat() |
|
|
|
},5000) |
|
|
|
} |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
@ -718,4 +735,18 @@ export default { |
|
|
|
display: none; |
|
|
|
} |
|
|
|
} |
|
|
|
.circle-pulse1 { |
|
|
|
background: red; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
min-width: 20px; |
|
|
|
height: 20px; |
|
|
|
font-size: 12px; |
|
|
|
border-radius: 50%; |
|
|
|
position: absolute; |
|
|
|
right: -20%; |
|
|
|
top: -10px; |
|
|
|
color: #fff; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|