Merge pull request 'xbx' (#118) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/118
This commit is contained in:
		
						commit
						f9c7d799aa
					
				@ -673,8 +673,9 @@ interface SendSms{
 | 
			
		||||
    msg: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function sendsms(phone: string, type: number): Promise<boolean>{
 | 
			
		||||
    const res = await post<SendSms>("SendSms", {phone, type});
 | 
			
		||||
export async function sendsms(code: string ,phone: string): Promise<boolean>{
 | 
			
		||||
    const type = code == '86' ? 0 : 1;
 | 
			
		||||
    const res = await post<SendSms>("SendSms", {phone: code + phone, type});
 | 
			
		||||
    console.log(res);
 | 
			
		||||
    if(res.code == 0){
 | 
			
		||||
        message.success(res.msg);
 | 
			
		||||
@ -947,7 +948,7 @@ export async function liveinfo(id: number): Promise<any>{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function setlive(data: any){
 | 
			
		||||
    data.status = 0;
 | 
			
		||||
    data.status = data.livestatus;
 | 
			
		||||
    const info = await put("live/" + data.id, data)
 | 
			
		||||
    console.log(info.data)
 | 
			
		||||
    if(info.code==0){
 | 
			
		||||
@ -1024,3 +1025,7 @@ export async function interests() {
 | 
			
		||||
    return res.data;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function getset() {
 | 
			
		||||
    const res = await get('getset');
 | 
			
		||||
    return res.data;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -174,15 +174,12 @@ export default defineComponent({
 | 
			
		||||
        const lan: any = useI18n();
 | 
			
		||||
        function navto(){
 | 
			
		||||
            let url = '';
 | 
			
		||||
            switch (props.type) {
 | 
			
		||||
            switch (props.status) {
 | 
			
		||||
                case 1:
 | 
			
		||||
                    url = '/regime/livedetail';
 | 
			
		||||
                    url = '/regime/liveing';
 | 
			
		||||
                    break;
 | 
			
		||||
                case 2:
 | 
			
		||||
                default:
 | 
			
		||||
                    url = '/regime/livedetail';
 | 
			
		||||
                    break;
 | 
			
		||||
                case 3:
 | 
			
		||||
                    url = '/regeime/liveing';
 | 
			
		||||
            }
 | 
			
		||||
            console.log(props.zid);
 | 
			
		||||
            if(props.zid != undefined){
 | 
			
		||||
 | 
			
		||||
@ -157,7 +157,7 @@
 | 
			
		||||
        width: 57px;
 | 
			
		||||
        height: 57px;
 | 
			
		||||
        border-radius: 50%;
 | 
			
		||||
        background-color: #0f0;
 | 
			
		||||
        // background-color: #0f0;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -5,56 +5,20 @@
 | 
			
		||||
    
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="info">
 | 
			
		||||
      <div class="item">
 | 
			
		||||
      <div class="item" v-for="(item,index) in list" :key="index">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
            <div>{{item.name}}</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="icons">
 | 
			
		||||
            <img src="@/static/images/camera.png" alt="" class="icon">
 | 
			
		||||
            <img src="@/static/images/vol.png" alt="" class="icon">
 | 
			
		||||
            <img src="@/static/images/camera.png" @click="cameta(item.memberid)" alt="" class="icon">
 | 
			
		||||
            <img src="@/static/images/vol.png" alt="" class="icon" @click="vol(item.memberid)">
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
       <div class="item">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="icons">
 | 
			
		||||
            <img src="@/static/images/camera.png" alt="" class="icon">
 | 
			
		||||
            <img src="@/static/images/vol.png" alt="" class="icon">
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
       <div class="item">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
         <div class="icons">
 | 
			
		||||
            <img src="@/static/images/camera.png" alt="" class="icon">
 | 
			
		||||
            <img src="@/static/images/vol.png" alt="" class="icon">
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
       <div class="item">
 | 
			
		||||
        <div style="display:flex">
 | 
			
		||||
          <div class="stuinfo">
 | 
			
		||||
            <div>andy</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
         <div class="icons">
 | 
			
		||||
            <img src="@/static/images/camera.png" alt="" class="icon">
 | 
			
		||||
            <img src="@/static/images/vol.png" alt="" class="icon">
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
     
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
@ -147,5 +111,23 @@
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent } from "vue";
 | 
			
		||||
 | 
			
		||||
export default defineComponent({});
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  props:{
 | 
			
		||||
    list:{
 | 
			
		||||
      type: Array
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  setup(prop,context){
 | 
			
		||||
    function cameta(id: number){
 | 
			
		||||
      context.emit("cameta", id)
 | 
			
		||||
    }
 | 
			
		||||
    function vol(id: number){
 | 
			
		||||
      context.emit("vol", id)
 | 
			
		||||
    }
 | 
			
		||||
    return {
 | 
			
		||||
      cameta,
 | 
			
		||||
      vol
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
@ -185,11 +185,22 @@ export default defineComponent({
 | 
			
		||||
 | 
			
		||||
        const userinfo = computed(() => store.state.userinfo)
 | 
			
		||||
        // 设置当前路由
 | 
			
		||||
        for(const i in list){
 | 
			
		||||
            console.log(list[i].route==useRoute().path)
 | 
			
		||||
            if(list[i].route == useRoute().path){
 | 
			
		||||
                selnum.value = parseInt(i);
 | 
			
		||||
        const routelist = [
 | 
			
		||||
            ["/mine/archives"],
 | 
			
		||||
            ['/mine/webcast'],
 | 
			
		||||
            ['/mine/video'],
 | 
			
		||||
            ['/mine/wallet', '/mine/cashout', '/mine/addaccount', '/mine/transaction', '/mine/transactionxq'],
 | 
			
		||||
            ['/mine/liststatistic'],
 | 
			
		||||
            ['/mine/aboutus']
 | 
			
		||||
        ]
 | 
			
		||||
        for(const i in routelist){
 | 
			
		||||
            for(const j in routelist[i]){
 | 
			
		||||
                console.log(routelist[i][j]==useRoute().path)
 | 
			
		||||
                if(routelist[i][j] == useRoute().path){
 | 
			
		||||
                    selnum.value = parseInt(i);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
        /**
 | 
			
		||||
         * 跳转路由与赋值对应的下标
 | 
			
		||||
 | 
			
		||||
@ -328,7 +328,10 @@ export default defineComponent({
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
        function toindex(){
 | 
			
		||||
            router.push("/")
 | 
			
		||||
            if(!store.state.islogin){
 | 
			
		||||
               return ; 
 | 
			
		||||
            }
 | 
			
		||||
            router.push("/mine/archives")
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return {
 | 
			
		||||
 | 
			
		||||
@ -63,7 +63,7 @@
 | 
			
		||||
            width: 57px;
 | 
			
		||||
            height: 57px;
 | 
			
		||||
            border-radius: 50%;
 | 
			
		||||
            background-color: #0f0;
 | 
			
		||||
            // background-color: #0f0;
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        .name{
 | 
			
		||||
 | 
			
		||||
@ -33,7 +33,7 @@
 | 
			
		||||
            width: 45px;
 | 
			
		||||
            height: 45px;
 | 
			
		||||
            border-radius: 50%;
 | 
			
		||||
            background-color: #0f0;
 | 
			
		||||
            // background-color: #0f0;
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        .name{
 | 
			
		||||
 | 
			
		||||
@ -189,7 +189,6 @@ export default {
 | 
			
		||||
    xuanzezhanghu: "Select account",
 | 
			
		||||
    tixianjine: "Withdrawal amount",
 | 
			
		||||
    quanbujine: "Total amount",
 | 
			
		||||
    tixianzhu: "Note: 0.1% service fee will be charged for each withdrawal, with a minimum of ¥ 0.1",
 | 
			
		||||
    yueshu: "Your balance is only",
 | 
			
		||||
    zuiditixian: "Minimum withdrawal amount ¥ 100",
 | 
			
		||||
    mingxichaxun: "Details inquiry",
 | 
			
		||||
@ -297,5 +296,8 @@ export default {
 | 
			
		||||
    kaihuhangweikong:"Swiftcode cannot be empty",
 | 
			
		||||
    shensu:"Appeal",
 | 
			
		||||
    querenquxiao: "Are you sure to cancel the live broadcast?",
 | 
			
		||||
    tianjiatixian: "Add a withdrawal account"
 | 
			
		||||
    tianjiatixian: "Add a withdrawal account",
 | 
			
		||||
    shichangtishi:"",
 | 
			
		||||
    renshutishi: '',
 | 
			
		||||
    tixianzhu: "",
 | 
			
		||||
}
 | 
			
		||||
@ -1,9 +1,27 @@
 | 
			
		||||
import zh from "./zh"
 | 
			
		||||
import en from "./en"
 | 
			
		||||
import { getset } from '@/api';
 | 
			
		||||
import { geti18n } from '@/utils/i18n';
 | 
			
		||||
getset().then((res: any)=>{
 | 
			
		||||
    zh.shichangtishi = `最短${res.timeLowerLimit}min, 最长${res.timeCeiling}min`
 | 
			
		||||
    en.shichangtishi = `The shortest is ${res.timeLowerLimit}min and the longest is ${res.timeCeiling}min`
 | 
			
		||||
    zh.renshutishi = `最少${res.lowerLimit}人, 最多${res.numberCeiling}人`
 | 
			
		||||
    en.renshutishi = `At least ${res.lowerLimit}, at most ${res.numberCeiling}`
 | 
			
		||||
    en.shichangtishi = `Minimum ${res.lowerLimit} person, maximum ${res.numberCeiling} people`
 | 
			
		||||
    zh.tixianzhu = `注:每笔提现收取${res.sxf}服务费,最低${ res.symbol + res.minmoney }`
 | 
			
		||||
    en.tixianzhu = `Note: ${res.sxf} service fee will be charged for each withdrawal, with a minimum of ${ res.symbol + res.minmoney }`
 | 
			
		||||
    const i18n = geti18n();
 | 
			
		||||
    const loc = i18n.locale.value;
 | 
			
		||||
    i18n.locale.value = '';
 | 
			
		||||
    i18n.locale.value = loc;
 | 
			
		||||
    console.log('i18n')
 | 
			
		||||
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
    locale: "zh", //默认语言
 | 
			
		||||
    messages: {
 | 
			
		||||
        zh,
 | 
			
		||||
        en
 | 
			
		||||
        zh: zh,
 | 
			
		||||
        en: en
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -192,7 +192,6 @@ export default {
 | 
			
		||||
    xuanzezhanghu:"选择账户",
 | 
			
		||||
    tixianjine:"提现金额",
 | 
			
		||||
    quanbujine:"全部金额",
 | 
			
		||||
    tixianzhu:"注:每笔提现收取0.1%服务费,最低¥0.1",
 | 
			
		||||
    yueshu:"您的余额只有",
 | 
			
		||||
    zuiditixian:"最低提现金额¥100",
 | 
			
		||||
    mingxichaxun:"明细查询",
 | 
			
		||||
@ -297,5 +296,8 @@ export default {
 | 
			
		||||
    kaihuhangweikong:"开户行不能为空",
 | 
			
		||||
    shensu:"申诉",
 | 
			
		||||
    querenquxiao: "您确认取消直播吗?",
 | 
			
		||||
    tianjiatixian: "添加提现账户"
 | 
			
		||||
    tianjiatixian: "添加提现账户",
 | 
			
		||||
    shichangtishi:"",
 | 
			
		||||
    renshutishi: '',
 | 
			
		||||
    tixianzhu:"",
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										5
									
								
								src/import-png.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								src/import-png.d.ts
									
									
									
									
										vendored
									
									
								
							@ -13,4 +13,9 @@ declare module "ant-design-vue/es/locale/zh_CN" {
 | 
			
		||||
    export default value;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
declare module 'tim-js-sdk'{
 | 
			
		||||
    const value: any;
 | 
			
		||||
    export default value;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
declare var FB: any;
 | 
			
		||||
@ -195,7 +195,7 @@ export default defineComponent({
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    position: fixed;
 | 
			
		||||
    top: 0;
 | 
			
		||||
    z-index: 9999;
 | 
			
		||||
    z-index: 99;
 | 
			
		||||
    .navcontent{
 | 
			
		||||
      width: 910px;
 | 
			
		||||
      margin: 0 auto;
 | 
			
		||||
 | 
			
		||||
@ -188,7 +188,7 @@ export default defineComponent({
 | 
			
		||||
        }
 | 
			
		||||
        lock = true;
 | 
			
		||||
        console.log(myquhao.value,"quhao")
 | 
			
		||||
        sendsms(myquhao.value + phone.value, 0);
 | 
			
		||||
        sendsms(myquhao.value, phone.value);
 | 
			
		||||
        const timestep = setInterval(() => {
 | 
			
		||||
        console.log(11112);
 | 
			
		||||
     
 | 
			
		||||
 | 
			
		||||
@ -138,7 +138,7 @@ export default defineComponent({
 | 
			
		||||
          return;
 | 
			
		||||
      }
 | 
			
		||||
      lock = true;
 | 
			
		||||
      sendsms(uinfo.value.quhao + uinfo.value.phone, 0);
 | 
			
		||||
      sendsms(uinfo.value.quhao, uinfo.value.phone);
 | 
			
		||||
      const timestep = setInterval(() => {
 | 
			
		||||
        console.log(11112);
 | 
			
		||||
        time.value = time.value - 1;
 | 
			
		||||
 | 
			
		||||
@ -285,7 +285,7 @@ export default defineComponent({
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            lock = true;
 | 
			
		||||
            sendsms(phone.value.quhao + phone.value.phone, 0);
 | 
			
		||||
            sendsms(phone.value.quhao, phone.value.phone);
 | 
			
		||||
            const timestep = setInterval(() => {
 | 
			
		||||
                console.log(phone);
 | 
			
		||||
                time.value = time.value - 1;
 | 
			
		||||
 | 
			
		||||
@ -348,7 +348,7 @@
 | 
			
		||||
                                <div
 | 
			
		||||
                                    @click="
 | 
			
		||||
                                        sendVerificationCode(
 | 
			
		||||
                                            userinfo.code + userinfo.mobile
 | 
			
		||||
                                            userinfo.code , userinfo.mobile
 | 
			
		||||
                                        )
 | 
			
		||||
                                    "
 | 
			
		||||
                                    class="confirm-btn"
 | 
			
		||||
@ -411,7 +411,7 @@
 | 
			
		||||
                                />
 | 
			
		||||
                                <div
 | 
			
		||||
                                    @click="
 | 
			
		||||
                                        sendVerificationCode(myquhao + mynewtel)
 | 
			
		||||
                                        sendVerificationCode(myquhao , mynewtel)
 | 
			
		||||
                                    "
 | 
			
		||||
                                    class="confirm-btn"
 | 
			
		||||
                                >
 | 
			
		||||
@ -678,11 +678,11 @@ export default defineComponent({
 | 
			
		||||
        /**
 | 
			
		||||
         * 发送验证码
 | 
			
		||||
         */
 | 
			
		||||
        function sendVerificationCode(tel: string): void {
 | 
			
		||||
        function sendVerificationCode(code: string ,tel: string): void {
 | 
			
		||||
            if (remainTime.value === 0) {
 | 
			
		||||
                computedVerificationCode();
 | 
			
		||||
                console.log(tel, "send");
 | 
			
		||||
                sendsms(tel, 0);
 | 
			
		||||
                sendsms(code, tel);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        // 绑定手机号是否是第二步
 | 
			
		||||
 | 
			
		||||
@ -126,7 +126,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent, onMounted, ref, toRaw } from "vue";
 | 
			
		||||
import { computed, defineComponent, onMounted, ref, toRaw } from "vue";
 | 
			
		||||
import NavBottom from "@/components/NavBottom.vue";
 | 
			
		||||
import { cashout, getwallect } from "@/api";
 | 
			
		||||
import store from "@/store";
 | 
			
		||||
@ -154,7 +154,7 @@ export default defineComponent({
 | 
			
		||||
            console.log(e);
 | 
			
		||||
        };
 | 
			
		||||
        const yue=ref<number>(store.state.userinfo.moneyValue)
 | 
			
		||||
        const danwei = ref(store.state.userinfo.symbol)
 | 
			
		||||
        const danwei = computed(() => store.state.userinfo.symbol)
 | 
			
		||||
        // const yue = ref<number>(10000);
 | 
			
		||||
        // yue.value=store.state.userinfo.money
 | 
			
		||||
        const accountlist = ref<Array<any>>([]);
 | 
			
		||||
 | 
			
		||||
@ -143,7 +143,7 @@
 | 
			
		||||
                    type="number"
 | 
			
		||||
                />
 | 
			
		||||
                <span class="unit">{{ lan.$t("fenzhong") }}</span>
 | 
			
		||||
                <div style="color: red;font-size: 0.12rem;line-height: 1.3;">*最短30min, 最长120min</div>
 | 
			
		||||
                <div style="color: red;font-size: 0.12rem;line-height: 1.3;">*{{ lan.$t('shichangtishi') }}</div>
 | 
			
		||||
            </a-form-item>
 | 
			
		||||
            <a-form-item
 | 
			
		||||
                :label="lan.$t('zhiborenshu')"
 | 
			
		||||
@ -156,7 +156,7 @@
 | 
			
		||||
                    :placeholder="lan.$t('shuruzhiborenshu')"
 | 
			
		||||
                    type="number"
 | 
			
		||||
                />
 | 
			
		||||
                <div style="color: red;font-size: 0.12rem;line-height: 1.3;">*最少1人, 最多4人</div>
 | 
			
		||||
                <div style="color: red;font-size: 0.12rem;line-height: 1.3;">*{{ lan.$t('renshutishi') }}</div>
 | 
			
		||||
 | 
			
		||||
            </a-form-item>
 | 
			
		||||
            <a-form-item :label="lan.$t('zhibojianjie')" class="brief">
 | 
			
		||||
 | 
			
		||||
@ -187,7 +187,7 @@ export default defineComponent({
 | 
			
		||||
  setup() {
 | 
			
		||||
    const lan: any = useI18n();
 | 
			
		||||
    const page = ref(1);
 | 
			
		||||
    const tabindex = ref(1);
 | 
			
		||||
    const tabindex = ref<number | string>(1);
 | 
			
		||||
    const livelist = ref<LivelistInfo>({
 | 
			
		||||
        code: 0,
 | 
			
		||||
        total: 0,
 | 
			
		||||
@ -200,7 +200,11 @@ export default defineComponent({
 | 
			
		||||
    });
 | 
			
		||||
    async function tab(){
 | 
			
		||||
        input.value = '';
 | 
			
		||||
        livelist.value = await getlivelist({ status: tabindex.value});
 | 
			
		||||
        let index: string | number = '';
 | 
			
		||||
        if(tabindex.value != 1){
 | 
			
		||||
            index = tabindex.value
 | 
			
		||||
        }
 | 
			
		||||
        livelist.value = await getlivelist({ status: index});
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    function tabchange(e: number): void {
 | 
			
		||||
 | 
			
		||||
@ -9,7 +9,7 @@
 | 
			
		||||
        </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="info">
 | 
			
		||||
            <LiveingWatcher></LiveingWatcher>
 | 
			
		||||
            <LiveingWatcher :list="roominfo.studentlist" @cameta="sendtext" @vol="senvol"></LiveingWatcher>
 | 
			
		||||
            <div class="LivePlaying">
 | 
			
		||||
                <LivePlaying></LivePlaying>
 | 
			
		||||
                <div class="comment">
 | 
			
		||||
@ -190,7 +190,7 @@
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent, onMounted, ref } from "vue";
 | 
			
		||||
import { defineComponent, onMounted, ref, resolveComponent } from "vue";
 | 
			
		||||
import LivePlaying from "@/components/LivePlaying.vue";
 | 
			
		||||
import LiveingWatcher from "@/components/LiveingWatcher.vue";
 | 
			
		||||
import TRTC from "trtc-js-sdk"
 | 
			
		||||
@ -199,6 +199,7 @@ import { useRoute } from 'vue-router';
 | 
			
		||||
import store from '@/store';
 | 
			
		||||
import { message } from 'ant-design-vue';
 | 
			
		||||
import { useI18n } from '@/utils/i18n';
 | 
			
		||||
import TIM from 'tim-js-sdk';
 | 
			
		||||
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
    components: {
 | 
			
		||||
@ -217,6 +218,7 @@ export default defineComponent({
 | 
			
		||||
        const roominfo = ref<any>([]);
 | 
			
		||||
        console.log(useRoute())
 | 
			
		||||
        const id = useRoute().query.id;
 | 
			
		||||
        let tim: any;
 | 
			
		||||
        TRTC.checkSystemRequirements().then((result: any) => {
 | 
			
		||||
            if(!result) {
 | 
			
		||||
                message.error(lan.$t('buzhichitonghua'))
 | 
			
		||||
@ -323,7 +325,7 @@ export default defineComponent({
 | 
			
		||||
            
 | 
			
		||||
            client = TRTC.createClient({
 | 
			
		||||
                mode: 'rtc',
 | 
			
		||||
                sdkAppId: '1400400340',
 | 
			
		||||
                sdkAppId: '1400435767',
 | 
			
		||||
                userId: store.state.userinfo.memberid,
 | 
			
		||||
                userSig: userSig
 | 
			
		||||
            });
 | 
			
		||||
@ -351,6 +353,87 @@ export default defineComponent({
 | 
			
		||||
                // }
 | 
			
		||||
                fun()
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            // im 初始化
 | 
			
		||||
            tim = TIM.create({
 | 
			
		||||
                SDKAppID: 1400400340
 | 
			
		||||
            }); // SDK 实例通常用 tim 表示
 | 
			
		||||
            tim.setLogLevel(0);
 | 
			
		||||
            tim.on(TIM.EVENT.MESSAGE_RECEIVED, function(event: any) {
 | 
			
		||||
                // 收到推送的单聊、群聊、群提示、群系统通知的新消息,可通过遍历 event.data 获取消息列表数据并渲染到页面
 | 
			
		||||
                // event.name - TIM.EVENT.MESSAGE_RECEIVED
 | 
			
		||||
                // event.data - 存储 Message 对象的数组 - [Message]
 | 
			
		||||
                for(const i in event.data){
 | 
			
		||||
                    console.log(event.data[i])
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
            tim.on(TIM.EVENT.GROUP_LIST_UPDATED, function(event: any) {
 | 
			
		||||
                // 收到群组列表更新通知,可通过遍历 event.data 获取群组列表数据并渲染到页面
 | 
			
		||||
                // event.name - TIM.EVENT.GROUP_LIST_UPDATED
 | 
			
		||||
                // event.data - 存储 Group 对象的数组 - [Group]
 | 
			
		||||
                console.log(event.data)
 | 
			
		||||
            });
 | 
			
		||||
            tim.login({userID: store.state.userinfo.memberid.toString(), userSig: userSig}).then((res: any)=>{
 | 
			
		||||
                console.log(res.data); // 登录成功
 | 
			
		||||
                if (res.data.repeatLogin === true) {
 | 
			
		||||
                    // 标识账号已登录,本次登录操作为重复登录。v2.5.1 起支持
 | 
			
		||||
                    console.log(res.data.errorInfo);
 | 
			
		||||
                }
 | 
			
		||||
               
 | 
			
		||||
            }).catch(function(imError: any) {
 | 
			
		||||
                console.warn('login error:', imError); // 登录失败的相关信息
 | 
			
		||||
            });
 | 
			
		||||
            tim.on(TIM.EVENT.SDK_READY, function (){
 | 
			
		||||
                const promise = tim.createGroup({
 | 
			
		||||
                    type: TIM.TYPES.GRP_AVCHATROOM,
 | 
			
		||||
                    name: 'live',
 | 
			
		||||
                    groupID: roominfo.value.roomid
 | 
			
		||||
                });
 | 
			
		||||
                promise.then(function(imResponse: any) { // 创建成功
 | 
			
		||||
                    console.log(imResponse.data.group); // 创建的群的资料
 | 
			
		||||
                    tim.joinGroup({
 | 
			
		||||
                        groupID:  roominfo.value.roomid,
 | 
			
		||||
                        type: TIM.TYPES.GRP_AVCHATROOM
 | 
			
		||||
                    }).then((res: any)=>{
 | 
			
		||||
                        switch (res.data.status) {
 | 
			
		||||
                            case TIM.TYPES.JOIN_STATUS_WAIT_APPROVAL: // 等待管理员同意
 | 
			
		||||
                            break;
 | 
			
		||||
                            case TIM.TYPES.JOIN_STATUS_SUCCESS: // 加群成功
 | 
			
		||||
                            console.log(res.data.group); // 加入的群组资料
 | 
			
		||||
                            break;
 | 
			
		||||
                            case TIM.TYPES.JOIN_STATUS_ALREADY_IN_GROUP: // 已经在群中
 | 
			
		||||
                            break;
 | 
			
		||||
                            default:
 | 
			
		||||
                            break;
 | 
			
		||||
                        }
 | 
			
		||||
                    }).catch((err: any)=>{
 | 
			
		||||
                        console.log(err)
 | 
			
		||||
                    })
 | 
			
		||||
                }).catch(function(imError: any) {
 | 
			
		||||
                    console.warn('createGroup error:', imError); // 创建群组失败的相关信息
 | 
			
		||||
                    tim.joinGroup({
 | 
			
		||||
                        groupID:  roominfo.value.roomid,
 | 
			
		||||
                        type: TIM.TYPES.GRP_AVCHATROOM
 | 
			
		||||
                    }).then((res: any)=>{
 | 
			
		||||
                        switch (res.data.status) {
 | 
			
		||||
                            case TIM.TYPES.JOIN_STATUS_WAIT_APPROVAL: // 等待管理员同意
 | 
			
		||||
                            break;
 | 
			
		||||
                            case TIM.TYPES.JOIN_STATUS_SUCCESS: // 加群成功
 | 
			
		||||
                            console.log(res.data.group); // 加入的群组资料
 | 
			
		||||
                            break;
 | 
			
		||||
                            case TIM.TYPES.JOIN_STATUS_ALREADY_IN_GROUP: // 已经在群中
 | 
			
		||||
                            break;
 | 
			
		||||
                            default:
 | 
			
		||||
                            break;
 | 
			
		||||
                        }
 | 
			
		||||
                    }).catch((err: any)=>{
 | 
			
		||||
                        console.log(err)
 | 
			
		||||
                    })
 | 
			
		||||
                });
 | 
			
		||||
              
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        async function fenxiang(){
 | 
			
		||||
            console.log(localStream)
 | 
			
		||||
@ -387,6 +470,46 @@ export default defineComponent({
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        function sendtext(id: number){
 | 
			
		||||
            const m = tim.createTextMessage({
 | 
			
		||||
                to: roominfo.value.roomid,
 | 
			
		||||
                conversationType: TIM.TYPES.CONV_GROUP,
 | 
			
		||||
                payload: {
 | 
			
		||||
                    text: `beelinkMuteUserId:${id},isClose:0`
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
            const promise = tim.sendMessage(m);
 | 
			
		||||
            promise.then(function(imResponse: any) {
 | 
			
		||||
                // 发送成功
 | 
			
		||||
                console.log(imResponse);
 | 
			
		||||
                message.success("发送命令成功")
 | 
			
		||||
            }).catch(function(imError: any) {
 | 
			
		||||
                // 发送失败
 | 
			
		||||
                message.error("发送命令失败")
 | 
			
		||||
                console.warn('sendMessage error:', imError);
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        function sendvol(id: number){
 | 
			
		||||
            const m = tim.createTextMessage({
 | 
			
		||||
                to: roominfo.value.roomid,
 | 
			
		||||
                conversationType: TIM.TYPES.CONV_GROUP,
 | 
			
		||||
                payload: {
 | 
			
		||||
                    text: `beelinkTurnOffTheCameraUserId:${id},isClose:1
 | 
			
		||||
0`
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
            const promise = tim.sendMessage(m);
 | 
			
		||||
            promise.then(function(imResponse: any) {
 | 
			
		||||
                // 发送成功
 | 
			
		||||
                console.log(imResponse);
 | 
			
		||||
                message.success("发送命令成功")
 | 
			
		||||
            }).catch(function(imError: any) {
 | 
			
		||||
                // 发送失败
 | 
			
		||||
                message.error("发送命令失败")
 | 
			
		||||
                console.warn('sendMessage error:', imError);
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        onMounted(async ()=>{
 | 
			
		||||
            const si = setInterval(async ()=>{
 | 
			
		||||
                if(store.state.userinfo.memberid != 0 && store.state.userinfo.memberid){
 | 
			
		||||
@ -405,7 +528,8 @@ export default defineComponent({
 | 
			
		||||
            roominfo,
 | 
			
		||||
            guanbi,
 | 
			
		||||
            visible,
 | 
			
		||||
            lan
 | 
			
		||||
            lan,
 | 
			
		||||
            sendtext
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@
 | 
			
		||||
            <VideoPlay :url="result.fileurl"></VideoPlay>
 | 
			
		||||
            <VideoCont :videoid="result.videoid"  :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
 | 
			
		||||
        </div>
 | 
			
		||||
        <VideoReview class="review"></VideoReview>
 | 
			
		||||
        <VideoReview class="review" v-if="result.status == 1"></VideoReview>
 | 
			
		||||
    </div>
 | 
			
		||||
</template>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user