xbx #146
@ -17,6 +17,7 @@ import i18ninit from "@/i18n/init"
|
||||
import enUS from 'ant-design-vue/es/locale/en_US';
|
||||
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
import dayjs from 'dayjs';
|
||||
import { getaddr } from './api';
|
||||
|
||||
export default defineComponent({
|
||||
setup(){
|
||||
@ -24,6 +25,7 @@ export default defineComponent({
|
||||
const len = provideI18n(i18ninit);
|
||||
// len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
|
||||
if(getValue('token')){
|
||||
console.log("token")
|
||||
store.commit("login", true)
|
||||
store.dispatch("setUserInfo");
|
||||
}else{
|
||||
|
@ -783,6 +783,7 @@ export async function putmember(data: any): Promise<any>{
|
||||
}
|
||||
console.log(newdata)
|
||||
const res = await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, newdata)
|
||||
|
||||
store.dispatch("setUserInfo");
|
||||
return res;
|
||||
}
|
||||
@ -1038,28 +1039,63 @@ export async function luzhi(roomid: string){
|
||||
console.log(res)
|
||||
}
|
||||
|
||||
export async function getaddr() {
|
||||
const res = await get<any>('ip');
|
||||
const gj = res.data.address.split("|")[0];
|
||||
const lan = getValue("Lanvuage");
|
||||
const qh = await get<any>('countryCode', {
|
||||
longitude: res.data.content.point.x,
|
||||
latitude: res.data.content.point.y
|
||||
});
|
||||
console.log(qh)
|
||||
if(lan != null && lan){
|
||||
if(gj == "CN"){
|
||||
return {hb: '人民币¥', qh};
|
||||
}else {
|
||||
return {hb: '美元$'}
|
||||
export function getaddr() {
|
||||
return new Promise((r)=>{
|
||||
console.log("开始定位")
|
||||
const lan = getValue("Lanvuage");
|
||||
if ("geolocation" in navigator) {
|
||||
/* 地理位置服务可用 */
|
||||
navigator.geolocation.getCurrentPosition(async (res) => {
|
||||
console.log(res, 'res')
|
||||
const qh = await get<any>('countryCode', {
|
||||
longitude: res.coords.longitude,
|
||||
latitude: res.coords.latitude
|
||||
});
|
||||
console.log(qh)
|
||||
if(lan != null && lan){
|
||||
if(qh.data.ename == "China"){
|
||||
r({hb: '人民币¥', qh});
|
||||
}else {
|
||||
r({hb: '美元$'})
|
||||
}
|
||||
}else{
|
||||
if(qh.data.ename == "China"){
|
||||
r({yy: "zh", yyx: "中文", hb: '人民币¥', qh});
|
||||
}else {
|
||||
r({yy: 'en', yyx: 'English', hb: '美元$', qh})
|
||||
}
|
||||
}
|
||||
},(err) => {
|
||||
message.error(err.message)
|
||||
console.log(err, 'err')
|
||||
})
|
||||
} else {
|
||||
/* 地理位置服务不可用 */
|
||||
console.log("无法定位")
|
||||
}
|
||||
}else{
|
||||
if(gj == "CN"){
|
||||
return {yy: "zh", yyx: "中文", hb: '人民币¥', qh};
|
||||
}else {
|
||||
return {yy: 'en', yyx: 'English', hb: '美元$', qh}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// const res = await get<any>('ip');
|
||||
// const gj = res.data.address.split("|")[0];
|
||||
// const lan = getValue("Lanvuage");
|
||||
// const qh = await get<any>('countryCode', {
|
||||
// longitude: res.data.content.point.x,
|
||||
// latitude: res.data.content.point.y
|
||||
// });
|
||||
// console.log(qh)
|
||||
// if(lan != null && lan){
|
||||
// if(gj == "CN"){
|
||||
// return {hb: '人民币¥', qh};
|
||||
// }else {
|
||||
// return {hb: '美元$'}
|
||||
// }
|
||||
// }else{
|
||||
// if(gj == "CN"){
|
||||
// return {yy: "zh", yyx: "中文", hb: '人民币¥', qh};
|
||||
// }else {
|
||||
// return {yy: 'en', yyx: 'English', hb: '美元$', qh}
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -1080,10 +1116,20 @@ export async function getset() {
|
||||
|
||||
export async function setheadimg(src: string){
|
||||
const res = await put(`member/${store.state.userinfo.memberid}`,{img: src});
|
||||
if(res.code == 0){
|
||||
message.success(res.msg)
|
||||
}else{
|
||||
message.error(res.msg);
|
||||
}
|
||||
console.log(res)
|
||||
}
|
||||
|
||||
export async function setusername(src: string){
|
||||
const res = await put(`member/${store.state.userinfo.memberid}`,{name: src});
|
||||
if(res.code == 0){
|
||||
message.success(res.msg)
|
||||
}else{
|
||||
message.error(res.msg);
|
||||
}
|
||||
console.log(res)
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<img src="@/static/images/play.png" alt="" class="play">
|
||||
<div class="title">
|
||||
<div class="one-line-hide">{{title}}</div>
|
||||
<span class="lv">{{score}} {{lan.$t('fen')}}</span>
|
||||
<span class="lv">{{score}}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="datetime">
|
||||
|
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="num">{{(score+'').split('.')[1]?score:score+'.0'}} {{lan.$t('fen')}}</div>
|
||||
<div class="num">{{(score+'').split('.')[1]?score:score+'.0'}}</div>
|
||||
</div>
|
||||
<div class="all" @click="findall(replyid)" >
|
||||
<span>{{lan.$t('suoyouhuifu')}}</span>
|
||||
|
@ -1,29 +1,29 @@
|
||||
export default {
|
||||
zhiboguanli: "Live broadcast management",
|
||||
shipinguanli: "Video management",
|
||||
dingyuezheguanli: "Subscriber management",
|
||||
gerenzhongxin: "Personal Center",
|
||||
zhiboguanli: "Live",
|
||||
shipinguanli: "Vide",
|
||||
dingyuezheguanli: "Followers",
|
||||
gerenzhongxin: "Profile",
|
||||
rili: "calendar",
|
||||
quanbuzhibo: "All live",
|
||||
weikaishi: "Not started",
|
||||
yijieshu: "Finished",
|
||||
quanbuzhibo: "All",
|
||||
weikaishi: "Planning",
|
||||
yijieshu: "Completed",
|
||||
zhibosousuo: "Please enter the live title you want to search",
|
||||
haiweikaishi: "Not yet",
|
||||
jinruzhibo: "Enter live",
|
||||
chakanhuifang: "View playback",
|
||||
quanbushipin: "All videos",
|
||||
shenhezhong: "Under review",
|
||||
chakanhuifang: "Replay",
|
||||
quanbushipin: "All",
|
||||
shenhezhong: "Reviewing",
|
||||
weitongguo: "Failed",
|
||||
yifabu: "Published",
|
||||
shipinsousuo: "Please enter the live title you want to search",
|
||||
wodedingyuezhe: "My subscribers",
|
||||
xingming: "name",
|
||||
suozaiguojia: "Country of residence",
|
||||
suozaiguojia: "Country",
|
||||
nianling: "Age",
|
||||
xueshengmuyu: "Students' mother tongue",
|
||||
xingqudian: "Points of interest",
|
||||
xueshengmuyu: "Speak",
|
||||
xingqudian: "Learn",
|
||||
yuyandengji: "Language level",
|
||||
canyupingtaishichang: "Total duration of live broadcast on the platform",
|
||||
canyupingtaishichang: "Attended course",
|
||||
sousuoxuesheng: "Please enter the name of the student you want to search",
|
||||
huanying: "Hello, welcome",
|
||||
beelink: "Beelink",
|
||||
@ -173,7 +173,7 @@ export default {
|
||||
querenjujue: "Confirm rejection",
|
||||
zhiboyemian: "Live page",
|
||||
querenguanbi: "Are you sure you want to close the live broadcast",
|
||||
dingyuezhe: "My subscribers",
|
||||
dingyuezhe: "My Followers",
|
||||
sousuodingyue: "Please enter the name of the student you want to search",
|
||||
wodeqianbao: "My wallet",
|
||||
lijitixian: "Immediate withdrawal",
|
||||
@ -303,7 +303,7 @@ export default {
|
||||
cshipinyaoqiu1: "The video should be no longer than 10 minutes",
|
||||
cshipinyaoqiu2: "Video size cannot exceed 500M",
|
||||
shangchuanwancheng: "Please wait for the file to be uploaded",
|
||||
zhanghaocunzai: "account already exists",
|
||||
zhanghaocunzai: "This number is already registered as a student",
|
||||
shouruguize: "Description of revenue rules",
|
||||
shouru1: "Live Revenue=Actual attendess x Actual duration x unit price",
|
||||
shouru2: "1 on 1, 20€/hour; 1 on N, 10€/hour/person, (1<N<=4)",
|
||||
@ -312,6 +312,9 @@ export default {
|
||||
querentuichu: "You confirm to exit?",
|
||||
huobitishi: "Attention! You can only change the currency once!",
|
||||
zhuanmazhong: "Transcoding in",
|
||||
leixingcuowu:"File type error",
|
||||
zuida:"maximum",
|
||||
zhibotishi1:"Congratulations on your qualification for beelink live streaming course.",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu: "",
|
||||
|
@ -14,8 +14,8 @@ getset().then((res: any)=>{
|
||||
en.tixianzhu = `Note: ${res.sxf} service fee will be charged for each withdrawal, with a minimum of ${ res.symbol + res.minmoney }`
|
||||
zh.zuiditixian = "最低提现金额" + res.symbol + res.minwithdraw
|
||||
en.zuiditixian = "Minimum withdrawal amount " + res.symbol + res.minwithdraw
|
||||
zh.zhibotishi = `恭喜您在beelink有直播课资格。直播资格按照每周浏览量排名,前${res.views}名基本直播资格。`
|
||||
en.zhibotishi = `Congratulations on your qualification for beelink live streaming course. The top ${res.views} basic live streaming qualifications are ranked according to the number of views per week`
|
||||
zh.zhibotishi = `直播资格按照每周浏览量排名,前${res.views}名基本直播资格。`
|
||||
en.zhibotishi = `The top ${res.views} basic live streaming qualifications are ranked according to the number of views per week`
|
||||
const i18n = geti18n();
|
||||
const loc = i18n.locale.value;
|
||||
i18n.locale.value = '';
|
||||
|
@ -303,7 +303,7 @@ export default {
|
||||
cshipinyaoqiu1: "视频长度不能超过10分钟",
|
||||
cshipinyaoqiu2: "视频大小不能超过500m",
|
||||
shangchuanwancheng: "请等待文件上传完成",
|
||||
zhanghaocunzai: "帐号已存在",
|
||||
zhanghaocunzai: "该手机已注册学生端账号",
|
||||
shuoruguize: "收入规则说明",
|
||||
shouru1: "直播收入=实际参加学生数x参加时长x单价",
|
||||
shouru2: "单价:1对1,20欧/小时;1对N,10欧/小时/人(1<N<=4)",
|
||||
@ -312,6 +312,9 @@ export default {
|
||||
querentuichu: "您确认退出?",
|
||||
huobitishi: "请注意,货币一旦修改,不能变动。",
|
||||
zhuanmazhong: "转码中",
|
||||
leixingcuowu:"文件类型错误",
|
||||
zuida:"最大",
|
||||
zhibotishi1:"恭喜您在Beelink有直播课资格",
|
||||
shichangtishi:"",
|
||||
renshutishi: '',
|
||||
tixianzhu:"",
|
||||
|
BIN
src/static/images/gantanhao.png
Normal file
BIN
src/static/images/gantanhao.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
src/static/images/tishihei.png
Normal file
BIN
src/static/images/tishihei.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
@ -126,11 +126,13 @@ export default createStore({
|
||||
commit('setUserInfo', user);
|
||||
} else {
|
||||
const info = await getaddr();
|
||||
console.log(info,11256445)
|
||||
commit("setLanguage", info)
|
||||
}
|
||||
},
|
||||
async getip({ commit }){
|
||||
const info = await getaddr();
|
||||
console.log(info,11256445);
|
||||
commit("setLanguage", info)
|
||||
}
|
||||
},
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { message } from 'ant-design-vue';
|
||||
import { geti18n } from './i18n';
|
||||
const lan = geti18n()
|
||||
|
||||
/**
|
||||
* 图片转Base64
|
||||
@ -68,7 +70,7 @@ export function provenimg(file: any): boolean | void{
|
||||
console.log(ntype)
|
||||
const size = 2 * 1024 * 1024;
|
||||
if(file.size > size){
|
||||
message.error("最大2MB")
|
||||
message.error(lan.$t('zuida') + "2MB")
|
||||
return false;
|
||||
}
|
||||
let istype = false
|
||||
@ -93,13 +95,13 @@ export function provenvideo(file: any, isvideo?: boolean): boolean{
|
||||
if(isvideo){
|
||||
const size = 500 * 1024 * 1024;
|
||||
if(file.size > size){
|
||||
message.error("最大500MB")
|
||||
message.error(lan.$t('zuida') + "500MB")
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
const size = 100 * 1024 * 1024;
|
||||
if(file.size > size){
|
||||
message.error("最大100MB")
|
||||
message.error(lan.$t('zuida') + "100MB")
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -108,5 +110,6 @@ export function provenvideo(file: any, isvideo?: boolean): boolean{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
message.error(lan.$t("leixingcuowu"))
|
||||
return false;
|
||||
}
|
@ -15,11 +15,16 @@ interface GetDate{
|
||||
end: string;
|
||||
}
|
||||
|
||||
export function getdate(yue?: number): GetDate{
|
||||
let now = dayjs()
|
||||
if(yue != undefined){
|
||||
now = now.month(now.month() + yue);
|
||||
}
|
||||
export function getdate(yue: number,id: string): GetDate{
|
||||
/* eslint-disable */
|
||||
const utc = require('dayjs/plugin/utc') // dependent on utc plugin
|
||||
/* eslint-disable */
|
||||
const timezone = require('dayjs/plugin/timezone')
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
const days: any = dayjs;
|
||||
let now = days().tz(id)
|
||||
now = now.month(now.month() + yue);
|
||||
yue = now.month() + 1;
|
||||
const day = now.date() // 当前天
|
||||
const zhou = now.day(); // 当前周
|
||||
|
@ -294,7 +294,7 @@ export default defineComponent({
|
||||
}
|
||||
const iszc = await checkuser({phone: phone.value.phone})
|
||||
if(iszc.data){
|
||||
message.error(lan.$t('zhanghaocunzai'))
|
||||
message.error(iszc.msg)
|
||||
return ;
|
||||
}
|
||||
lock = true;
|
||||
|
@ -507,7 +507,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<a-modal v-model:visible="huobi" :footer="null" :title="lan.$t('tishi')" >
|
||||
<p>{{lan.$t('huobitishi')}}</p>
|
||||
<div style=" display: flex;align-items: center;">
|
||||
<img style=" width: 50px;margin-right: 15px;" src="@/static/images/tishihei.png" alt="">
|
||||
<p style="margin-top: 1em">{{lan.$t('huobitishi')}}</p>
|
||||
</div>
|
||||
|
||||
</a-modal>
|
||||
<a-modal v-model:visible="touxiang" width="6rem" :footer="null">
|
||||
<imghead @upload="imgupload" v-if="touxiang" :url="imgfire"></imghead>
|
||||
@ -960,7 +964,8 @@ export default defineComponent({
|
||||
issum = false;
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
console.log(info);
|
||||
const jindu = info.percent.toFixed(2) * 100
|
||||
let jindu: number = info.percent.toFixed(2) * 100;
|
||||
jindu = parseInt(jindu + "");
|
||||
uploadprogress.value = jindu > 0 ? jindu : 1;
|
||||
});
|
||||
userinfo.value.video = res.video.url;
|
||||
@ -1107,6 +1112,7 @@ export default defineComponent({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.archives {
|
||||
width: 100%;
|
||||
min-width: 700px;
|
||||
@ -1114,6 +1120,7 @@ export default defineComponent({
|
||||
padding: 46px;
|
||||
border-radius: 17px;
|
||||
position: relative;
|
||||
|
||||
.telbox {
|
||||
margin-left: 15px;
|
||||
font-size: 12px;
|
||||
@ -1380,19 +1387,19 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
.submit-btn {
|
||||
width: 63px;
|
||||
height: 23px;
|
||||
width: 70px;
|
||||
height: 28px;
|
||||
background: #08ae98;
|
||||
border-radius: 3px;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
line-height: 23px;
|
||||
line-height: 28px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
position: absolute;
|
||||
top: 1.5rem;
|
||||
position: fixed;
|
||||
top: 2.3rem;
|
||||
right: 1rem;
|
||||
|
||||
}
|
||||
|
@ -231,7 +231,9 @@ export default defineComponent({
|
||||
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
console.log(info);
|
||||
uploadpicprogress.value = info.percent.toFixed(2) * 100;
|
||||
let jindu: number = info.percent.toFixed(2) * 100;
|
||||
jindu = parseInt(jindu + "");
|
||||
uploadpicprogress.value = jindu || 1;
|
||||
});
|
||||
console.log(res);
|
||||
form.value.img = res.video.url;
|
||||
|
@ -222,8 +222,13 @@
|
||||
<p>{{ lan.$t("querenquxiao") }}</p>
|
||||
</a-modal>
|
||||
<nav-bottom></nav-bottom>
|
||||
<div class="tishi" v-if="false">
|
||||
{{ lan.$t("zhibotishi") }}
|
||||
<div class="tishi" v-if="true">
|
||||
<img src="@/static/images/gantanhao.png" alt="">
|
||||
<div>
|
||||
{{ lan.$t("zhibotishi1") }}<br />
|
||||
{{ lan.$t("zhibotishi") }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -511,7 +516,9 @@ export default defineComponent({
|
||||
uploadprogress.value = 1;
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
console.log(info);
|
||||
const jindu = info.percent.toFixed(2) * 100
|
||||
// const jindu = info.percent.toFixed(2) * 100
|
||||
let jindu: number = info.percent.toFixed(2) * 100;
|
||||
jindu = parseInt(jindu + "");
|
||||
uploadprogress.value = jindu > 0 ? jindu : 1;
|
||||
});
|
||||
console.log(res);
|
||||
@ -525,7 +532,9 @@ export default defineComponent({
|
||||
uploadpicprogress.value = 1;
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
console.log(info);
|
||||
uploadpicprogress.value = info.percent.toFixed(2) * 100 || 1;
|
||||
let jindu: number = info.percent.toFixed(2) * 100;
|
||||
jindu = parseInt(jindu + "");
|
||||
uploadpicprogress.value = jindu || 1;
|
||||
});
|
||||
console.log(res);
|
||||
|
||||
@ -634,13 +643,19 @@ export default defineComponent({
|
||||
position: relative;
|
||||
.tishi{
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
right: 15%;
|
||||
width: 25%;
|
||||
top: 60px;
|
||||
right: 64px;
|
||||
line-height: 0.17rem;
|
||||
font-size: 0.1rem;
|
||||
font-weight: 500;
|
||||
color: #808080;
|
||||
font-size: 0.1rem;
|
||||
font-weight: 500;
|
||||
color: #808080;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color:#07ad97;
|
||||
> img{
|
||||
width: 40px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
::v-deep(.ant-form) {
|
||||
.title {
|
||||
|
@ -202,9 +202,8 @@ export default defineComponent({
|
||||
},
|
||||
setup(){
|
||||
console.log(1)
|
||||
const date = getdate();
|
||||
console.log(date)
|
||||
const month: any = ref(date);
|
||||
|
||||
const month: any = ref({zhou:0,data:[]});
|
||||
const yue = ref(0);
|
||||
const userid = computed(() => {
|
||||
return store.state.userinfo.memberid;
|
||||
@ -249,16 +248,17 @@ export default defineComponent({
|
||||
}
|
||||
function xia(){
|
||||
yue.value = yue.value + 1;
|
||||
month.value = getdate(yue.value)
|
||||
month.value = getdate(yue.value, store.state.userinfo.zoneValue)
|
||||
getdates(userid.value)
|
||||
}
|
||||
|
||||
watch(userid, ()=> {
|
||||
month.value = getdate(0, store.state.userinfo.zoneValue)
|
||||
getdates(userid.value);
|
||||
})
|
||||
function shang(){
|
||||
yue.value = yue.value - 1;
|
||||
month.value = getdate(yue.value)
|
||||
month.value = getdate(yue.value, store.state.userinfo.zoneValue)
|
||||
getdates(userid.value)
|
||||
}
|
||||
|
||||
@ -276,7 +276,11 @@ export default defineComponent({
|
||||
}
|
||||
router.push({path: url,query: { id: id }})
|
||||
}
|
||||
getdates(userid.value);
|
||||
if(userid.value != 0){
|
||||
month.value = getdate(0, store.state.userinfo.zoneValue)
|
||||
getdates(userid.value);
|
||||
|
||||
}
|
||||
return {
|
||||
month,
|
||||
xia,
|
||||
|
Loading…
Reference in New Issue
Block a user