Commit 94ba4008 authored by zhangyanni's avatar zhangyanni

直播h5

parent 8c125f7c
......@@ -3,9 +3,9 @@
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<script src='https://cnstatic01.e.vhall.com/static/js/iframeSolu.js'></script>
</head>
<body style="height:100%;margin: 0;">
<body style="height:100%;margin: 0;" class="iframeBody" onload="loadFunc()">
<!--<iframe border="0" src="https://live.vhall.com/528253505" style="width: 100%;height: calc(100vh - 3rem);"></iframe>-->
<iframe allow="camera *;microphone *;" name="vcallIframe" id="vcallIframe" src="https://live4.vhall.com/webinar/inituser/528253505" allowfullscreen="true" style="width: 100%;height: calc(100vh - 3rem);border: medium none;"></iframe>
<!--<iframe allow="camera *;microphone *;" name="vcallIframe" id="vcallIframe" src="https://live4.vhall.com/webinar/inituser/528253505" allowfullscreen="true" style="width: 100%;height: calc(100vh - 3rem);border: medium none;"></iframe>-->
</body>
<script>
//获取cookie
......@@ -22,7 +22,18 @@
}
}
return ""
};
function loadFunc(){
setTimeout(function(){
var body = document.getElementsByTagName("body");
var div = document.createElement("div");
div.innerHTML = '<iframe allow="camera *;microphone *;" name="vcallIframe" id="vcallIframe" allowfullscreen="true" style="width: 100%;height: calc(100vh - 3rem);border: medium none;"></iframe>';
document.body.appendChild(div);
document.getElementById("vcallIframe").src =getCookie("liveUrl").replace("https://live.vhall.com","https://live4.vhall.com")+"?email="+window.sessionStorage.getItem("liveEmail")+"&name="+window.sessionStorage.getItem("liveName");
},100)
}
document.getElementsByTagName("iframe")[0].src =getCookie("liveUrl").replace("https://live.vhall.com","https://live4.vhall.com")+"?email="+getCookie("liveEmail")+"&name="+getCookie("liveName");
</script>
\ No newline at end of file
......@@ -91,6 +91,7 @@
import commonApi from '../../../common/commonApi';
import applyLoginCmpt from '../../../components/mobile/applyLogin';
import itegralCmpt from '../../../components/mobile/getIntegral';
import personApi from '../personaluser/api/api';
export default {
name: "detail",
......@@ -155,10 +156,29 @@
},
//获取用户昵称
getNickName() {
let params = {
empId: this.userInfo.empId,
};
personApi.selectByEmpId(params).then(res => {
if (res.code == 0) {
var email = this.userInfo.empAccount.indexOf("@") > -1 ? this.userInfo.empAccount : this.userInfo.empAccount + "@techcode.com";
sessionStorage.setItem("liveEmail", email);
sessionStorage.setItem("liveName", res.result.nickName);
} else {
console.log(res.msg);
}
}).catch(err => {
console.log(err)
})
},
//是否显示登录
isShowLoginDialogFunc(data, data1) {
this.isLogin = data;
this.userInfo = this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null;
if(this.userInfo) this.getNickName();
this.getDetailInfo();
},
......
......@@ -56,7 +56,7 @@
<span>{{item.channelCityStr}}</span></p>
<p class="activityBtn"
v-if="((userInfo&&userInfo.empId!=item.createdBy)||!userInfo)&&item.channelType!=5">
<span @click.native="handleToDetail(item)" v-if="item.channelLabel">{{item.channelLabel.split(",")[0]}}</span>
<span @click="handleToDetail(item)" v-if="item.channelLabel">{{item.channelLabel.split(",")[0]}}</span>
<el-button size="mini" plain type="primary" @click="handleApply(item)"
:disabled="item.disabledFlag>0"
v-if="item.activityState==2&&item.isJoin==2">
......@@ -77,7 +77,7 @@
</p>
<p class="activityBtn" v-if="item.channelType==5">
<span @click.native="handleToDetail(item)" class="redColor">{{$t("activityInfo.redMoneyType")}} <i
<span @click="handleToDetail(item)" class="redColor">{{$t("activityInfo.redMoneyType")}} <i
class="iconfont icon-hongbao-"></i></span>
<el-button size="mini" plain type="primary" @click="handleToDetail(item)"
:disabled="item.disabledFlag>0" v-if="item.activityState==2">
......@@ -129,7 +129,7 @@
import {Toast} from 'mint-ui';
import applyLoginCmpt from '../../../components/mobile/applyLogin'
import commonApi from '../../../common/commonApi';
import personApi from '../personaluser/api/api';
export default {
name: "list",
components: {
......@@ -438,6 +438,25 @@
this.isLogin = data;
this.userInfo = this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null;
this.getInitFunc(this.page, 1);
if(this.userInfo) this.getNickName();
},
//获取用户昵称
getNickName() {
let params = {
empId: this.userInfo.empId,
};
personApi.selectByEmpId(params).then(res => {
if (res.code == 0) {
var email = this.userInfo.empAccount.indexOf("@") > -1 ? this.userInfo.empAccount : this.userInfo.empAccount + "@techcode.com";
sessionStorage.setItem("liveEmail", email);
sessionStorage.setItem("liveName", res.result.nickName);
} else {
console.log(res.msg);
}
}).catch(err => {
console.log(err)
})
},
//直播
......
......@@ -551,7 +551,7 @@
import shareCmpt from '../../../components/shareIndustryCmpt'
import applyLoginCmpt from '../../../components/mobile/applyLogin';
import itegralCmpt from '../../../components/mobile/getIntegral';
import personApi from '../personaluser/api/api'
export default {
name: "mobileindex",
components: {
......@@ -893,6 +893,7 @@
//直播
handleLive(data) {
if(this.userInfo) this.getNickName()
if (data.baseLive.liveState == 1 || (data.baseLive.liveState == 2 && data.baseLive.liveBack == 0)) {
this.liveOperatorFunc(data);
}
......@@ -1742,6 +1743,24 @@
},
//获取用户昵称
getNickName() {
let params = {
empId: this.userInfo.empId,
};
personApi.selectByEmpId(params).then(res => {
if (res.code == 0) {
var email = this.userInfo.empAccount.indexOf("@") > -1 ? this.userInfo.empAccount : this.userInfo.empAccount + "@techcode.com";
sessionStorage.setItem("liveEmail", email);
sessionStorage.setItem("liveName", res.result.nickName);
} else {
console.log(res.msg);
}
}).catch(err => {
console.log(err)
})
},
//是否显示登录
isShowLoginDialogFunc(data, data1) {
this.isLogin = data;
......@@ -1751,6 +1770,9 @@
this.getEnActivityData();
this.getEnIndustryData();
}
if(this.loginType==64&&this.userInfo){
this.getNickName();
}
},
},
mounted() {
......
......@@ -31,8 +31,8 @@
api.selectByEmpId(params).then(res => {
if (res.code == 0) {
var email = this.userInfo.empAccount.indexOf("@") > -1 ? this.userInfo.empAccount : this.userInfo.empAccount + "@techcode.com";
this.publicFun.setUserInfoCookie("liveEmail", email);
this.publicFun.setUserInfoCookie("liveName", res.result.nickName);
sessionStorage.setItem("liveEmail", email);
sessionStorage.setItem("liveName", res.result.nickName);
} else {
console.log(res.msg);
}
......
......@@ -279,6 +279,9 @@
api.selectByEmpId(params).then(res => {
if (res.code == 0) {
this.empuser = res.result;
var email = this.userInfo.empAccount.indexOf("@") > -1 ? this.userInfo.empAccount : this.userInfo.empAccount + "@techcode.com";
sessionStorage.setItem("liveEmail", email);
sessionStorage.setItem("liveName", res.result.nickName);
this.mineList.push({
id: 5,
name: "myComment",
......
......@@ -826,6 +826,9 @@
if (res.code == 0) {
if (this.$route.query.empId) this.getStatusFunc();
this.empuser = res.result;
var email = this.userInfo.empAccount.indexOf("@") > -1 ? this.userInfo.empAccount : this.userInfo.empAccount + "@techcode.com";
sessionStorage.setItem("liveEmail", email);
sessionStorage.setItem("liveName", res.result.nickName);
this.mineList.push({
id: 5,
name: "comment",
......
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