日历跳转完成
This commit is contained in:
		
							parent
							
								
									fe3e929898
								
							
						
					
					
						commit
						3874f6ab2e
					
				@ -28,10 +28,10 @@
 | 
				
			|||||||
                <div class="row" v-for="(item,index) in month.date" :key="index">
 | 
					                <div class="row" v-for="(item,index) in month.date" :key="index">
 | 
				
			||||||
                    <div v-for="(i,j) in item" :key="j">
 | 
					                    <div v-for="(i,j) in item" :key="j">
 | 
				
			||||||
                        <div class="day">
 | 
					                        <div class="day">
 | 
				
			||||||
                            <div :class="{ing: yue == 0 && month.day == i.day,old: (yue < 0 || (yue == 0 && month.day > i.day)) && i.list.length != 0 ,next: (yue > 0 || (yue == 0 && month.day < i.day)) && i.list.length != 0 }" @click="navto(i.time)">
 | 
					                            <div :class="{ing:i.s == 1, old: i.s == 2 ,next: i.s == 0 }" @click="navto(i.time)">
 | 
				
			||||||
                                    {{i.day}}
 | 
					                                    {{i.day}}
 | 
				
			||||||
                                    <div class="item" v-for="(i,j) in i.list" :key="j">
 | 
					                                    <div class="item" @click.stop="gotolive(i.id, i.statit)" v-for="(i,j) in i.list" :key="j">
 | 
				
			||||||
                                        <div></div><p>{{i}}</p>
 | 
					                                        <div></div><p>{{i.title}}</p>
 | 
				
			||||||
                                    </div>
 | 
					                                    </div>
 | 
				
			||||||
                                <!-- <span class="ing"></span> -->
 | 
					                                <!-- <span class="ing"></span> -->
 | 
				
			||||||
                                <!-- <span class="next"></span> -->
 | 
					                                <!-- <span class="next"></span> -->
 | 
				
			||||||
@ -218,7 +218,12 @@ export default defineComponent({
 | 
				
			|||||||
                                if(month.value.date[j][k].list == undefined){
 | 
					                                if(month.value.date[j][k].list == undefined){
 | 
				
			||||||
                                    month.value.date[j][k].list = [];
 | 
					                                    month.value.date[j][k].list = [];
 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
                                month.value.date[j][k].list.push(res[i].title);
 | 
					                                if(!month.value.date[j][k].s){
 | 
				
			||||||
 | 
					                                    month.value.date[j][k].s = res[i].livestatus
 | 
				
			||||||
 | 
					                                }else if(month.value.date[j][k].s != 1){
 | 
				
			||||||
 | 
					                                    res[i].livestatus == 0 && month.value.date[j][k].s == 2 ? month.value.date[j][k].s = 0 : month.value.date[j][k].s = 2
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                                month.value.date[j][k].list.push({title: res[i].title, id: res[i].liveid, statit: res[i].livestatus});
 | 
				
			||||||
                                console.log(day)
 | 
					                                console.log(day)
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
@ -245,13 +250,25 @@ export default defineComponent({
 | 
				
			|||||||
        function navto(date: string){
 | 
					        function navto(date: string){
 | 
				
			||||||
            router.push("/regime/week?time=" + (!date? '' : date) )
 | 
					            router.push("/regime/week?time=" + (!date? '' : date) )
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        function gotolive(id: string, s: number){
 | 
				
			||||||
 | 
					            let url = '';
 | 
				
			||||||
 | 
					            switch (s) {
 | 
				
			||||||
 | 
					                case 1:
 | 
				
			||||||
 | 
					                    url = '/regime/liveing';
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                default:
 | 
				
			||||||
 | 
					                    url = '/regime/livedetail';
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            router.push({path: url,query: { id: id }})
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        getdates(userid.value);
 | 
					        getdates(userid.value);
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            month,
 | 
					            month,
 | 
				
			||||||
            xia,
 | 
					            xia,
 | 
				
			||||||
            shang,
 | 
					            shang,
 | 
				
			||||||
            yue,
 | 
					            yue,
 | 
				
			||||||
            navto
 | 
					            navto,
 | 
				
			||||||
 | 
					            gotolive
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user