123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import { Component, OnInit } from '@angular/core';
- import { IonicModule } from '@ionic/angular';
- import * as Parse from 'parse';
- import { Router, ActivatedRoute } from '@angular/router';
- import { NavComponent } from '../../../app/components/nav/nav.component';
- @Component({
- selector: 'app-wattle',
- templateUrl: './wattle.component.html',
- styleUrls: ['./wattle.component.scss'],
- standalone: true,
- imports: [IonicModule,NavComponent],
- })
- export class WattleComponent implements OnInit {
- company: any = localStorage.getItem('company');
- constructor(private activatRoute: ActivatedRoute,
- private router: Router,) { }
- account: any = {}
- ngOnInit() {
- this.activatRoute.paramMap.subscribe(parms => {
- this.getAccount()
- })
- }
- back() {
- this.router.navigate(['metayoung/tabs/my'])
- }
- async getAccount() {
- let id = Parse.User.current()?.id
- let Account = new Parse.Query("Account")
- Account.equalTo("user", id)
- Account.equalTo("company", this.company)
- let account = await Account.first()
- this.account = account?.toJSON()
- }
- // showBalance(balance:number) {
- // if (balance) {
- // return Number(balance.toFixed(2))
- // } else {
- // return 0
- // }
- // }
- record() {
- this.router.navigate(['metayoung/record'])
- }
- records() {
- this.router.navigate(['metayoung/records'])
- }
- recharge() {
- this.router.navigate(['metayoung/recharge'])
- }
- withdrawal() {
- this.router.navigate(['metayoung/withdrawal'])
- }
- toBank() {
- this.router.navigate(['account/bankcard'])
- }
- }
|