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.
29 lines
799 B
29 lines
799 B
import { Injectable } from '@angular/core';
|
|
import {HttpClient} from "@angular/common/http";
|
|
import {environment} from "../../../environments/environment";
|
|
import {ObjectData} from "../../utils/objectData.service";
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class CommonService {
|
|
|
|
constructor(private http: HttpClient) { }
|
|
|
|
/**
|
|
*
|
|
* 查询数据字典
|
|
* @param codeType 【非必填】 码值类型
|
|
* @param codeValue 【非必填】码值
|
|
* @param callBack
|
|
*/
|
|
public queryDictionary(codeType: string, codeValue: string, callBack:any) {
|
|
const param = {
|
|
codeType: codeType,
|
|
codeValue: codeValue
|
|
};
|
|
this.http.get(environment.baseUrl + 'common/queryDictionary?'+ObjectData.objectByString(param)).subscribe(data => {
|
|
callBack(data);
|
|
});
|
|
}
|
|
}
|
|
|