import { Component } from '@angular/core';
import Parse from "parse";

@Component({
  selector: 'app-tab1',
  templateUrl: 'tab1.page.html',
  styleUrls: ['tab1.page.scss']
})
export class Tab1Page {

  
  isSignedIn: boolean = false;

  signIn() {
    if (!this.isSignedIn) {
      this.isSignedIn = true;
    } else {
      alert('您今天已经签到过了！');
    }
  }

//时钟
  currentTime: Date = new Date();

  constructor() { }

  ngOnInit(): void {
    setInterval(() => {
      this.currentTime = new Date();
    }, 1000);
    this.loadNovels()
  }
  currentType:string = "全部"
    novelList:Array<Parse.Object> = []
    async loadNovels(){
    let query = new Parse.Query("NovelInformation");
    let list = await query.find();
    this.novelList = list
    }

  customItems:Array<any> = [
    {title:"生活"},
    {title:"言情"},
    {title:"仙侠"},
    {title:"修炼"},
    {title:"校园"},
    {title:"恐怖"},
  ]



}
