Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into zj
This commit is contained in:
commit
1eabf61cde
@ -8,7 +8,6 @@
|
|||||||
width: 797px;
|
width: 797px;
|
||||||
height: 449px;
|
height: 449px;
|
||||||
border-radius: 17px;
|
border-radius: 17px;
|
||||||
background-color: #0f0;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
>video{
|
>video{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
2
src/types/trtc-js-sdk.d.ts
vendored
2
src/types/trtc-js-sdk.d.ts
vendored
@ -1,4 +1,6 @@
|
|||||||
declare module 'trtc-js-sdk' {
|
declare module 'trtc-js-sdk' {
|
||||||
export function createClient(info: any): any
|
export function createClient(info: any): any
|
||||||
export function createStream(info: any): any
|
export function createStream(info: any): any
|
||||||
|
export function checkSystemRequirements(): any
|
||||||
|
export function isScreenShareSupported(): any
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<div class="tabs">
|
<div class="tabs">
|
||||||
<div class="beforetab">提现到指定账户</div>
|
<div class="beforetab">提现到指定账户</div>
|
||||||
<span class="residue">余额:{{ yue }}</span>
|
<span class="residue">余额:{{ yue }}</span>
|
||||||
<div class="topbtn topbtn2">提现到指定账户</div>
|
<div class="topbtn topbtn2" @click="navto('/mine/addaccount')">提现到指定账户</div>
|
||||||
<div class="topbtn topbtn1">提现记录</div>
|
<div class="topbtn topbtn1" @click="navto('/mine/transaction')">提现记录</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="choose">
|
<div class="choose">
|
||||||
@ -131,6 +131,7 @@ import NavBottom from "@/components/NavBottom.vue";
|
|||||||
import { cashout, getwallect } from "@/api";
|
import { cashout, getwallect } from "@/api";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
|
import router from '@/router';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "Cashout",
|
name: "Cashout",
|
||||||
components: {
|
components: {
|
||||||
@ -150,8 +151,8 @@ export default defineComponent({
|
|||||||
const moneychange: (e: number) => void = (e: number) => {
|
const moneychange: (e: number) => void = (e: number) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
};
|
};
|
||||||
// const yue=ref<string>(store.state.userinfo.money)
|
const yue=ref<number>(store.state.userinfo.moneyValue)
|
||||||
const yue = ref<number>(10000);
|
// const yue = ref<number>(10000);
|
||||||
// yue.value=store.state.userinfo.money
|
// yue.value=store.state.userinfo.money
|
||||||
const accountlist = ref<Array<any>>([]);
|
const accountlist = ref<Array<any>>([]);
|
||||||
|
|
||||||
@ -193,6 +194,11 @@ export default defineComponent({
|
|||||||
// toRaw(accountlist.value)[payinfo.value.type]
|
// toRaw(accountlist.value)[payinfo.value.type]
|
||||||
// );
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function navto(url: string){
|
||||||
|
router.push(url)
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
money,
|
money,
|
||||||
moneychange,
|
moneychange,
|
||||||
@ -283,6 +289,7 @@ export default defineComponent({
|
|||||||
color: #808080;
|
color: #808080;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
margin-right: 28px;
|
margin-right: 28px;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.chooseitem {
|
.chooseitem {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -301,7 +308,8 @@ export default defineComponent({
|
|||||||
background: white;
|
background: white;
|
||||||
border-radius: 17px;
|
border-radius: 17px;
|
||||||
margin-left: 17px;
|
margin-left: 17px;
|
||||||
margin-right: 46px;
|
width: 256px;
|
||||||
|
margin-right: 30px;
|
||||||
margin-bottom: 17px;
|
margin-bottom: 17px;
|
||||||
.hostinfo {
|
.hostinfo {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -477,7 +477,7 @@ export default defineComponent({
|
|||||||
width:1170px;
|
width:1170px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.accountitem {
|
.accountitem {
|
||||||
width: 372px;
|
width: 368px;
|
||||||
height: 226px;
|
height: 226px;
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 17px;
|
border-radius: 17px;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="left">{{lan.$t('zhiboyemian')}}</div>
|
<div class="left">{{lan.$t('zhiboyemian')}}</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<img src="@/static/images/liveshare.png" alt="" @click="qiehuan()" />
|
<img src="@/static/images/liveshare.png" alt="" @click="fenxiang()" />
|
||||||
<img src="@/static/images/liveend.png" alt="" @click="visible = true" />
|
<img src="@/static/images/liveend.png" alt="" @click="visible = true" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -30,8 +30,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="others" v-for="(item, index) in roominfo.studentlist" :key="index">
|
<div class="others">
|
||||||
<div :id="'s-' + item.memberid" class="othersitem">
|
<div :id="'s-' + item.memberid" class="othersitem" v-for="(item, index) in roominfo.studentlist" :key="index">
|
||||||
<div class="watcher"></div>
|
<div class="watcher"></div>
|
||||||
<div class="name">{{item.name}}</div>
|
<div class="name">{{item.name}}</div>
|
||||||
<!-- <img src="" alt="" /> -->
|
<!-- <img src="" alt="" /> -->
|
||||||
@ -51,11 +51,7 @@
|
|||||||
<div class="name">asdsada</div>
|
<div class="name">asdsada</div>
|
||||||
<img src="" alt="" />
|
<img src="" alt="" />
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="othersitem" id="s-52">
|
|
||||||
<div class="watcher"></div>
|
|
||||||
<div class="name">测试</div>
|
|
||||||
<!-- <img src="" alt="" /> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -221,11 +217,15 @@ export default defineComponent({
|
|||||||
const roominfo = ref<any>([]);
|
const roominfo = ref<any>([]);
|
||||||
console.log(useRoute())
|
console.log(useRoute())
|
||||||
const id = useRoute().query.id;
|
const id = useRoute().query.id;
|
||||||
|
TRTC.checkSystemRequirements().then((result: any) => {
|
||||||
|
if(!result) {
|
||||||
|
message.error("您的浏览器不支持视频通话,请下载新版chrome浏览器")
|
||||||
|
}
|
||||||
|
})
|
||||||
async function qiehuan(){
|
async function qiehuan(){
|
||||||
// 1 屏幕分享 2 摄像头
|
// 1 屏幕分享 2 摄像头
|
||||||
client.unpublish(localStream)
|
client.unpublish(localStream)
|
||||||
localStream = type ? TRTC.createStream({ userid: store.state.userinfo.memberid, audio: true, screen: true }) : TRTC.createStream({ userId: 10, audio: true, video: true });
|
localStream = type ? TRTC.createStream({ userid: store.state.userinfo.memberid, audio: true, screen: true }) : TRTC.createStream({ userId: 10, audio: false, video: true });
|
||||||
type = !type;
|
type = !type;
|
||||||
localStream.initialize().then(()=>{
|
localStream.initialize().then(()=>{
|
||||||
client
|
client
|
||||||
@ -234,38 +234,13 @@ export default defineComponent({
|
|||||||
console.error('本地流发布失败 ' + error);
|
console.error('本地流发布失败 ' + error);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
const el = document.querySelector("#local_stream");
|
|
||||||
if(el){
|
|
||||||
el.innerHTML = ""
|
|
||||||
}
|
|
||||||
localStream.play('local_stream');
|
localStream.play('local_stream');
|
||||||
console.log('本地流发布成功');
|
console.log('本地流发布成功');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
async function pingmu(){
|
|
||||||
localStream = TRTC.createStream({ userid: store.state.userinfo.memberid, audio: true, screen: true });
|
|
||||||
const id = localStream.getId();
|
|
||||||
await localStream
|
|
||||||
.initialize()
|
|
||||||
.catch((error: string) => {
|
|
||||||
console.error('初始化本地流失败 ' + error);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
console.log('初始化本地流成功');
|
|
||||||
client
|
|
||||||
.publish(localStream)
|
|
||||||
.catch((error: string) => {
|
|
||||||
console.error('本地流发布失败 ' + error);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
localStream.play('local_stream');
|
|
||||||
console.log('本地流发布成功');
|
|
||||||
console.log(id , 123)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
async function shexiang(){
|
async function shexiang(){
|
||||||
localStream = TRTC.createStream({ userId: store.state.userinfo.memberid, audio: true, video: true });
|
localStream = TRTC.createStream({ userId: store.state.userinfo.memberid, audio: true, video: true });
|
||||||
const id = localStream.getId();
|
const id = localStream.getId();
|
||||||
@ -282,12 +257,58 @@ export default defineComponent({
|
|||||||
console.error('本地流发布失败 ' + error);
|
console.error('本地流发布失败 ' + error);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
const el = document.querySelector("#local_stream");
|
||||||
|
if(el){
|
||||||
|
el.innerHTML = ""
|
||||||
|
}
|
||||||
localStream.play('local_stream');
|
localStream.play('local_stream');
|
||||||
console.log('本地流发布成功');
|
console.log('本地流发布成功');
|
||||||
console.log(id, 123)
|
console.log(id, 123)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function pingmu(){
|
||||||
|
const result = await TRTC.checkSystemRequirements()
|
||||||
|
console.log(result,11111)
|
||||||
|
if(!result) {
|
||||||
|
message.error("您的浏览器不支持屏幕分享,请下载新版chrome");
|
||||||
|
shexiang()
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
localStream = TRTC.createStream({ userid: store.state.userinfo.memberid, audio: true, screen: true });
|
||||||
|
const id = localStream.getId();
|
||||||
|
await localStream
|
||||||
|
.initialize()
|
||||||
|
.catch((error: string) => {
|
||||||
|
console.error('初始化本地流失败 ' + error);
|
||||||
|
message.error("请选择分享的内容")
|
||||||
|
|
||||||
|
setTimeout(()=>{
|
||||||
|
pingmu()
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log('初始化本地流成功');
|
||||||
|
client
|
||||||
|
.publish(localStream)
|
||||||
|
.catch((error: string) => {
|
||||||
|
console.log('本地流发布失败 ' + error);
|
||||||
|
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
const el = document.querySelector("#local_stream");
|
||||||
|
if(el){
|
||||||
|
el.innerHTML = ""
|
||||||
|
}
|
||||||
|
localStream.play('local_stream');
|
||||||
|
console.log('本地流发布成功');
|
||||||
|
console.log(id , 123)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function init(fun: any, userSig: string): Promise<void>{
|
async function init(fun: any, userSig: string): Promise<void>{
|
||||||
console.log(userSig)
|
console.log(userSig)
|
||||||
const el = document.querySelector("#local_stream");
|
const el = document.querySelector("#local_stream");
|
||||||
@ -319,7 +340,7 @@ export default defineComponent({
|
|||||||
remoteStream.play('s-' + remoteStream.userId_);
|
remoteStream.play('s-' + remoteStream.userId_);
|
||||||
});
|
});
|
||||||
client
|
client
|
||||||
.join({ roomId: roominfo.value.roomid })
|
.join({ roomId: 12 })
|
||||||
.catch((error: string) => {
|
.catch((error: string) => {
|
||||||
console.error('进房失败 ' + error);
|
console.error('进房失败 ' + error);
|
||||||
})
|
})
|
||||||
@ -335,12 +356,16 @@ export default defineComponent({
|
|||||||
await client.unpublish(localStream).then(() => {
|
await client.unpublish(localStream).then(() => {
|
||||||
// 关闭屏幕分享流
|
// 关闭屏幕分享流
|
||||||
console.log("关闭")
|
console.log("关闭")
|
||||||
client.leave().then(() => {
|
// client.leave().then(() => {
|
||||||
// leaving room success
|
// // leaving room success
|
||||||
console.log("关闭成功")
|
// console.log("关闭成功")
|
||||||
}).catch((error: string) => {
|
// }).catch((error: string) => {
|
||||||
console.error('leaving room failed: ' + error);
|
// console.error('leaving room failed: ' + error);
|
||||||
});
|
// });
|
||||||
|
const el = document.querySelector("#local_stream");
|
||||||
|
if(el){
|
||||||
|
el.innerHTML = ""
|
||||||
|
}
|
||||||
});
|
});
|
||||||
statie ? await shexiang() : await pingmu();
|
statie ? await shexiang() : await pingmu();
|
||||||
statie = !statie;
|
statie = !statie;
|
||||||
@ -358,9 +383,15 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
|
const si = setInterval(async ()=>{
|
||||||
|
if(store.state.userinfo.memberid != 0 && store.state.userinfo.memberid){
|
||||||
|
clearInterval(si);
|
||||||
userSing = await usersig(store.state.userinfo.memberid);
|
userSing = await usersig(store.state.userinfo.memberid);
|
||||||
|
|
||||||
init(pingmu, userSing);
|
init(pingmu, userSing);
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user