import { Component, OnInit } from '@angular/core';
import { NavComponent } from '../../../app/components/nav/nav.component';
import { AiChatService } from '../../../services/aichart.service';
import { ionicStandaloneModules } from '../../ionic-standalone.modules';
@Component({
  selector: 'app-account-log',
  templateUrl: './account-log.component.html',
  styleUrls: ['./account-log.component.scss'],
  standalone: true,
  imports: [...ionicStandaloneModules, NavComponent],
})
export class AccountLogComponent implements OnInit {
  list: Array<any> = [
    // {
    //   title: '会员充值',
    //   time: '2022-08-08 12:12:12',
    //   num: '1000',
    //   orderNum:'C20220808121212',
    //   state: '已到账'
    // },
    // {
    //   title: '钻石充值',
    //   num: '1000',
    //   time: '2022-08-08 12:12:12',
    //   orderNum:'C20220808121212',
    //   money: '1000',
    // }
  ];
  getType(s: string): string {
    let obj: any = {
      recharge: '充值',
      used: '消费',
    };
    return obj[s];
  }
  constructor(private aiServ: AiChatService) {}

  async ngOnInit() {
    this.list = await this.aiServ.getAccountLog();
    console.log(this.list);
  }
}
