You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
978 B
42 lines
978 B
import { Injectable } from '@angular/core';
|
|
import {environment} from '../../environments/environment';
|
|
import {HttpClient} from '@angular/common/http';
|
|
import {CommonsService} from './commons.service';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class MerAccountService {
|
|
|
|
constructor(
|
|
private http: HttpClient,
|
|
private common: CommonsService
|
|
) { }
|
|
|
|
/**
|
|
* 充值
|
|
*
|
|
* @param params 上传对象
|
|
* @param callBack 回调
|
|
* @return data 返回结果
|
|
*/
|
|
public recharge(params: object, callBack) {
|
|
this.http.post(environment.baseUrl + 'merAccount/recharge', params).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 充值
|
|
*
|
|
* @param params 上传对象
|
|
* @param callBack 回调
|
|
* @return data 返回结果
|
|
*/
|
|
public getMerAccount(merId: number, callBack) {
|
|
this.http.get(environment.baseUrl + 'merAccount/getMerAccount?merId=' + merId).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
|
|
}
|
|
|