xbx #122

Merged
theluyuan merged 8 commits from xbx into master 2020-11-10 10:01:59 +00:00
21 changed files with 153 additions and 51 deletions

View File

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

View File

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

View File

@ -9,7 +9,7 @@
</div> </div>
<div> <div>
<img src="@/static/images/livewatch.png" alt="" class="icon"> <img src="@/static/images/livewatch.png" alt="" class="icon">
<span>{{info.dateline}}</span> <span>{{info.tlanguage}}</span>
</div> </div>
<div> <div>
<img src="@/static/images/livetimetake.png" alt="" class="icon"> <img src="@/static/images/livetimetake.png" alt="" class="icon">
@ -17,7 +17,7 @@
</div> </div>
<div> <div>
<img src="@/static/images/shoucang.png" alt="" class="icon"> <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> </div>
<div style="display: flex"> <div style="display: flex">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@
<LiveCount :info="liveinfo.studentlist" :livestatus="liveinfo.livestatus" :zid="liveinfo.liveid"></LiveCount> <LiveCount :info="liveinfo.studentlist" :livestatus="liveinfo.livestatus" :zid="liveinfo.liveid"></LiveCount>
</div> </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> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -50,6 +50,9 @@
<a-modal v-model:visible="visible" title="Basic Modal" @ok="guanbi"> <a-modal v-model:visible="visible" title="Basic Modal" @ok="guanbi">
<p>{{lan.$t('querenguanbi')}}</p> <p>{{lan.$t('querenguanbi')}}</p>
</a-modal> </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> </div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -548,18 +551,24 @@ export default defineComponent({
console.warn('sendMessage error:', imError); 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 ()=>{ // onMounted(async ()=>{
const si = setInterval(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);
}
})
}) // })
return{ return{
fenxiang, fenxiang,
@ -569,7 +578,9 @@ export default defineComponent({
visible, visible,
lan, lan,
sendtext, sendtext,
imlist imlist,
xianze,
xuanze
} }
}, },
}); });

View File

@ -2,7 +2,7 @@
<div class="videoinfo"> <div class="videoinfo">
<div class="info"> <div class="info">
<VideoPlay :url="result.fileurl"></VideoPlay> <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> </div>
<VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview> <VideoReview :videoinfo="result.score" class="review" v-if="result.status == 1"></VideoReview>
</div> </div>

View File

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