|
|
|
@ -282,6 +282,7 @@ |
|
|
|
<script> |
|
|
|
import College from "@/api/college"; |
|
|
|
import ContactUs from "@/api/contactUs"; |
|
|
|
import Member from "@/api/member"; |
|
|
|
import { mapState } from "vuex"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
@ -443,14 +444,21 @@ export default { |
|
|
|
if (this.isLogin) { |
|
|
|
// get user infomation |
|
|
|
let user_str = localStorage.getItem("auth"); |
|
|
|
let user = JSON.parse(user_str); |
|
|
|
this.ifurl ="https://cs.btcaholic.com/chat/?toid="+user.referrer+"&room_id="+user.account; |
|
|
|
// show popup |
|
|
|
this.ispopup = ! this.ispopup |
|
|
|
if(user_str!=""){ |
|
|
|
let user = JSON.parse(user_str); |
|
|
|
// 查询对应的推荐人帐号 |
|
|
|
Member.getUnameByUid({user_id:user.referrer}).then(rfres=>{ |
|
|
|
// query referr uname |
|
|
|
this.ifurl ="https://cs.btcaholic.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' }); |
|
|
|
} |
|
|
|
|
|
|
|
|