xbx #150

Merged
theluyuan merged 11 commits from xbx into master 2020-11-24 10:41:46 +00:00
20 changed files with 286 additions and 198 deletions

View File

@ -1,74 +1,87 @@
<template>
<!-- <div id="nav">
<!-- <div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div> -->
<a-config-provider :locale="len.$s() == 'zh' ? zh : en">
<router-view/>
</a-config-provider>
<a-config-provider :locale="len.$s() == 'zh' ? zh : en">
<router-view />
</a-config-provider>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import router from './router';
import store from './store';
import { getValue } from './utils/common';
import { provideI18n } from "@/utils/i18n"
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';
import { defineComponent } from "vue";
import router from "./router";
import store from "./store";
import { getValue } from "./utils/common";
import { provideI18n } from "@/utils/i18n";
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, { locale } from "dayjs";
import { getaddr } from "./api";
import { useRoute } from "vue-router";
export default defineComponent({
setup(){
console.log(i18ninit)
const len = provideI18n(i18ninit);
// len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
if(getValue('token')){
console.log("token")
store.commit("login", true)
store.dispatch("getcode");
store.dispatch("setUserInfo");
}else{
setup() {
console.log(i18ninit);
const len = provideI18n(i18ninit);
function GetUrlRelativePath() {
const url = document.location.toString();
const arrUrl = url.split("//");
console.log('ip')
store.dispatch("getip");
store.commit('setWlan')
router.push("/")
}
const zh = zhCN
const en = enUS
/* eslint-disable */
const utc = require('dayjs/plugin/utc') // dependent on utc plugin
/* eslint-disable */
const timezone = require('dayjs/plugin/timezone')
const days: any = dayjs;
dayjs.extend(utc)
dayjs.extend(timezone)
console.log(days.tz.guess())
return{
zh,
en,
len
}
}
})
const start = arrUrl[1].indexOf("/");
let relUrl = arrUrl[1].substring(start); //stopstart
if (relUrl.indexOf("?") != -1) {
relUrl = relUrl.split("?")[0];
}
return relUrl;
}
// len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage");
if (getValue("token")) {
console.log("token");
store.commit("login", true);
store.dispatch("getcode");
store.dispatch("setUserInfo");
const patn = useRoute().path;
console.log(GetUrlRelativePath(), 444);
if (GetUrlRelativePath() == "/") {
router.push("/mine/archives").then(() => {
location.reload();
});
}
} else {
console.log("ip");
store.dispatch("getip");
store.commit("setWlan");
router.push("/");
}
const zh = zhCN;
const en = enUS;
return {
zh,
en,
len,
};
},
});
</script>
<style lang="scss">
div {
user-select: none;
user-select: none;
}
.one-line-hide {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
-webkit-appearance: none;
}
input[type="number"]{
-moz-appearance: textfield;
input[type="number"] {
-moz-appearance: textfield;
}
</style>

View File

@ -1041,31 +1041,72 @@ export async function luzhi(roomid: string){
export function getaddr() {
return new Promise(async (r)=>{
console.log("开始定位")
// 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: '美元$', qh})
}
}else{
if(qh.data.ename == "China"){
r({yy: "zh", yyx: "中文", hb: '人民币¥', qh});
}else {
r({yy: 'en', yyx: 'English', hb: '美元$', qh})
}
}
},async () => {
// 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: '美元$', qh})
// }
// }else{
// if(qh.data.ename == "China"){
// r({yy: "zh", yyx: "中文", hb: '人民币¥', qh});
// }else {
// r({yy: 'en', yyx: 'English', hb: '美元$', qh})
// }
// }
// },async () => {
// const qh = await get<any>('countryCode', {
// });
// console.log(qh)
// if(lan != null && lan){
// if(qh.data.ename == "China"){
// r({hb: '人民币¥', qh});
// }else {
// r({hb: '美元$', qh})
// }
// }else{
// if(qh.data.ename == "China"){
// r({yy: "zh", yyx: "中文", hb: '人民币¥', qh});
// }else {
// r({yy: 'en', yyx: 'English', hb: '美元$', qh})
// }
// }
// // message.error(err.message)
// // console.log(err, 'err')
// })
// } else {
// const qh = await get<any>('countryCode', {
// });
// console.log(qh)
// if(lan != null && lan){
// if(qh.data.ename == "China"){
// r({hb: '人民币¥', qh});
// }else {
// r({hb: '美元$', qh})
// }
// }else{
// if(qh.data.ename == "China"){
// r({yy: "zh", yyx: "中文", hb: '人民币¥', qh});
// }else {
// r({yy: 'en', yyx: 'English', hb: '美元$', qh})
// }
// }
// /* 地理位置服务不可用 */
// console.log("无法定位")
// }
const qh = await get<any>('countryCode', {
});
@ -1083,30 +1124,6 @@ export function getaddr() {
r({yy: 'en', yyx: 'English', hb: '美元$', qh})
}
}
// message.error(err.message)
// console.log(err, 'err')
})
} else {
const qh = await get<any>('countryCode', {
});
console.log(qh)
if(lan != null && lan){
if(qh.data.ename == "China"){
r({hb: '人民币¥', qh});
}else {
r({hb: '美元$', qh})
}
}else{
if(qh.data.ename == "China"){
r({yy: "zh", yyx: "中文", hb: '人民币¥', qh});
}else {
r({yy: 'en', yyx: 'English', hb: '美元$', qh})
}
}
/* 地理位置服务不可用 */
console.log("无法定位")
}
})
// const res = await get<any>('ip');
@ -1167,3 +1184,7 @@ export async function setusername(src: string){
}
console.log(res)
}
export async function logoutapi() {
await get("logout");
}

View File

@ -130,6 +130,7 @@
}
</style>
<script lang="ts">
import { logoutapi } from '@/api';
import { setToken } from '@/api/base';
import router from '@/router';
import store from '@/store';
@ -230,6 +231,7 @@ export default defineComponent({
function logout(): void{
console.log("退出")
logoutapi()
store.commit("login", false)
saveValue("token", "");
setToken();

View File

@ -159,7 +159,7 @@
}
.name{
margin-left: 6px;
font-size: 11px;
font-size: 13px;
color: #111;
font-weight: bold;
}

View File

@ -3,7 +3,7 @@ export default {
shipinguanli: "Video",
dingyuezheguanli: "Followers",
gerenzhongxin: "Profile",
rili: "calendar",
rili: "Calendar",
quanbuzhibo: "All",
weikaishi: "Planning",
yijieshu: "Completed",
@ -17,7 +17,7 @@ export default {
yifabu: "Published",
shipinsousuo: "Please enter the live title you want to search",
wodedingyuezhe: "My subscribers",
xingming: "name",
xingming: "Name",
suozaiguojia: "Country",
nianling: "Age",
xueshengmuyu: "Speak",
@ -33,7 +33,7 @@ export default {
chengweilaoshi: "Become a Beelink teacher",
shoujidenglu: "Mobile phone number login",
mimadenglu: "Account password login",
shoujihao: "cell-phone number",
shoujihao: "Mobile Number",
yanzhengma: "Verification Code",
dianjihuoquyzm: "Click to get the verification code",
lijidenglu: "Log in now",
@ -56,11 +56,11 @@ export default {
shezhimima: "Set password",
shurumimatwo: "Please enter your password again",
shuruxingming: "Please enter your name",
youxiang: "mailbox",
youxiang: "Email",
shuruyouxiang: "Please enter your email",
muyu: "mother tongue",
muyu: "My Language",
shurumuyu: "Please enter your native language",
jiaoshou: "teach",
jiaoshou: "Teaching",
xuanzejiaoshou: "Please choose your professor",//翻译很奇怪
lijizhuce: "Register now",
wanchengzhuce: "You have completed the registration",
@ -84,14 +84,14 @@ export default {
xiugai: "modify",
shuruxinnicheng: "Please enter a new nickname",
jibenxinxi: "Basic information",
laiziguojia: "From a country or region",
laiziguojia: "Country or region",
juzhudi: "Place of residence",
shurujuzhudi: "Enter residence",
wohaihuishuo: "I would also say",
wohaihuishuo: "Speak",
shuliandu: "Proficiency",
jixutianjia: "Continue adding",
xindemuyu: "Please enter your new mother tongue",
duanshipin: "Short video introduction",
duanshipin: "Self-introduction by videon",
shipinyaoqiu: "Video requirements:",
shipinyaoqiu1: "The time required for uploading video is within 30s",
shipinyaoqiu2: "Support file size 100m",
@ -117,28 +117,28 @@ export default {
xiugaimima: "Change Password",
baocun: "Save information",
gerenjieshao: "Please enter your profile",
shangchuanshipin: "Upload video",
shipinbiaoti: "Video title",
shangchuanshipin: "Submit",
shipinbiaoti: "Title",
shurushipinbiaoti: "Please enter your video title",
shipinfengmian: "Video cover",
shipinfengmian: "Cover",
xuanzeshipin: "Choose video",
shipinjianjie: "Video introduction",
shurushipinjianjie: "Please enter your video profile",
zhiboxinxi: "Live broadcast information",
zhibobiaoti: "Live title",
zhiboxinxi: "Online class information",
zhibobiaoti: "Title",
shuruzhibobiaoti: "Please enter your live title",
zhibofengmian: "Live cover",
shipinjieshao: "Video introduction",
kaishishijian: "start time",
zhibofengmian: "Cover",
shipinjieshao: "Video",
kaishishijian: "Start time",
shezhikaishishijian: "Please set your start time",
zhiboshichang: "Live broadcast duration",
zhiboshichang: "Duration",
shuruzhiboshijian: "Please input live time",
fenzhong: "minute",
zhiborenshu: "Number of live broadcast",
zhiborenshu: "Number of attendees",
shuruzhiborenshu: "Please input the number of live broadcast",
zhibojianjie: "Introduction to live broadcast",
zhibojianjie: "Text introduction",
shuruzhibojianjie: "Please enter your live broadcast profile",
fabuzhibo: "Release live broadcast",
fabuzhibo: "Live Class",
wuzhibozige: "You are not eligible for live broadcast",
yijianfankui: "Feedback",
fen: "score",
@ -174,10 +174,10 @@ export default {
zhiboyemian: "Live page",
querenguanbi: "Are you sure you want to close the live broadcast",
dingyuezhe: "My Followers",
sousuodingyue: "Please enter the name of the student you want to search",
sousuodingyue: "Enter the name",
wodeqianbao: "My wallet",
lijitixian: "Immediate withdrawal",
tixianjilu: "Withdrawal record",
lijitixian: "Cash transfer",
tixianjilu: "Transfer record",
bangdingyonghu: "Binding users",
zhanghuyue: "Account balance",
tianjiazhanghu: "Add a new account",
@ -245,8 +245,8 @@ export default {
shurufankui: "Please enter your feedback",
tijiaofankui: "Submit feedback",
tuichu: "Account exit",
wodedangan: "My files",
liebiaotongji: "List statistics",
wodedangan: "My Profile",
liebiaotongji: "Statistics",
guanyu: "About Beelink",
xuanzehuifuxuesheng: "Please select the student to reply first",
shoujihaoweikong: "Mobile phone number cannot be empty",
@ -314,7 +314,26 @@ export default {
zhuanmazhong: "Transcoding in",
leixingcuowu:"File type error",
zuida:"maximum",
zhibotishi1:"Congratulations on your qualification for beelink live streaming course.",
zhibotishi1:"You have the online class privilege on Beelink.",
shipindianjiliang: "Video clicks",
paiming: "rank",
wo: "my",
yizhucexuesheng: "This number is already registered as a student",
zhouri:"Sunday",
zhouyi:"Monday",
zhouer:"Tuesday",
zhousan:"Wednesday",
zhousi:"Thursday",
zhouwu:"Friday",
zhouliu:"Saturday",
shangyige:"previous",
xiayige:"next",
nian:"year",
yues:"month",
zhourili:"Week",
yuerili:"Month",
shangyizhou:"previous",
xiayizhou:"next",
shichangtishi:"",
renshutishi: '',
tixianzhu: "",

View File

@ -15,7 +15,7 @@ getset().then((res: any)=>{
zh.zuiditixian = "最低提现金额" + res.symbol + res.minwithdraw
en.zuiditixian = "Minimum withdrawal amount " + res.symbol + res.minwithdraw
zh.zhibotishi = `直播资格按照每周浏览量排名,前${res.views}名基本直播资格。`
en.zhibotishi = `The top ${res.views} basic live streaming qualifications are ranked according to the number of views per week`
en.zhibotishi = `Weekly Top ${res.views} uploaded video visits have this privilege.`
const i18n = geti18n();
const loc = i18n.locale.value;
i18n.locale.value = '';

View File

@ -315,6 +315,25 @@ export default {
leixingcuowu:"文件类型错误",
zuida:"最大",
zhibotishi1:"恭喜您在Beelink有直播课资格",
shipindianjiliang: "视频点击量",
paiming: "排名",
wo: "我",
yizhucexuesheng: "该手机已注册学生端账号",
zhouri:"周日",
zhouyi:"周一",
zhouer:"周二",
zhousan:"周三",
zhousi:"周四",
zhouwu:"周五",
zhouliu:"周六",
shangyige:"上一月",
xiayige:"下一月",
nian:"年",
yues:"月",
zhourili:"周日历",
yuerili:"月日历",
shangyizhou:"上一周",
xiayizhou:"下一周",
shichangtishi:"",
renshutishi: '',
tixianzhu:"",

View File

@ -68,9 +68,9 @@ export default createStore({
views:0
},
qh: {
code: "86",
ename: "China",
name: "中国",
code: "",
ename: "",
name: "",
}
},
mutations: {

View File

@ -103,7 +103,7 @@ export function getweek(time: string, id: string,zhou?: number){
for(let i = 0; i < 7; i++){
console.log(i);
now = now.day(i + 1)
now = now.day(i)
date[i] = {day: ""};
date[i].day = now.year() + "-" + (now.month() + 1 < 10 ? '0' + (now.month() + 1) : (now.month() + 1)) + "-" + (now.date() < 10 ? '0' + now.date() : now.date())
date[i].list = []

View File

@ -23,12 +23,13 @@
</a-select-option>
<a-select-option value="Jiangsu"> Jiangsu </a-select-option>
</a-select> -->
<a-select v-model:value="hqqh" size="small" option-label-prop="label" @change="getquhao" class="getcode" show-search >
<a-select :default-value="hqqh" size="small" option-label-prop="label" @change="getquhao" class="getcode" show-search v-if="hqqh != '+' && hqqh">
<a-select-option v-for="(i,j) in quhaolist" :key="j" :value="i.name + '+' + i.code" :label="'+' + i.code">
{{i.name}}+{{i.code}}
</a-select-option>
<!-- <a-select-option value="Jiangsu"> Jiangsu </a-select-option> -->
</a-select>
<div class="getcode" v-else></div>
<div class="line"></div>
<a-input v-model:value="phone" style="width: 50%" :placeholder="lan.$t('shurushouji')" />
</a-input-group>
@ -79,7 +80,7 @@
<div class="lessons">
<!-- @click="tovideoxq(i.videoid)" -->
<div class="lessonitem" v-for="(i,j) in videolist" :key="j">
<div class="lessonitem" v-for="(i,j) in videolist" :key="j" >
<img :src="i.img" alt="" class="pic"/>
<div class="lessonname">
<div>{{i.title}}</div>
@ -119,11 +120,12 @@
import { computed, defineComponent, onMounted, reactive, ref } from "vue";
import LoginTab from "@/components/login/LoginTab.vue";
import NavTop from "@/components/NavTop.vue"
import { checksmscode, getquhaolist, getwebvideolist, loginpass, sendsms } from '@/api';
import { checksmscode, checkuser, getquhaolist, getwebvideolist, loginpass, sendsms } from '@/api';
import { message } from 'ant-design-vue';
import router from '@/router';
import { useI18n } from '@/utils/i18n';
import store from '@/store';
import { getValue } from '@/utils/common';
export default defineComponent({
name: "Login",
@ -147,7 +149,7 @@ export default defineComponent({
password: '123456'
})
const mrqh = computed(() => store.state.qh)
const hqqh = computed(() => { return mrqh.value.name + '+' + mrqh.value.code })
const hqqh = computed(() => { console.log(mrqh.value.name + '+' + mrqh.value.code); return (getValue("Lanvuage") == "en" ?mrqh.value.ename : mrqh.value.name) + '+' + mrqh.value.code })
const quhaolist = ref<any>([
{
code: "86",
@ -156,7 +158,7 @@ export default defineComponent({
}
])
const myquhao=ref(mrqh.value.code)
const videolist=ref<any>([{}])
const videolist=ref<any>([])
onMounted(async ()=>{
quhaolist.value=await getquhaolist()
@ -179,7 +181,7 @@ export default defineComponent({
* 点击获取验证码 触发倒计时
*/
let lock=false
const getcode: () => void = () => {
async function getcode() {
console.log(phone.value);
if (lock) {
console.log("lock")
@ -189,6 +191,13 @@ export default defineComponent({
message.error(lan.$t('shoujihaoweikong'));
return;
}
const iszc: any = await checkuser({phone: phone.value})
if(iszc.data){
if(iszc.data.type == 0){
message.error(lan.$t("yizhucexuesheng"))
}
return ;
}
lock = true;
console.log(myquhao.value,"quhao")
sendsms(myquhao.value, phone.value);
@ -205,7 +214,7 @@ export default defineComponent({
clearInterval(timestep);
}
}, 1000);
};
}
function getquhao(e?: any){
console.log(e)
myquhao.value = e.toString()

View File

@ -406,7 +406,7 @@ export default defineComponent({
}
.topbtn {
// width: 89px;
height: 17px;
min-height: 17px;
padding-left: 14px;
padding-right: 14px;
line-height: 17px;

View File

@ -509,7 +509,7 @@
<a-modal v-model:visible="huobi" :footer="null" :title="lan.$t('tishi')" >
<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>
<p style="margin-top: 1em;color: #f55456;font-weight: 600;">{{lan.$t('huobitishi')}}</p>
</div>
</a-modal>
@ -1121,6 +1121,7 @@ export default defineComponent({
border-radius: 17px;
position: relative;
.telbox {
margin-left: 15px;
font-size: 12px;
@ -1399,7 +1400,7 @@ export default defineComponent({
cursor: pointer;
user-select: none;
position: fixed;
top: 2.3rem;
top: 1.3rem;
right: 1rem;
}

View File

@ -260,7 +260,7 @@ export default defineComponent({
}
.topbtn {
// width: 89px;
height: 17px;
min-height: 17px;
padding-left: 14px;
padding-right: 14px;
line-height: 17px;

View File

@ -1,15 +1,15 @@
<template>
<div class="rank-list">
<div class="list-thead">
<div class="ranking-number">排名</div>
<div class="user-info">姓名</div>
<div class="hits">视频点击量</div>
<div class="ranking-number">{{lan.$t('paiming')}}</div>
<div class="user-info">{{lan.$t("xingming")}}</div>
<div class="hits">{{lan.$t("shipindianjiliang")}}</div>
</div>
<div class="list-body">
<div class="rank-item" v-for="(item,index) in newList" :key="index" :class="{'mine-item': item.isme }">
<div class="other-rank" :class="{'mine-rank': item.isme }">
<div class="ranking-number">
<span v-if="item.isme" class="mine">我的成绩</span>
<span v-if="item.isme" class="mine">{{lan.$t("wo")}}</span>
<div v-else>
<img src="@/static/images/rank_first.png" class="rank-img" v-if="index === 0" />
<img src="@/static/images/rank_second.png" class="rank-img" v-else-if="index === 1" />
@ -39,6 +39,7 @@
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { UserOutlined } from '@ant-design/icons-vue';
import { useI18n } from '@/utils/i18n';
export default defineComponent({
name: 'RankList',
@ -53,6 +54,7 @@ export default defineComponent({
setup(props) {
const deadLine = ref(4); // 线
const list = ref(props.list);
const lan = useI18n()
let mineRank = 0; //
list.value!.forEach((element: any) => {
if(element.isme) {
@ -67,6 +69,7 @@ export default defineComponent({
return {
newList,
deadLine,
lan
}
}
})

View File

@ -396,8 +396,9 @@ export default defineComponent({
}
.ant-row {
.ant-form-item-label {
width: 60px;
width: 130px;
margin: 0 30px 0 17px;
text-align: left;
> label {
font-size: 12px;
font-weight: 500;

View File

@ -203,11 +203,8 @@
</div>
<div class="notice-container" v-else>
<div class="title">{{ lan.$t("wuzhibozige") }}</div>
<div class="title sub-title">
<!-- 上一周/月您在平台视频点击量为
<span class="red">第24名</span>要在前
<span class="bule">20</span> 才能获得直播资格 -->
{{ lives.msg }}
<div class="title sub-title" v-html="lives.msg">
</div>
<rank-list :list="lives.data"></rank-list>
</div>
@ -666,7 +663,7 @@ export default defineComponent({
}
.ant-row {
.ant-form-item-label {
width: 60px;
width: 130px;
margin: 0 30px 0 17px;
> label {
font-size: 12px;

View File

@ -410,7 +410,7 @@ export default defineComponent({
}
.topbtn {
width: 57px;
height: 18px;
min-height: 18px;
font-size: 10px;
text-align: center;
line-height: 18px;

View File

@ -16,37 +16,37 @@
<div class="info">
<div class="infoitem">
<span class="label">{{lan.$t("xingming")}}:</span>
<span class="one-line-hide">{{i.name}}</span>
<span class="one-line-hide">&nbsp;{{i.name}}</span>
</div>
<div class="infoitem">
<span class="label">{{lan.$t('suozaiguojia')}}:</span>
<span class="one-line-hide">{{i.live}}</span>
<span class="one-line-hide">&nbsp;{{i.live}}</span>
</div>
<div class="infoitem">
<span class="label">{{lan.$t('nianling')}}:</span>
<span class="one-line-hide">{{i.age}}</span>
<span class="one-line-hide">&nbsp;{{i.age}}</span>
</div>
</div>
<div class="info">
<div class="infoitem">
<span class="label">{{lan.$t('xueshengmuyu')}}:</span>
<span class="one-line-hide">{{i.mtongue }}</span>
<span class="one-line-hide">&nbsp;{{i.mtongue }}</span>
</div>
<div class="infoitem">
<span class="label">{{lan.$t('xingqudian')}}:</span>
<span class="one-line-hide">{{i.interestStr}}</span>
<span class="one-line-hide">&nbsp;{{i.interestStr}}</span>
</div>
<div class="infoitem">
<span class="label">{{lan.$t("yuyandengji")}}:</span>
<span class="one-line-hide">asd</span>
<span class="one-line-hide">&nbsp;{{i.levelStr}}</span>
</div>
<div>{{lan.$t('canyupingtaishichang')}}<span class="time">{{i.longtime}}min</span></div>
<div>{{lan.$t('canyupingtaishichang')}}<span class="time">&nbsp;{{i.longtime}}min</span></div>
</div>
</div>
</div>

View File

@ -3,26 +3,26 @@
<div class="head">
<div @click="shang">
<img src="../../static/images/left.png" alt="">
上一月
{{lan.$t("shangyige")}}
</div>
{{month.year}}{{month.yue}}
{{month.year}}{{lan.$t("nian")}}{{month.yue}}{{lan.$t("yues")}}
<a-button type="primary" class="button" @click="navto()">
周日历
{{lan.$t("zhourili")}}
</a-button>
<div @click="xia">
下一月
{{lan.$t("xiayige")}}
<img src="../../static/images/right.png" alt="">
</div>
</div>
<div class="yue">
<div class="heads">
<div :class="{zhou: yue == 0 && month.zhou == 0}">周日</div>
<div :class="{zhou: yue == 0 && month.zhou == 1}">周一</div>
<div :class="{zhou: yue == 0 && month.zhou == 2}">周二</div>
<div :class="{zhou: yue == 0 && month.zhou == 3}">周三</div>
<div :class="{zhou: yue == 0 && month.zhou == 4}">周四</div>
<div :class="{zhou: yue == 0 && month.zhou == 5}">周五</div>
<div :class="{zhou: yue == 0 && month.zhou == 6}">周六</div>
<div :class="{zhou: yue == 0 && month.zhou == 0}">{{lan.$t("zhouri")}}</div>
<div :class="{zhou: yue == 0 && month.zhou == 1}">{{lan.$t("zhouyi")}}</div>
<div :class="{zhou: yue == 0 && month.zhou == 2}">{{lan.$t("zhouer")}}</div>
<div :class="{zhou: yue == 0 && month.zhou == 3}">{{lan.$t("zhousan")}}</div>
<div :class="{zhou: yue == 0 && month.zhou == 4}">{{lan.$t("zhousi")}}</div>
<div :class="{zhou: yue == 0 && month.zhou == 5}">{{lan.$t("zhouwu")}}</div>
<div :class="{zhou: yue == 0 && month.zhou == 6}">{{lan.$t("zhouliu")}}</div>
</div>
<div class="body">
<div class="row" v-for="(item,index) in month.date" :key="index">
@ -195,14 +195,14 @@ import { getdate, getDay } from "@/utils/date"
import { getdatelist } from '@/api';
import store from '@/store';
import router from '@/router';
import { useI18n } from '@/utils/i18n';
export default defineComponent({
props:{
},
setup(){
console.log(1)
const lan = useI18n();
const month: any = ref({zhou:0,data:[]});
const yue = ref(0);
const userid = computed(() => {
@ -287,7 +287,8 @@ export default defineComponent({
shang,
yue,
navto,
gotolive
gotolive,
lan
}
}
})

View File

@ -3,38 +3,38 @@
<div class="head">
<div @click="zhou--">
<img src="../../static/images/left.png" alt="" />
上一周
{{lan.$t("shangyizhou")}}
</div>
{{week.year}}{{week.yue}}
<a-button type="primary" class="button" @click="navto('/regime/date')"> 月日历 </a-button>
{{week.year}}{{lan.$t("nian")}}{{week.yue}}{{lan.$t("yues")}}
<a-button type="primary" class="button" @click="navto('/regime/date')"> {{lan.$t("yuerili")}} </a-button>
<div @click="zhou++">
下一周
{{lan.$t("xiayizhou")}}
<img src="../../static/images/right.png" alt="" />
</div>
</div>
<div class="week">
<div class="heads">
<div></div>
<div :class="{ zhou: zhou == 0 && week.zhou == 0 }">
{{lan.$t("zhouri")}}<span>{{ week.date[0].day }}</span>
</div>
<div :class="{ zhou: zhou == 0 && week.zhou == 1 }">
周一<span>{{ week.date[0].day }}</span>
{{lan.$t("zhouyi")}}<span>{{ week.date[1].day }}</span>
</div>
<div :class="{ zhou: zhou == 0 && week.zhou == 2 }">
周二<span>{{ week.date[1].day }}</span>
{{lan.$t("zhouer")}}<span>{{ week.date[2].day }}</span>
</div>
<div :class="{ zhou: zhou == 0 && week.zhou == 3 }">
周三<span>{{ week.date[2].day }}</span>
{{lan.$t("zhousan")}}<span>{{ week.date[3].day }}</span>
</div>
<div :class="{ zhou: zhou == 0 && week.zhou == 4 }">
周四<span>{{ week.date[3].day }}</span>
{{lan.$t("zhousi")}}<span>{{ week.date[4].day }}</span>
</div>
<div :class="{ zhou: zhou == 0 && week.zhou == 5 }">
周五<span>{{ week.date[4].day }}</span>
{{lan.$t("zhouwu")}}<span>{{ week.date[5].day }}</span>
</div>
<div :class="{ zhou: zhou == 0 && week.zhou == 6 }">
周六<span>{{ week.date[5].day }}</span>
</div>
<div :class="{ zhou: zhou == 0 && week.zhou == 0 }">
周日<span>{{ week.date[6].day }}</span>
{{lan.$t("zhouliu")}}<span>{{ week.date[6].day }}</span>
</div>
</div>
<div class="body">
@ -222,7 +222,7 @@
width: 100%;
position: absolute;
top: 0;
left: 128px;
left: 165px;
.heng{
display: flex;
align-items: center;
@ -242,7 +242,7 @@
}
.times{
font-size: 11px;
color: #D12C2E;
color: #08AE98;
}
}
}
@ -256,6 +256,7 @@ import { getdatelist, userinfo } from '@/api';
import router from '@/router';
import dayjs from 'dayjs';
import { useRoute } from 'vue-router';
import { useI18n } from '@/utils/i18n';
export default defineComponent({
props: {},
@ -265,7 +266,7 @@ export default defineComponent({
const time: any = useRoute().query.time;
let userid = userinfo.value.memberid;
const week = ref<any>(getweek(time, userinfo.value.zoneValue));
const lan = useI18n()
function getdates(userid: number){
getdatelist(week.value.start, week.value.end, userid).then((res: any)=>{
console.log(res)
@ -358,7 +359,8 @@ export default defineComponent({
top,
times,
xs,
tolive
tolive,
lan
};
},
});