合并主线

This commit is contained in:
648540858
2022-08-09 16:58:31 +08:00
parent 8b0ff3767b
commit 116d979d87
7 changed files with 21 additions and 104 deletions

View File

@@ -35,6 +35,7 @@
<script>
import crypto from 'crypto'
import Vue from 'vue'
export default {
name: 'Login',
data(){
@@ -84,11 +85,13 @@ export default {
url:"/api/user/login",
params: loginParam
}).then(function (res) {
console.log(JSON.stringify(res));
console.log(res);
console.log(res.data.data);
if (res.data.code == 0 && res.data.msg == "success") {
that.$cookies.set("session", {"username": that.username,"roleId":res.data.data.role.id}) ;
//登录成功后
that.cancelEnterkeyDefaultAction();
Vue.prototype.$loginUser = res.data.data
that.$router.push('/');
}else{
that.isLoging = false;

View File

@@ -298,6 +298,7 @@
<script>
import rtcPlayer from '../dialog/rtcPlayer.vue'
import crypto from 'crypto'
// import LivePlayer from '@liveqing/liveplayer'
// import player from '../dialog/easyPlayer.vue'
import jessibucaPlayer from '../common/jessibuca.vue'
@@ -861,6 +862,10 @@ export default {
}
},
startBroadcast(url){
// 获取推流鉴权KEY
console.log(this.$loginUser)
console.log(this.$loginUser.pushKey)
url += "&sign=" + crypto.createHash('md5').update(this.$loginUser.pushKey, "utf8").digest('hex')
console.log("开始语音对讲: " + url)
this.broadcastRtc = new ZLMRTCClient.Endpoint({
debug: true, // 是否打印日志