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

This commit is contained in:
asd 2020-10-29 10:40:52 +08:00
commit 99a36363da
5 changed files with 30 additions and 10 deletions

View File

@ -13,13 +13,13 @@ import { del, get, post, put, setToken } from './base'
*/
export async function loginpass(phone: string, password: string,type?: number,smscode?: string){
let newdata={}
let newdata: any = {}
if(type==1){
newdata={type:type?type:2,username: phone, smscode: smscode}
}else{
newdata={type:type?type:2,username: phone, password: password}
}
newdata.logintype = 1;
const res = await post<LoginData>("login",newdata);
console.log(res.code)
if(res.code == 1){

View File

@ -7,7 +7,7 @@
</div>
</div>
<div class="list">
<div class="list" @mouseout="tuichu()">
<div v-for="(i,j) in list" :key="j" style="overflow: hidden;" @click="routeto(j)" @mouseenter="mouse(j)">
<div class="item" :class="{'selitem': j == selnum, 'seltop': j == selnum - 1, 'selbottom': j == selnum + 1}">
<div class="route">
@ -201,13 +201,18 @@ export default defineComponent({
router.replace("/");
}
function tuichu(){
console.log(1121)
}
return{
list,
routeto,
selnum,
userinfo,
logout,
mouse
mouse,
tuichu
}
}
})

View File

@ -41,7 +41,7 @@ export function getdate(yue?: number): GetDate{
while(i < month){
for(w = 0; w < week; w++){
date[0][w] = {};
date[0][w] = {list:[]};
}
i++;
const zhou = Math.floor((i + w - 1) / 7)
@ -55,7 +55,7 @@ export function getdate(yue?: number): GetDate{
date[zhou].push(d)
}
while(date[date.length - 1].length < 7){
date[date.length - 1].push({})
date[date.length - 1].push({list:[]})
}
console.log(date)

View File

@ -223,7 +223,7 @@ export default defineComponent({
}
}
}
console.log(month.value.date)
console.log(month.value.date, 121)
})
}
function xia(){

View File

@ -5,7 +5,7 @@
<img src="" alt="" />
上一周
</div>
2020年10
{{week.year}}{{week.yue}}
<a-button type="primary" class="button" @click="navto()"> 月日历 </a-button>
<div @click="zhou++">
下一周
@ -46,7 +46,7 @@
</div>
<div v-for="i in 7" :key="i">
<div class="day">
<div class="next" 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 != ''">
<div class="one-line-hide" style="max-width: 1.5rem">
{{week.date[i -1].list[item - 1].title}}
</div>
@ -234,6 +234,7 @@ export default defineComponent({
week.value.date[j].list[gethour(res[i].dateline)].num = res[i].livetime
week.value.date[j].list[gethour(res[i].dateline)].title = res[i].title
week.value.date[j].list[gethour(res[i].dateline)].time = gettime(res[i].dateline, res[i].livetime)
week.value.date[j].list[gethour(res[i].dateline)].zhuangtai = res[i].livestatus
}
}
}
@ -248,13 +249,27 @@ export default defineComponent({
console.log(week.value);
getdates(userid)
});
function zhuangtai(index: number){
switch (index) {
case 0:
return 'next'
case 1:
return 'ing'
case 2:
return 'old'
default:
return 'old'
}
}
function navto(){
router.push("/regime/date")
}
return {
zhou,
week,
navto
navto,
zhuangtai
};
},
});