123456789101112131415161718192021 |
- import axios from 'axios';
- const service = axios.create({
- timeout: 6000,
- });
- export interface ConfigParams {
- isDev: boolean;
- webSiteUrl: string;
- webApiServiceUrl: string
- }
- export const getConfig = async <ConfigParams>(
- ): Promise<ConfigParams> => {
- try {
- const res = await service.request({url: '../hzyz/mobile/appconfig.json'});
- return res.data as ConfigParams;
- } catch (error: any) {
- return Promise.reject(null);
- }
- };
|