Commit 3ccc9839 authored by mengqr's avatar mengqr

修改

parent 405e37d5
...@@ -27,7 +27,7 @@ Vue.use(Router) ...@@ -27,7 +27,7 @@ Vue.use(Router)
const router = new Router({ const router = new Router({
routes:[ routes:[
{ {
path: '/', path: '/login',
name: 'index', name: 'index',
component: password, component: password,
meta: { meta: {
...@@ -86,7 +86,7 @@ const router = new Router({ ...@@ -86,7 +86,7 @@ const router = new Router({
}, },
{ {
path: '/list', path: '/',
name: 'list', name: 'list',
component: list, component: list,
......
...@@ -525,10 +525,10 @@ this.pten = false ...@@ -525,10 +525,10 @@ this.pten = false
}, },
//跳转登录页面 //跳转登录页面
jumpLogin(){ jumpLogin(){
if(this.ifSignFollow==true){
this.$router.push( this.$router.push(
{ {
path:'/', path:'/login',
query:{ query:{
lvrUbId:this.lvrUbId lvrUbId:this.lvrUbId
...@@ -536,12 +536,19 @@ this.pten = false ...@@ -536,12 +536,19 @@ this.pten = false
}); });
}else{
this.$router.push(
{
path:'/login'
});
}
}, },
//反回列表页页面 //反回列表页页面
backHome(){ backHome(){
this.$router.push( this.$router.push(
{ {
path:'/list', path:'/',
......
...@@ -478,7 +478,7 @@ export default { ...@@ -478,7 +478,7 @@ export default {
backHome(){ backHome(){
this.$router.push( this.$router.push(
{ {
path:'/list', path:'/',
...@@ -541,7 +541,7 @@ export default { ...@@ -541,7 +541,7 @@ export default {
this.$router.push( this.$router.push(
{ {
path:'/', path:'/login',
query:{ query:{
lvrUbId:this.lvrUbId lvrUbId:this.lvrUbId
......
...@@ -59,6 +59,8 @@ export default { ...@@ -59,6 +59,8 @@ export default {
this.getRecommendList() this.getRecommendList()
this.getList() this.getList()
this.getState() this.getState()
//判断是否有主播Id
this.ifUbId()
}, },
methods: { methods: {
...@@ -147,6 +149,37 @@ export default { ...@@ -147,6 +149,37 @@ export default {
this.visitorLog() 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(){ visitorLog(){
let temp=this.qs.stringify({ let temp=this.qs.stringify({
......
...@@ -60,7 +60,8 @@ export default { ...@@ -60,7 +60,8 @@ export default {
}, },
mounted() { mounted() {
//获取是否有主播id
this.getUbId()
}, },
methods: { methods: {
...@@ -220,6 +221,20 @@ export default { ...@@ -220,6 +221,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');
}
}
}, },
}; };
......
...@@ -308,7 +308,7 @@ export default { ...@@ -308,7 +308,7 @@ export default {
// this.getLive() // this.getLive()
this.$router.push( 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