提交 8933dfcb 编写于 作者: 张磊's avatar 张磊

add rtc im

上级 325fbe36
......@@ -15,17 +15,20 @@
<v-footer></v-footer>
</div>
</el-container>
<chat :showChat="showChat" :currentUser="{}"></chat>
</div>
</template>
<script>
import VHeader from "./views/layout/header.vue";
import VSlidebar from "./views/layout/slidebar.vue";
import VFooter from "./views/layout/footer.vue";
import chat from './components/IM/chat'
import {
base64decode,
isNotEmptyUtils,
getUrlParamsMap,
ssoLogin
ssoLogin,
bindDragHeader
} from "./utils/utils.js";
import { mapActions, mapGetters } from "vuex";
import { getLoginUrl, getInnerLoginUrl } from "./utils/index.js";
......@@ -34,7 +37,8 @@ export default {
components: {
VHeader,
VSlidebar,
VFooter
VFooter,
chat
},
data() {
return {
......@@ -42,6 +46,7 @@ export default {
userName: "",
authList: [],
systemType: 0,
showChat:false
};
},
computed: {
......@@ -51,7 +56,11 @@ export default {
vm = this;
vm.getToken();
},
mounted() {},
mounted() {
setTimeout( function () {
bindDragHeader('.c-header', '.chat-wrap');
}, 1000)
},
methods: {
// 解密token
getToken() {
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -816,3 +816,41 @@ const change = (num) => {
}
return num;
}
export const bindDragHeader = (classname,content) =>{
const dragDom = document.querySelector(classname);
const con = document.querySelector(content);
let translate,contranslate;
dragDom.onmousedown = (e) => {
const disX = e.clientX;
const disY = e.clientY;
translate = dragDom.style.transform.replace(/[^0-9\-,]/g,'').split(',');
contranslate = con.style.transform.replace(/[^0-9\-,]/g,'').split(',');
con.style.transition = "transform 100ms liner";
document.onmousemove = function (e) {
const l = e.clientX - disX;
const t = e.clientY - disY;
let x, y, tran;
if(contranslate.length> 1){
x= (l+ Number(contranslate[0])) + 'px';
y = (t + Number(contranslate[1])) + 'px';
}else{
x= (l) + 'px';
y = (t ) + 'px';
}
tran = `translate(${x},${y})`;
con.style.transform = tran;
};
document.onmouseup = function (e) {
document.onmousemove = null;
document.onmouseup = null;
};
}
}
......@@ -99,7 +99,6 @@
</div>
</template>
<script>
import RtcClient from "@/utils/live/rtc-client.js";
import {
getLiveTimeText,
countDown,
......@@ -107,6 +106,7 @@ import {
laseTime,
lastm,
} from "@/utils/live";
import RtcClient from "../../../utils/live/RtcClient.js";
import { openLoading, closeLoading } from "@/utils/utils";
import alert from "@/components/common/alert.vue";
import timeLeft from "@/components/timeLeft";
......@@ -390,7 +390,6 @@ export default {
},
// 显示文案
showText(status, role, item) {
console.log("status", status);
// 1 呼叫中 2 接入 3离线
if (item.status == 2) {
item.timeleft = 0;
......@@ -555,19 +554,19 @@ export default {
// 获取信息失败
getErr() {
closeLoading(this);
this.$nextTick(() => {
this.$refs.alert
.init({
confirmTxt: "我知道了",
title: `获取信息失败,请稍后重试`,
})
.then(() => {
this.$router.go(-1);
})
.catch((err) => {
this.$router.go(-1);
});
});
// this.$nextTick(() => {
// this.$refs.alert
// .init({
// confirmTxt: "我知道了",
// title: `获取信息失败,请稍后重试`,
// })
// .then(() => {
// // this.$router.go(-1);
// })
// .catch((err) => {
// // this.$router.go(-1);
// });
// });
},
reloadfn(msg) {
this.$nextTick(() => {
......
......@@ -70,11 +70,14 @@
</el-pagination>
</el-row>
</div>
</div>
</template>
<script>
export default {
components: {
},
data(){
return {
tabPosition:"all",
......@@ -82,7 +85,8 @@ export default {
currentPage4:0,
// 判断是否是管理员
isdon:'1',
name:''
showChat: true
}
},
methods:{
......@@ -167,4 +171,4 @@ export default {
}
</style>node
\ No newline at end of file
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册