xbx #92
@ -13,13 +13,13 @@ import { del, get, post, put, setToken } from './base'
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export async function loginpass(phone: string, password: string,type?: number,smscode?: string){
|
export async function loginpass(phone: string, password: string,type?: number,smscode?: string){
|
||||||
let newdata={}
|
let newdata: any = {}
|
||||||
if(type==1){
|
if(type==1){
|
||||||
newdata={type:type?type:2,username: phone, smscode: smscode}
|
newdata={type:type?type:2,username: phone, smscode: smscode}
|
||||||
}else{
|
}else{
|
||||||
newdata={type:type?type:2,username: phone, password: password}
|
newdata={type:type?type:2,username: phone, password: password}
|
||||||
}
|
}
|
||||||
|
newdata.logintype = 1;
|
||||||
const res = await post<LoginData>("login",newdata);
|
const res = await post<LoginData>("login",newdata);
|
||||||
console.log(res.code)
|
console.log(res.code)
|
||||||
if(res.code == 1){
|
if(res.code == 1){
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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 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="item" :class="{'selitem': j == selnum, 'seltop': j == selnum - 1, 'selbottom': j == selnum + 1}">
|
||||||
<div class="route">
|
<div class="route">
|
||||||
@ -201,13 +201,18 @@ export default defineComponent({
|
|||||||
router.replace("/");
|
router.replace("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function tuichu(){
|
||||||
|
console.log(1121)
|
||||||
|
}
|
||||||
|
|
||||||
return{
|
return{
|
||||||
list,
|
list,
|
||||||
routeto,
|
routeto,
|
||||||
selnum,
|
selnum,
|
||||||
userinfo,
|
userinfo,
|
||||||
logout,
|
logout,
|
||||||
mouse
|
mouse,
|
||||||
|
tuichu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -41,7 +41,7 @@ export function getdate(yue?: number): GetDate{
|
|||||||
while(i < month){
|
while(i < month){
|
||||||
|
|
||||||
for(w = 0; w < week; w++){
|
for(w = 0; w < week; w++){
|
||||||
date[0][w] = {};
|
date[0][w] = {list:[]};
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
const zhou = Math.floor((i + w - 1) / 7)
|
const zhou = Math.floor((i + w - 1) / 7)
|
||||||
@ -55,7 +55,7 @@ export function getdate(yue?: number): GetDate{
|
|||||||
date[zhou].push(d)
|
date[zhou].push(d)
|
||||||
}
|
}
|
||||||
while(date[date.length - 1].length < 7){
|
while(date[date.length - 1].length < 7){
|
||||||
date[date.length - 1].push({})
|
date[date.length - 1].push({list:[]})
|
||||||
}
|
}
|
||||||
console.log(date)
|
console.log(date)
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(month.value.date)
|
console.log(month.value.date, 121)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function xia(){
|
function xia(){
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<img src="" alt="" />
|
<img src="" alt="" />
|
||||||
上一周
|
上一周
|
||||||
</div>
|
</div>
|
||||||
2020年10月
|
{{week.year}}年{{week.yue}}月
|
||||||
<a-button type="primary" class="button" @click="navto()"> 月日历 </a-button>
|
<a-button type="primary" class="button" @click="navto()"> 月日历 </a-button>
|
||||||
<div @click="zhou++">
|
<div @click="zhou++">
|
||||||
下一周
|
下一周
|
||||||
@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-for="i in 7" :key="i">
|
<div v-for="i in 7" :key="i">
|
||||||
<div class="day">
|
<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">
|
<div class="one-line-hide" style="max-width: 1.5rem">
|
||||||
{{week.date[i -1].list[item - 1].title}}
|
{{week.date[i -1].list[item - 1].title}}
|
||||||
</div>
|
</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)].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)].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)].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);
|
console.log(week.value);
|
||||||
getdates(userid)
|
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(){
|
function navto(){
|
||||||
router.push("/regime/date")
|
router.push("/regime/date")
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
zhou,
|
zhou,
|
||||||
week,
|
week,
|
||||||
navto
|
navto,
|
||||||
|
zhuangtai
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user