Merge pull request 'xbx' (#119) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/119
This commit is contained in:
commit
10561b7a7d
@ -25,8 +25,11 @@ export default defineComponent({
|
|||||||
store.commit("login", true)
|
store.commit("login", true)
|
||||||
store.dispatch("setUserInfo");
|
store.dispatch("setUserInfo");
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
console.log('ip')
|
console.log('ip')
|
||||||
store.dispatch("getip");
|
store.dispatch("getip");
|
||||||
|
store.commit('setWlan')
|
||||||
|
len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
|
||||||
router.push("/")
|
router.push("/")
|
||||||
}
|
}
|
||||||
const zh = zhCN
|
const zh = zhCN
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { LiveList, LivelistInfo, LoginData, UserInfo } from '@/types';
|
import { LiveList, LivelistInfo, LoginData, UserInfo } from '@/types';
|
||||||
import { saveValue } from '@/utils/common';
|
import { getValue, saveValue } from '@/utils/common';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { del, get, post, put, setToken } from './base'
|
import { del, get, post, put, setToken } from './base'
|
||||||
|
|
||||||
@ -32,7 +32,8 @@ export async function loginpass(phone: string, password: string,type?: number,sm
|
|||||||
setToken();
|
setToken();
|
||||||
store.commit("login", true);
|
store.commit("login", true);
|
||||||
store.dispatch("setUserInfo");
|
store.dispatch("setUserInfo");
|
||||||
router.push("/mine/archives")
|
await router.push("/mine/archives")
|
||||||
|
location.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -44,7 +45,9 @@ export async function userinfo(){
|
|||||||
const user = await get<UserInfo>('personalInfo');
|
const user = await get<UserInfo>('personalInfo');
|
||||||
// console.log(user.data.img)
|
// console.log(user.data.img)
|
||||||
if(user.code == 1001){
|
if(user.code == 1001){
|
||||||
|
saveValue("token","")
|
||||||
router.push("/")
|
router.push("/")
|
||||||
|
|
||||||
return '未登录';
|
return '未登录';
|
||||||
}
|
}
|
||||||
return user.data;
|
return user.data;
|
||||||
@ -636,9 +639,9 @@ export async function editsystemsetting(e?: any): Promise<boolean> {
|
|||||||
const res = await put(`member/${store.state.userinfo.memberid}`,newdata);
|
const res = await put(`member/${store.state.userinfo.memberid}`,newdata);
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
location.reload();
|
|
||||||
message.success("修改成功")
|
message.success("修改成功")
|
||||||
store.dispatch("setUserInfo");
|
store.dispatch("setUserInfo");
|
||||||
|
location.reload();
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
message.error(res.msg);
|
message.error(res.msg);
|
||||||
@ -792,6 +795,7 @@ interface LiveInfo {
|
|||||||
deleted_at: null;
|
deleted_at: null;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
|
livestatus: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StudentList {
|
interface StudentList {
|
||||||
@ -943,12 +947,14 @@ export async function liveinfo(id: number): Promise<any>{
|
|||||||
dateline: liveinfo.dateline,
|
dateline: liveinfo.dateline,
|
||||||
livetime: liveinfo.livetime,
|
livetime: liveinfo.livetime,
|
||||||
livenumber: liveinfo.livenumber,
|
livenumber: liveinfo.livenumber,
|
||||||
desc: liveinfo.desc
|
desc: liveinfo.desc,
|
||||||
|
status: liveinfo.status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setlive(data: any){
|
export async function setlive(data: any){
|
||||||
data.status = data.livestatus;
|
// data.status = data.livestatus;
|
||||||
|
console.log(data)
|
||||||
const info = await put("live/" + data.id, data)
|
const info = await put("live/" + data.id, data)
|
||||||
console.log(info.data)
|
console.log(info.data)
|
||||||
if(info.code==0){
|
if(info.code==0){
|
||||||
@ -1008,11 +1014,21 @@ export async function luzhi(roomid: string){
|
|||||||
export async function getaddr() {
|
export async function getaddr() {
|
||||||
const res = await get<any>('ip');
|
const res = await get<any>('ip');
|
||||||
const gj = res.data.address.split("|")[0];
|
const gj = res.data.address.split("|")[0];
|
||||||
if(gj == "CN"){
|
const lan = getValue("Lanvuage");
|
||||||
return ["zh", "中文", '人民币¥'];
|
if(lan != null && lan){
|
||||||
}else {
|
if(gj == "CN"){
|
||||||
return ['en', 'English', '美元$']
|
return ['人民币¥'];
|
||||||
|
}else {
|
||||||
|
return [ '美元$']
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(gj == "CN"){
|
||||||
|
return ["zh", "中文", '人民币¥'];
|
||||||
|
}else {
|
||||||
|
return ['en', 'English', '美元$']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// export async function StopMCUMixTranscode(roomid: number) {
|
// export async function StopMCUMixTranscode(roomid: number) {
|
||||||
|
@ -209,6 +209,7 @@ import { useRoute } from 'vue-router';
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
import { setLanvuage } from '@/api/base';
|
import { setLanvuage } from '@/api/base';
|
||||||
|
import { saveValue } from '@/utils/common';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props:{
|
props:{
|
||||||
@ -306,7 +307,7 @@ export default defineComponent({
|
|||||||
languagelist.value=await getlanguages()
|
languagelist.value=await getlanguages()
|
||||||
console.log(routes.path)
|
console.log(routes.path)
|
||||||
nowroute.value=routes.path
|
nowroute.value=routes.path
|
||||||
lan.locale.value = userinfo.value.languageValue
|
// lan.locale.value = userinfo.value.languageValue
|
||||||
})
|
})
|
||||||
|
|
||||||
function zonechange(e?: any){
|
function zonechange(e?: any){
|
||||||
@ -322,7 +323,9 @@ export default defineComponent({
|
|||||||
if(store.state.islogin){
|
if(store.state.islogin){
|
||||||
editsystemsetting({language:e})
|
editsystemsetting({language:e})
|
||||||
}else {
|
}else {
|
||||||
setLanvuage(e)
|
saveValue("Lanvuage", e)
|
||||||
|
location.reload();
|
||||||
|
// setLanvuage(e)
|
||||||
}
|
}
|
||||||
lan.locale.value = e
|
lan.locale.value = e
|
||||||
|
|
||||||
|
@ -23,14 +23,20 @@
|
|||||||
<span>{{lan.$t('zhuangtai')}}</span>
|
<span>{{lan.$t('zhuangtai')}}</span>
|
||||||
<span class="status">{{lan.$t('shenheing')}}</span>
|
<span class="status">{{lan.$t('shenheing')}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="item item1" v-if="status==1">
|
||||||
|
<span>{{lan.$t('zhuangtai')}}</span>
|
||||||
|
<span class="status1">{{lan.$t('shenheing')}}</span>
|
||||||
|
|
||||||
|
</div> -->
|
||||||
<div class="item item1" v-if="status==2">
|
<div class="item item1" v-if="status==2">
|
||||||
<span>{{lan.$t('zhuangtai')}}</span>
|
<span>{{lan.$t('zhuangtai')}}</span>
|
||||||
<span class="status1">{{lan.$t('shenheweitongguo')}}</span>
|
<span class="status1" style="color: #D12C2E">{{lan.$t('shenheweitongguo')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item item1" v-if="status==1">
|
<div class="item item1" v-if="status==2">
|
||||||
<span style="flex-shrink:0">{{lan.$t('yuanyin')}}</span>
|
<span style="flex-shrink:0">{{lan.$t('yuanyin')}}</span>
|
||||||
<span class="status"> {{lan.$t('yuanyintext')}} </span>
|
<span> {{lan.$t('yuanyintext')}} </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="button">
|
<div class="button">
|
||||||
<div class="modify" @click="update(videoid)">{{lan.$t('xiugaishipin')}}</div>
|
<div class="modify" @click="update(videoid)">{{lan.$t('xiugaishipin')}}</div>
|
||||||
|
@ -2,6 +2,7 @@ import { getValue } from '@/utils/common';
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
axios.defaults.baseURL = 'https://case.sy-my.net/beelink/public/home/';
|
axios.defaults.baseURL = 'https://case.sy-my.net/beelink/public/home/';
|
||||||
axios.defaults.headers.common['Authorization'] = "Bearer " + getValue("token");
|
axios.defaults.headers.common['Authorization'] = "Bearer " + getValue("token");
|
||||||
|
axios.defaults.headers.common['Language'] = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
|
||||||
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||||
|
|
||||||
export default axios
|
export default axios
|
@ -10,10 +10,10 @@ getset().then((res: any)=>{
|
|||||||
en.shichangtishi = `Minimum ${res.lowerLimit} person, maximum ${res.numberCeiling} people`
|
en.shichangtishi = `Minimum ${res.lowerLimit} person, maximum ${res.numberCeiling} people`
|
||||||
zh.tixianzhu = `注:每笔提现收取${res.sxf}服务费,最低${ res.symbol + res.minmoney }`
|
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 }`
|
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 i18n = geti18n();
|
||||||
const loc = i18n.locale.value;
|
// const loc = i18n.locale.value;
|
||||||
i18n.locale.value = '';
|
// i18n.locale.value = '';
|
||||||
i18n.locale.value = loc;
|
// i18n.locale.value = loc;
|
||||||
console.log('i18n')
|
console.log('i18n')
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { getaddr, userinfo } from '@/api';
|
import { getaddr, userinfo } from '@/api';
|
||||||
|
import { setLanvuage } from '@/api/base';
|
||||||
|
import { getValue, saveValue } from '@/utils/common';
|
||||||
import { isProxy } from 'vue';
|
import { isProxy } from 'vue';
|
||||||
import { createStore } from 'vuex'
|
import { createStore } from 'vuex'
|
||||||
|
|
||||||
@ -63,10 +65,32 @@ export default createStore({
|
|||||||
setLanguage(state, data){
|
setLanguage(state, data){
|
||||||
const split = new Date().toString().split(" ");
|
const split = new Date().toString().split(" ");
|
||||||
const timeZoneFormatted = split[split.length - 2] + " " + split[split.length - 1];
|
const timeZoneFormatted = split[split.length - 2] + " " + split[split.length - 1];
|
||||||
state.userinfo.language = data[1] // English 中文
|
const lan = getValue("Lanvuage");
|
||||||
state.userinfo.languageValue = data[0] // 'en' 'zh'
|
if(lan != null && lan){
|
||||||
state.userinfo.zoneStr = timeZoneFormatted;
|
// state.userinfo.language = data[1] // English 中文
|
||||||
state.userinfo.currency = data[2];
|
// state.userinfo.languageValue = data[0] // 'en' 'zh'
|
||||||
|
state.userinfo.zoneStr = timeZoneFormatted;
|
||||||
|
state.userinfo.currency = data[0];
|
||||||
|
}else{
|
||||||
|
console.log(data, 111)
|
||||||
|
state.userinfo.language = data[1] // English 中文
|
||||||
|
state.userinfo.languageValue = data[0] // 'en' 'zh'
|
||||||
|
state.userinfo.zoneStr = timeZoneFormatted;
|
||||||
|
state.userinfo.currency = data[2];
|
||||||
|
saveValue("Lanvuage", data[0]);
|
||||||
|
if( data[0] != 'zh'){
|
||||||
|
location.reload()
|
||||||
|
}
|
||||||
|
// setLanvuage(data[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
setWlan(state){
|
||||||
|
const lan = getValue("Lanvuage");
|
||||||
|
if(lan != null && lan){
|
||||||
|
state.userinfo.languageValue = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
|
||||||
|
state.userinfo.language = (!getValue("Lanvuage") ? 'zh' : getValue("Lanvuage")) == 'zh' ? '中文' : 'English';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -224,12 +224,13 @@ export default defineComponent({
|
|||||||
|
|
||||||
function sublogin(){
|
function sublogin(){
|
||||||
console.log(11)
|
console.log(11)
|
||||||
|
// else if(!(/^1[3-9]\d{9}$/.test(phone.value))){
|
||||||
|
// message.error(lan.$t('shoujihaoyouwu'));
|
||||||
|
// return
|
||||||
|
// }
|
||||||
if(phone.value==''){
|
if(phone.value==''){
|
||||||
message.error(lan.$t('shoujihaoweikong'))
|
message.error(lan.$t('shoujihaoweikong'))
|
||||||
return
|
return
|
||||||
}else if(!(/^1[3-9]\d{9}$/.test(phone.value))){
|
|
||||||
message.error(lan.$t('shoujihaoyouwu'));
|
|
||||||
return
|
|
||||||
} else if(code.value==""){
|
} else if(code.value==""){
|
||||||
// console.log(phone.value)
|
// console.log(phone.value)
|
||||||
console.log((/^1[3-9]\d{9}$/.test(phone.value)))
|
console.log((/^1[3-9]\d{9}$/.test(phone.value)))
|
||||||
|
@ -551,9 +551,7 @@ export default defineComponent({
|
|||||||
watch(userinfo, () => {
|
watch(userinfo, () => {
|
||||||
formData.value = toRaw(userinfo.value);
|
formData.value = toRaw(userinfo.value);
|
||||||
// console.log(lan.$s(), formData.value.languageValue)
|
// console.log(lan.$s(), formData.value.languageValue)
|
||||||
if(lan.$s() != formData.value.languageValue){
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
console.log(userinfo.value.currencyValue, "listsssss");
|
console.log(userinfo.value.currencyValue, "listsssss");
|
||||||
currencyindex.value = userinfo.value.currency;
|
currencyindex.value = userinfo.value.currency;
|
||||||
console.log(currencyindex.value, "listsssss");
|
console.log(currencyindex.value, "listsssss");
|
||||||
@ -885,7 +883,10 @@ export default defineComponent({
|
|||||||
// console.log(zonelist.value[i].city + zonelist.value[i].gmt, uesrinfo.zoneStr)
|
// console.log(zonelist.value[i].city + zonelist.value[i].gmt, uesrinfo.zoneStr)
|
||||||
}
|
}
|
||||||
if (reg.test(userinfo.value.email)) {
|
if (reg.test(userinfo.value.email)) {
|
||||||
putmember(uesrinfo);
|
await putmember(uesrinfo);
|
||||||
|
if(lan.$s() != uesrinfo.languageValue){
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
message.error(lan.$t('youxiangcuowu'));
|
message.error(lan.$t('youxiangcuowu'));
|
||||||
}
|
}
|
||||||
|
@ -13,27 +13,19 @@
|
|||||||
<div class="LivePlaying">
|
<div class="LivePlaying">
|
||||||
<LivePlaying></LivePlaying>
|
<LivePlaying></LivePlaying>
|
||||||
<div class="comment">
|
<div class="comment">
|
||||||
<div class="commentitem">
|
<div class="commentitem" v-for="(item,index) in imlist" :key="index">
|
||||||
<span>13:32:30</span>
|
<span>{{item.time}}</span>
|
||||||
<span class="name"> Andy : </span>
|
<span class="name"> {{item.name}} : </span>
|
||||||
<span> 老师,这个部分可以讲的慢一些吗? </span>
|
<span> {{item.text}} </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="commentitem">
|
|
||||||
<span>13:32:30</span>
|
|
||||||
<span class="name"> Andy : </span>
|
|
||||||
<span> 老师,这个部分可以讲的慢一些吗? </span>
|
|
||||||
</div>
|
|
||||||
<div class="commentitem">
|
|
||||||
<span>13:32:30</span>
|
|
||||||
<span class="name"> Andy : </span>
|
|
||||||
<span> 老师,这个部分可以讲的慢一些吗? </span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="others">
|
<div class="others">
|
||||||
<div :id="'s-' + item.memberid" class="othersitem" v-for="(item, index) in roominfo.studentlist" :key="index">
|
<div 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>
|
||||||
|
<div class="sbox" :id="'s-' + item.memberid"></div>
|
||||||
<!-- <img src="" alt="" /> -->
|
<!-- <img src="" alt="" /> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="othersitem">
|
<!-- <div class="othersitem">
|
||||||
@ -104,7 +96,7 @@
|
|||||||
margin-top: 29px;
|
margin-top: 29px;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
overflow-y: auto;
|
||||||
color: #121212;
|
color: #121212;
|
||||||
|
|
||||||
.commentitem {
|
.commentitem {
|
||||||
@ -185,6 +177,10 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
.sbox{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -200,6 +196,7 @@ import store from '@/store';
|
|||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
import TIM from 'tim-js-sdk';
|
import TIM from 'tim-js-sdk';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
@ -310,7 +307,7 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const imlist = ref<any>([])
|
||||||
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");
|
||||||
@ -329,18 +326,47 @@ export default defineComponent({
|
|||||||
userId: store.state.userinfo.memberid,
|
userId: store.state.userinfo.memberid,
|
||||||
userSig: userSig
|
userSig: userSig
|
||||||
});
|
});
|
||||||
|
// 监听远端开启推流
|
||||||
client.on('stream-added', (event: { stream: any }) => {
|
client.on('stream-added', (event: { stream: any }) => {
|
||||||
const remoteStream = event.stream;
|
const remoteStream = event.stream;
|
||||||
console.log('远端流增加: ' + remoteStream.getId());
|
console.log('远端流增加: ' + remoteStream.getId());
|
||||||
//订阅远端流
|
//订阅远端流
|
||||||
client.subscribe(remoteStream);
|
client.subscribe(remoteStream);
|
||||||
});
|
});
|
||||||
|
// 远端流初始化成功 本地播放
|
||||||
client.on('stream-subscribed', (event: { stream: any }) => {
|
client.on('stream-subscribed', (event: { stream: any }) => {
|
||||||
const remoteStream = event.stream;
|
const remoteStream = event.stream;
|
||||||
console.log(remoteStream);
|
console.log(remoteStream);
|
||||||
// 播放远端流
|
// 播放远端流
|
||||||
|
const el = document.querySelector('#s-' + remoteStream.userId_);
|
||||||
|
if(el){
|
||||||
|
el.innerHTML = ""
|
||||||
|
}
|
||||||
remoteStream.play('s-' + remoteStream.userId_);
|
remoteStream.play('s-' + remoteStream.userId_);
|
||||||
});
|
});
|
||||||
|
// 远端关闭麦克风
|
||||||
|
client.on('mute-audio', (event: any) => {
|
||||||
|
const userId = event.userId;
|
||||||
|
console.log(userId, '远端关闭麦克风')
|
||||||
|
});
|
||||||
|
// 远端关闭摄像头
|
||||||
|
client.on('mute-video', (event: any) => {
|
||||||
|
const userId = event.userId;
|
||||||
|
console.log(userId, '远端关闭摄像头')
|
||||||
|
|
||||||
|
});
|
||||||
|
// 远端打开麦克风
|
||||||
|
client.on('unmute-audio', (event: any) => {
|
||||||
|
const userId = event.userId;
|
||||||
|
console.log(userId, '远端打开麦克风')
|
||||||
|
|
||||||
|
});
|
||||||
|
// 远端打开摄像头
|
||||||
|
client.on('unmute-video', (event: any) => {
|
||||||
|
const userId = event.userId;
|
||||||
|
console.log(userId, '远端打开摄像头')
|
||||||
|
|
||||||
|
});
|
||||||
client
|
client
|
||||||
.join({ roomId: roominfo.value.roomid})
|
.join({ roomId: roominfo.value.roomid})
|
||||||
.catch((error: string) => {
|
.catch((error: string) => {
|
||||||
@ -356,7 +382,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
// im 初始化
|
// im 初始化
|
||||||
tim = TIM.create({
|
tim = TIM.create({
|
||||||
SDKAppID: 1400400340
|
SDKAppID: 1400435767
|
||||||
}); // SDK 实例通常用 tim 表示
|
}); // SDK 实例通常用 tim 表示
|
||||||
tim.setLogLevel(0);
|
tim.setLogLevel(0);
|
||||||
tim.on(TIM.EVENT.MESSAGE_RECEIVED, function(event: any) {
|
tim.on(TIM.EVENT.MESSAGE_RECEIVED, function(event: any) {
|
||||||
@ -365,6 +391,19 @@ export default defineComponent({
|
|||||||
// event.data - 存储 Message 对象的数组 - [Message]
|
// event.data - 存储 Message 对象的数组 - [Message]
|
||||||
for(const i in event.data){
|
for(const i in event.data){
|
||||||
console.log(event.data[i])
|
console.log(event.data[i])
|
||||||
|
const now = dayjs(event.data[i].time)
|
||||||
|
if(!event.data[i].payload.text){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
imlist.value.push({
|
||||||
|
name: event.data[i].nick,
|
||||||
|
text: event.data[i].payload.text,
|
||||||
|
time: `${now.hour()}:${now.minute()}:${now.second()}`
|
||||||
|
})
|
||||||
|
const div = document.querySelector(".comment")
|
||||||
|
if(div){
|
||||||
|
div.scrollTop = div.scrollHeight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
tim.on(TIM.EVENT.GROUP_LIST_UPDATED, function(event: any) {
|
tim.on(TIM.EVENT.GROUP_LIST_UPDATED, function(event: any) {
|
||||||
@ -529,7 +568,8 @@ export default defineComponent({
|
|||||||
guanbi,
|
guanbi,
|
||||||
visible,
|
visible,
|
||||||
lan,
|
lan,
|
||||||
sendtext
|
sendtext,
|
||||||
|
imlist
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template v-if="!teacherlikedlist.total">
|
<template v-if="!teacherlikedlist.length">
|
||||||
<a-empty />
|
<a-empty />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,10 +28,10 @@
|
|||||||
<div class="row" v-for="(item,index) in month.date" :key="index">
|
<div class="row" v-for="(item,index) in month.date" :key="index">
|
||||||
<div v-for="(i,j) in item" :key="j">
|
<div v-for="(i,j) in item" :key="j">
|
||||||
<div class="day">
|
<div class="day">
|
||||||
<div :class="{ing: yue == 0 && month.day == i.day,old: (yue < 0 || (yue == 0 && month.day > i.day)) && i.list.length != 0 ,next: (yue > 0 || (yue == 0 && month.day < i.day)) && i.list.length != 0 }" @click="navto(i.time)">
|
<div :class="{ing:i.s == 1, old: i.s == 2 ,next: i.s == 0 }" @click="navto(i.time)">
|
||||||
{{i.day}}
|
{{i.day}}
|
||||||
<div class="item" v-for="(i,j) in i.list" :key="j">
|
<div class="item" @click.stop="gotolive(i.id, i.statit)" v-for="(i,j) in i.list" :key="j">
|
||||||
<div></div><p>{{i}}</p>
|
<div></div><p>{{i.title}}</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- <span class="ing"></span> -->
|
<!-- <span class="ing"></span> -->
|
||||||
<!-- <span class="next"></span> -->
|
<!-- <span class="next"></span> -->
|
||||||
@ -218,7 +218,12 @@ export default defineComponent({
|
|||||||
if(month.value.date[j][k].list == undefined){
|
if(month.value.date[j][k].list == undefined){
|
||||||
month.value.date[j][k].list = [];
|
month.value.date[j][k].list = [];
|
||||||
}
|
}
|
||||||
month.value.date[j][k].list.push(res[i].title);
|
if(!month.value.date[j][k].s){
|
||||||
|
month.value.date[j][k].s = res[i].livestatus
|
||||||
|
}else if(month.value.date[j][k].s != 1){
|
||||||
|
res[i].livestatus == 0 && month.value.date[j][k].s == 2 ? month.value.date[j][k].s = 0 : month.value.date[j][k].s = 2
|
||||||
|
}
|
||||||
|
month.value.date[j][k].list.push({title: res[i].title, id: res[i].liveid, statit: res[i].livestatus});
|
||||||
console.log(day)
|
console.log(day)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -245,13 +250,25 @@ export default defineComponent({
|
|||||||
function navto(date: string){
|
function navto(date: string){
|
||||||
router.push("/regime/week?time=" + (!date? '' : date) )
|
router.push("/regime/week?time=" + (!date? '' : date) )
|
||||||
}
|
}
|
||||||
|
function gotolive(id: string, s: number){
|
||||||
|
let url = '';
|
||||||
|
switch (s) {
|
||||||
|
case 1:
|
||||||
|
url = '/regime/liveing';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
url = '/regime/livedetail';
|
||||||
|
}
|
||||||
|
router.push({path: url,query: { id: id }})
|
||||||
|
}
|
||||||
getdates(userid.value);
|
getdates(userid.value);
|
||||||
return {
|
return {
|
||||||
month,
|
month,
|
||||||
xia,
|
xia,
|
||||||
shang,
|
shang,
|
||||||
yue,
|
yue,
|
||||||
navto
|
navto,
|
||||||
|
gotolive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user