Commit 3ccc9839 authored by mengqr's avatar mengqr

修改

parent 405e37d5
......@@ -27,7 +27,7 @@ Vue.use(Router)
const router = new Router({
routes:[
{
path: '/',
path: '/login',
name: 'index',
component: password,
meta: {
......@@ -86,7 +86,7 @@ const router = new Router({
},
{
path: '/list',
path: '/',
name: 'list',
component: list,
......
......@@ -525,10 +525,10 @@ this.pten = false
},
//跳转登录页面
jumpLogin(){
if(this.ifSignFollow==true){
this.$router.push(
{
path:'/',
path:'/login',
query:{
lvrUbId:this.lvrUbId
......@@ -536,12 +536,19 @@ this.pten = false
});
}else{
this.$router.push(
{
path:'/login'
});
}
},
//反回列表页页面
backHome(){
this.$router.push(
{
path:'/list',
path:'/',
......
......@@ -478,7 +478,7 @@ export default {
backHome(){
this.$router.push(
{
path:'/list',
path:'/',
......@@ -541,7 +541,7 @@ export default {
this.$router.push(
{
path:'/',
path:'/login',
query:{
lvrUbId:this.lvrUbId
......
......@@ -59,6 +59,8 @@ export default {
this.getRecommendList()
this.getList()
this.getState()
//判断是否有主播Id
this.ifUbId()
},
methods: {
......@@ -147,6 +149,37 @@ export default {
this.visitorLog()
}
},
//判断是否有主播Id
ifUbId(){
let data = sessionStorage.getItem('ifLvrUbId');
let token=sessionStorage.getItem("token")
let img=sessionStorage.getItem("isReg")
if(token&&img){
if(data){
console.log("有主播Id")
let temp=this.qs.stringify({
pmAppVersion:'884',
pmModel:'iPhone 12/13 (Pro)',
pmSystem:'iOS 10.0.1',
pmMac:'1',
pmIp:1,
lvrUbId:data,
applicationType:4,
type:2,
pmOperator:'无运营商'
})
this.server.live.follow(temp).then(res=>{
})
}else{
console.log("没有主播Id")
}
}
},
//游客登录
visitorLog(){
let temp=this.qs.stringify({
......
......@@ -60,7 +60,8 @@ export default {
},
mounted() {
//获取是否有主播id
this.getUbId()
},
methods: {
......@@ -221,6 +222,20 @@ export default {
},
//获取主播id以及判断是否微信登录
getUbId(){
console.log("主播id",this.$route.query.lvrUbId)
if(this.$route.query.lvrUbId){
window.sessionStorage.setItem('ifLvrUbId', this.$route.query.lvrUbId);//token
let data = sessionStorage.getItem('ifLvrUbId');
console.log("haha真是哈哈",data)
}else{
console.log("阿斯蒂芬")
sessionStorage.removeItem('ifLvrUbId');
}
}
},
};
</script>
......
......@@ -308,7 +308,7 @@ export default {
// this.getLive()
this.$router.push(
{
path:'/list',
path:'/',
});
......
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