cshenfu
2024-05-21 09d8c671d5e6e6045677bfb5218a5fb78c26aa0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<template>
    <view>
        <web-view class="webview" :src="url"></web-view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                url: '',
                type: 1,
                private_domain: "e54212864",
            }
        },
        onLoad(option) {
            if (option.type && option.type == 2) {
                console.log(option)
                this.url =
                    `https://${this.private_domain}.at.baijiayun.com/web/playback/index?classid=${option.url}&token=${option.token}`
                console.log(this.url)
            }
            if (option.type && option.type == 3) {
                let {
                    room_id,
                    user_number,
                    user_name,
                    user_role,
                    user_avatar,
                    sign
                } = option
                this.url =
                    `https://${this.private_domain}.at.baijiayun.com/web/room/enter?room_id=${room_id}&user_number=${user_number}&user_name=${user_name}&user_role=${user_role}&user_avatar=${user_avatar}&sign=${sign}`
 
                console.log(this.url)
            }
            let title = option.title || '';
            uni.setNavigationBarTitle({
                title: title
            })
        }
    }
</script>