add credit start
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {NavController} from "@ionic/angular";
|
||||
import {LoadingController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
@@ -30,6 +30,7 @@ export class AddcreditPage implements OnInit {
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
public blogDataService: BlogDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
public userWalletService: UserWalletService) {
|
||||
this.walletData = this.router.getCurrentNavigation().extras.state;
|
||||
if ( this.walletData != undefined ){
|
||||
@@ -94,8 +95,11 @@ export class AddcreditPage implements OnInit {
|
||||
};
|
||||
|
||||
startCreditResult:any;
|
||||
contineAddCredit(processor){
|
||||
|
||||
async contineAddCredit(processor){
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Starting...',
|
||||
duration: 2500,
|
||||
});
|
||||
this.startCreditData = {
|
||||
member_id:this.sessionDataProviderService.member_id,
|
||||
sessionid:this.sessionDataProviderService.session,
|
||||
@@ -105,7 +109,8 @@ export class AddcreditPage implements OnInit {
|
||||
card_uid: this.payment_card,
|
||||
action:11053
|
||||
};
|
||||
|
||||
this.isDisabled=true;
|
||||
loading.present();
|
||||
this.wrenchService.startCredit(this.startCreditData).subscribe(
|
||||
startCreditResult => {
|
||||
console.log("startCreditResult TOTAL RETURN->", this.startCreditResult);
|
||||
|
||||
Reference in New Issue
Block a user