嗨森逛PC管理端
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.
 
 
 
 
high-web/src/app/services/merchant.service.ts

53 lines
1.3 KiB

import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class MerchantService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
* 查询商户列表
*
* @param paramsObject 对象
* @param callBack 回调
*/
public getMerchantList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highMerchant/getMerchantList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* 新增商户
*
* @param params 上传对象
* @param callBack 回调
* @return data 返回结果
*/
public insertMerchant(params: object, callBack) {
this.http.post(environment.baseUrl + 'highMerchant/insertMerchant', params).subscribe(data => {
callBack(data);
});
}
/**
* 根据id查询详情
*
* @param merchantId 职位id
* @param callBack 回调
*/
public getMerchantById(merchantId: number, callBack) {
this.http.get(environment.baseUrl + 'highMerchant/getMerchantById?id=' + merchantId).subscribe(data => {
callBack(data);
});
}
}