Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into zj

This commit is contained in:
asd
2020-10-30 15:49:12 +08:00
8 changed files with 139 additions and 13 deletions

View File

@@ -119,6 +119,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>
</a-form-item>
<a-form-item
:label="lan.$t('zhiborenshu')"
@@ -130,6 +131,8 @@
:placeholder="lan.$t('shuruzhiborenshu')"
type="number"
/>
<div style="color: red;font-size: 0.12rem;line-height: 1.3;">*最少1人, 最多4人</div>
</a-form-item>
<a-form-item :label="lan.$t('zhibojianjie')" class="brief">
<a-textarea
@@ -349,8 +352,15 @@ export default defineComponent({
message.error(lan.$t('zhibojianjieweikong'));
return;
} else {
if (lives.value.status == 0) {
if(subdata.livetime < 30 || subdata.livetime > 120){
message.error("直播时长最短30min, 最长120min");
return ;
}
if(subdata.livenumber > 4 || subdata.livenumber < 1){
message.error("直播人数最少1人, 最多4人");
return ;
}
if (!lives.value.status) {
// subdata.fileid=picinfo.
if (id != undefined && id) {
/**

View File

@@ -194,7 +194,7 @@ import { defineComponent, onMounted, ref } from "vue";
import LivePlaying from "@/components/LivePlaying.vue";
import LiveingWatcher from "@/components/LiveingWatcher.vue";
import TRTC from "trtc-js-sdk"
import { getliveinfo, usersig } from '@/api';
import { getliveinfo, livestop, luzhi, usersig } from '@/api';
import { useRoute } from 'vue-router';
import store from '@/store';
import { message } from 'ant-design-vue';
@@ -340,12 +340,15 @@ export default defineComponent({
remoteStream.play('s-' + remoteStream.userId_);
});
client
.join({ roomId: 12 })
.join({ roomId: roominfo.value.roomid})
.catch((error: string) => {
console.error('进房失败 ' + error);
})
.then(() => {
console.log('进房成功');
// if(typeof id == "string"){
luzhi(roominfo.value.roomid)
// }
fun()
});
}
@@ -376,7 +379,9 @@ export default defineComponent({
client.leave().then(() => {
// leaving room success
visible.value = false;
if(typeof id == "string"){
livestop(id, roominfo.value.roomid)
}
}).catch((error: string) => {
message.error(lan.$t('guanbishibai')+':' + error);
});

View File

@@ -39,14 +39,14 @@
</div>
<div class="body">
<div class="row" v-for="item in 24" :key="item">
<div class="day date">
<div class="day date" :style="{'background-color': item - 1 == xs ? '#0DBBA4' : '', 'color': item - 1 == xs ? '#fff' : ''}">
{{ item > 10 ? item - 1 : "0" + (item - 1) }}:00-{{
item > 9 ? item : "0" + item
}}:00
</div>
<div v-for="i in 7" :key="i">
<div v-for="i in 7" :key="i" >
<div class="day">
<div :class="zhuangtai(week.date[i -1].list[item - 1].zhuangtai)" v-if="week.date[i -1].list[item - 1].title != ''">
<div :class="zhuangtai(week.date[i -1].list[item - 1].zhuangtai)" v-if="week.date[i -1].list[item - 1].title != ''" :style="{'top': (week.date[i -1].list[item - 1].start / 60 * 0.63) + 'rem', 'min-height': (week.date[i -1].list[item - 1].num / 60 * 0.63) + 'rem' }">
<div class="one-line-hide" style="max-width: 1.5rem">
{{week.date[i -1].list[item - 1].title}}
</div>
@@ -55,6 +55,13 @@
</div>
</div>
</div>
<div class="lien" :style="{'top': top + 'rem'}">
<div class="heng">
<div class="dian"></div>
<div class="xian"></div>
</div>
<div class="times">{{times}}</div>
</div>
</div>
</div>
</div>
@@ -64,6 +71,7 @@
display: flex;
flex-direction: column;
align-items: center;
.head {
width: 1320px;
height: 57px;
@@ -144,6 +152,8 @@
}
.body {
width: 100%;
overflow: hidden;
position: relative;
.row {
background-color: #fff;
height: 63px;
@@ -165,8 +175,9 @@
display: flex;
flex-direction: column;
color: #111;
position: relative;
> div {
position: absolute;
min-height: 100%;
width: 100%;
border-radius: 6px;
@@ -202,6 +213,32 @@
border: unset;
}
}
.lien{
width: 100%;
position: absolute;
top: 0;
left: 128px;
.heng{
display: flex;
align-items: center;
}
.dian{
width: 6px;
height: 6px;
flex-shrink: 0;
background-color: #FFFA18;
border-radius: 50%;
}
.xian{
width: 100%;
height: 2px;
background: linear-gradient(90deg, #FFFA18, #D0EB3D, #87E062, #42DE9D, #00DAC2);
}
}
.times{
font-size: 11px;
color: #FFFA18;
}
}
}
}
@@ -212,6 +249,7 @@ import { getDay, gethour, getminute, gettime, getweek } from "@/utils/date";
import store from '@/store';
import { getdatelist, userinfo } from '@/api';
import router from '@/router';
import dayjs from 'dayjs';
export default defineComponent({
props: {},
@@ -244,6 +282,18 @@ export default defineComponent({
getdates(userid);
const top = ref(0);
const times = ref('');
const xs = ref(0);
setInterval(()=>{
const now = dayjs();
const xiaoshi = now.month()
const fenzhong = now.minute()
top.value = (xiaoshi + (fenzhong / 60)) * 0.63;
times.value = (xiaoshi > 10 ? xiaoshi : '0' + xiaoshi) + ":" + (fenzhong > 10 ? fenzhong : '0' + fenzhong);
xs.value = xiaoshi;
}, 2000)
watch(zhou, (value) => {
week.value = getweek(value);
console.log(week.value);
@@ -269,7 +319,10 @@ export default defineComponent({
zhou,
week,
navto,
zhuangtai
zhuangtai,
top,
times,
xs
};
},
});