Merge pull request 'xbx' (#122) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/122
This commit is contained in:
luyuan 2020-11-10 18:01:58 +08:00
commit 11d6ff4be4
21 changed files with 153 additions and 51 deletions

View File

@ -21,6 +21,7 @@ export default defineComponent({
setup(){
console.log(i18ninit)
const len = provideI18n(i18ninit);
len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
if(getValue('token')){
store.commit("login", true)
store.dispatch("setUserInfo");
@ -29,7 +30,6 @@ export default defineComponent({
console.log('ip')
store.dispatch("getip");
store.commit('setWlan')
len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
router.push("/")
}
const zh = zhCN

View File

@ -36,7 +36,7 @@
<style lang="scss" scoped>
.videoitem{
width: 226px;
height: 198px;
// height: 198px;
background-color: #fff;
border-radius: 17px;
overflow: hidden;

View File

@ -9,7 +9,7 @@
</div>
<div>
<img src="@/static/images/livewatch.png" alt="" class="icon">
<span>{{info.dateline}}</span>
<span>{{info.tlanguage}}</span>
</div>
<div>
<img src="@/static/images/livetimetake.png" alt="" class="icon">
@ -17,7 +17,7 @@
</div>
<div>
<img src="@/static/images/shoucang.png" alt="" class="icon">
<span class="score">5.0{{lan.$t('fen')}}</span>
<span class="score">{{info.score}}{{lan.$t('fen')}}</span>
</div>
</div>
<div style="display: flex">

View File

@ -320,14 +320,14 @@ export default defineComponent({
}
function setlanguage(e?: any){
console.log(e)
saveValue("Lanvuage", e)
if(store.state.islogin){
editsystemsetting({language:e})
}else {
saveValue("Lanvuage", e)
location.reload();
// setLanvuage(e)
}
lan.locale.value = e
// lan.locale.value = e
}
function toindex(){

View File

@ -34,7 +34,7 @@
</div>
<div class="item item1" v-if="status==2">
<span style="flex-shrink:0">{{lan.$t('yuanyin')}}</span>
<span> {{lan.$t('yuanyintext')}} </span>
<span> {{yuanyin}} </span>
</div>
</div>
@ -129,20 +129,23 @@ import { useRoute } from 'vue-router';
export default defineComponent({
props:{
date:{
date: {
type:String
},
watch:{
watch: {
type:Number
},
share:{
share: {
type:Number
},
status:{
status: {
type:Number
},
videoid:{
videoid: {
type:Number
},
yuanyin: {
type: String
}
},
setup(){

View File

@ -37,7 +37,7 @@
<style lang="scss" scoped>
.videoitem{
width: 226px;
height: 198px;
// height: 198px;
background-color: #fff;
border-radius: 17px;
overflow: hidden;

View File

@ -1,5 +1,5 @@
<template>
<div class="review">
<div class="review" v-if="reviewlist.data.length != 0">
<div class="top">
<div class="title">
{{lan.$t('shipinpingjia')}}

View File

@ -83,7 +83,7 @@ export default {
xiugai: "modify",
shuruxinnicheng: "Please enter a new nickname",
jibenxinxi: "Basic information",
laiziguojia: "From the country",
laiziguojia: "From a country or region",
juzhudi: "Place of residence",
shurujuzhudi: "Enter residence",
wohaihuishuo: "I would also say",
@ -297,6 +297,8 @@ export default {
shensu:"Appeal",
querenquxiao: "Are you sure to cancel the live broadcast?",
tianjiatixian: "Add a withdrawal account",
shijirenshu: "Actual number of live broadcast",
shijishichang: "Actual live broadcast duration",
shichangtishi:"",
renshutishi: '',
tixianzhu: "",

View File

@ -83,7 +83,7 @@ export default {
xiugai:"修改",
shuruxinnicheng:"请输入新的昵称",
jibenxinxi:"基本信息",
laiziguojia:"来自国家",
laiziguojia:"来自国家或地区",
juzhudi:"居住地",
shurujuzhudi:"输入居住地",
wohaihuishuo:"我还会说",
@ -297,6 +297,8 @@ export default {
shensu:"申诉",
querenquxiao: "您确认取消直播吗?",
tianjiatixian: "添加提现账户",
shijirenshu: "实际直播人数",
shijishichang: "实际直播时长",
shichangtishi:"",
renshutishi: '',
tixianzhu:"",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -53,3 +53,37 @@ export function getValue(key: string): any{
}
return value;
}
/**
*
* @param name
*/
export function provenimg(name: string): boolean{
const type = ['png', 'jpg'];
const ntypearr = name.split('.');
const ntype = ntypearr[ntypearr.length - 1];
for(const i in type){
if(type[i] == ntype){
return true;
}
}
return false;
}
/**
*
* @param name
*/
export function provenvideo(name: string): boolean{
const type = ['flv', 'mp4'];
const ntypearr = name.split('.');
const ntype = ntypearr[ntypearr.length - 1];
for(const i in type){
if(type[i] == ntype){
return true;
}
}
return false;
}

View File

@ -124,6 +124,7 @@ import store from '@/store';
import router from '@/router';
import { useI18n } from '@/utils/i18n';
import { editsystemsetting, getlanguages } from '@/api';
import { saveValue } from '@/utils/common';
export default defineComponent({
components: {
NavBottom
@ -153,8 +154,13 @@ export default defineComponent({
}
function setlanguage(e?: any){
console.log(e)
editsystemsetting({language:e})
lan.locale.value = e
saveValue("Lanvuage", e)
if(store.state.islogin){
editsystemsetting({language:e})
}else {
location.reload();
// setLanvuage(e)
}
}
return {
languagelist,

View File

@ -23,16 +23,17 @@
>
<a-input-group compact>
<a-select
:default-value="quhaolist[0].code"
:default-value="quhaolist[0].name + '+' + quhaolist[0].code"
size="small"
@change="getquhao"
class="getcode"
style="width: 50%"
show-search
>
<a-select-option
v-for="(i, j) in quhaolist"
:key="j"
:value="i.code"
:value="i.name + '+' + i.code"
>
{{ i.name }}+{{ i.code }}
</a-select-option>

View File

@ -119,6 +119,7 @@
index) in chiveslist[1]"
:key="index"
:value="item.name"
:disabled="isdisabled(item.name)"
>
{{ item.name }}
</a-select-option>
@ -228,7 +229,7 @@
</div>
<div class="input-box phone-box">
<div class="label">{{ lan.$t("shoujihao") }}</div>
<div class="phone">{{ userinfo.mobile }}</div>
<div class="phone">{{ userinfo.code }}{{ userinfo.mobile }}</div>
<div class="update-btn" @click="togglePhoneModal(true)">
{{ lan.$t("genghuanshoujihao") }}
</div>
@ -522,6 +523,7 @@ import {
} from "@/api/index";
import { message } from "ant-design-vue";
import { useI18n } from "@/utils/i18n";
import { provenvideo } from '@/utils/common';
export default defineComponent({
name: "Archives",
@ -908,6 +910,7 @@ export default defineComponent({
}
const uploadprogress: Ref<number> = ref(0);
async function uploads(file: AntUpload) {
uploadprogress.value = 0;
const res = await uploadflie(file.file, (info: any) => {
@ -929,9 +932,20 @@ export default defineComponent({
function choosewillsay(e?: any) {
console.log(formData.value.willsayValue);
console.log(e);
}
function isdisabled(name: string){
for(const i in formData.value.willsay){
if(formData.value.willsay[i].name == name){
return true;
}else{
return false;
}
}
}
function currencychange(e?: any) {
console.log(e);
userinfo.value.currencyValue = e;
@ -948,6 +962,15 @@ export default defineComponent({
// picinfo.url=res.video.url
formData.value.img = res.video.url;
}
function beforeVideoUpload(file: any){
console.log(file)
const type = provenvideo(file.name);
if(!type){
message.error("文件类型错误,请重新选择")
}
return false;
}
// function selguojia(e: any){
// userinfo.value.countryValue = e;
// console.log(e)
@ -994,7 +1017,9 @@ export default defineComponent({
showname,
uploadspic,
lan,
interestslist
interestslist,
isdisabled,
beforeVideoUpload
};
},
});
@ -1055,7 +1080,7 @@ export default defineComponent({
align-items: center;
margin-bottom: 28px;
.label {
width: 60px;
width: 90px;
font-size: 11px;
font-weight: 500;
color: #808080;

View File

@ -131,7 +131,7 @@
import { defineComponent, onMounted, reactive, Ref, ref, toRaw } from "vue";
import { PlaySquareOutlined, PlusOutlined } from "@ant-design/icons-vue";
import NavBottom from "@/components/NavBottom.vue";
import { previewCover } from "@/utils/common";
import { previewCover, provenimg } from "@/utils/common";
import { FromSend, ImgInfo, VideoInfo } from "@/types";
import { uploadflie } from "@/utils/vod";
import { setvideo, videoadd, videodetail } from "@/api";
@ -191,6 +191,10 @@ export default defineComponent({
*/
const beforeCoverUpload = (file: File): boolean => {
console.log(file);
const type = provenimg(file.name);
if(!type){
message.error("请重新选择")
}
return false;
};

View File

@ -31,7 +31,15 @@
<div class="infoitem" v-if="accountinfo.type != 2">
<div class="left">{{lan.$t('laiyuan')}}</div>
<div class="right">{{accountinfo.sourcetitle}}</div>
<div class="right" style="cursor:pointer" @click="toinfo(accountinfo.source)">{{accountinfo.sourcetitle}}</div>
</div>
<div class="infoitem" v-if="accountinfo.type != 2">
<div class="left">{{lan.$t('shijishichang')}}</div>
<div class="right">{{accountinfo.livetime}}</div>
</div>
<div class="infoitem" v-if="accountinfo.type != 2">
<div class="left">{{lan.$t('shijirenshu')}}</div>
<div class="right">{{accountinfo.count}}</div>
</div>
<div class="back" @click="navto(1,2)">{{lan.$t('fanhui')}}</div>
@ -145,14 +153,20 @@ export default defineComponent({
router.push({
path: url
});
}
}
function toinfo(id: string){
router.push({path: '/regime/livedetail', query: {id: id}})
}
}
return {
accountinfo,
query,
navto,
lan
lan,
toinfo
};
},
});

View File

@ -25,9 +25,9 @@
:img="i.img"
:title="i.title"
:score="i.score"
:date="i.starttime"
:takehour="i.vodduration"
:livenum="i.livenumber"
:date="i.dateline"
:takehour="i.livetime"
:livenum="i.count"
:status="i.livestatus"
:zid="i.liveid"
></LiveItem>
@ -41,9 +41,9 @@
:img="i.img"
:title="i.title"
:score="i.score"
:date="i.starttime"
:takehour="i.vodduration"
:livenum="i.livenumber"
:date="i.dateline"
:takehour="i.livetime"
:livenum="i.count"
:status="i.livestatus"
:zid="i.liveid"
></LiveItem>
@ -56,9 +56,9 @@
:img="i.img"
:title="i.title"
:score="i.score"
:date="i.starttime"
:takehour="i.vodduration"
:livenum="i.livenumber"
:date="i.dateline"
:takehour="i.livetime"
:livenum="i.count"
:status="i.livestatus"
:zid="i.liveid"
></LiveItem>

View File

@ -7,7 +7,7 @@
<LiveCount :info="liveinfo.studentlist" :livestatus="liveinfo.livestatus" :zid="liveinfo.liveid"></LiveCount>
</div>
<VideoReview class="review" v-if="liveinfo.livestatus == 2"></VideoReview>
<VideoReview class="review" v-if="liveinfo.livestatus == 2 && liveinfo.score != '0.0'" :videoinfo="liveinfo.score"></VideoReview>
</div>
</template>
<style lang="scss" scoped>

View File

@ -50,6 +50,9 @@
<a-modal v-model:visible="visible" title="Basic Modal" @ok="guanbi">
<p>{{lan.$t('querenguanbi')}}</p>
</a-modal>
<a-modal v-model:visible="xuanze" title="提示" okText="摄像头" cancelText="屏幕分享" @ok="xianze(1)" @cancel="xianze(0)" :closable="false" :maskClosable="false">
<p>请选择开播方式</p>
</a-modal>
</div>
</template>
<style lang="scss" scoped>
@ -548,18 +551,24 @@ export default defineComponent({
console.warn('sendMessage error:', imError);
});
}
const xuanze = ref(true)
async function xianze(index: number){
if(store.state.userinfo.memberid != 0 && store.state.userinfo.memberid){
// clearInterval(si);
userSing = await usersig(store.state.userinfo.memberid);
init(index == 0 ? pingmu : shexiang, userSing);
xuanze.value = false;
}
}
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);
init(pingmu, userSing);
// onMounted(async ()=>{
// const si = setInterval(async ()=>{
// })
// })
}
})
})
return{
fenxiang,
@ -569,7 +578,9 @@ export default defineComponent({
visible,
lan,
sendtext,
imlist
imlist,
xianze,
xuanze
}
},
});

View File

@ -2,7 +2,7 @@
<div class="videoinfo">
<div class="info">
<VideoPlay :url="result.fileurl"></VideoPlay>
<VideoCont :videoid="result.videoid" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
<VideoCont :videoid="result.videoid" :yuanyin="result.statusdesc" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
</div>
<VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>
</div>

View File

@ -40,7 +40,7 @@
<div class="body">
<div class="row" v-for="item in 24" :key="item">
<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 - 1 : "0" + (item - 1) }}:00-{{
item > 9 ? item : "0" + item
}}:00
</div>