|
|
@ -15,61 +15,73 @@ const Api = { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
export const getProvinces = () => { |
|
|
export const getProvinces = () => { |
|
|
return defHttp.get<Province[]>({ |
|
|
return defHttp.get<Province[]>( |
|
|
|
|
|
{ |
|
|
url: Api.GetProvinces, |
|
|
url: Api.GetProvinces, |
|
|
//baseURL: Host,
|
|
|
//baseURL: Host,
|
|
|
headers: { |
|
|
headers: { |
|
|
'X-Requested-With': 'XMLHttpRequest' |
|
|
'X-Requested-With': 'XMLHttpRequest', |
|
|
} |
|
|
}, |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
apiUrl: '', |
|
|
apiUrl: '', |
|
|
joinTime: false, |
|
|
joinTime: false, |
|
|
withToken: false, |
|
|
withToken: false, |
|
|
withAcceptLanguage: false, |
|
|
withAcceptLanguage: false, |
|
|
}); |
|
|
}, |
|
|
|
|
|
); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
export const getPosition = () => { |
|
|
export const getPosition = () => { |
|
|
return defHttp.get<Position>({ |
|
|
return defHttp.get<Position>( |
|
|
|
|
|
{ |
|
|
url: Api.GetPosition, |
|
|
url: Api.GetPosition, |
|
|
//baseURL: Host,
|
|
|
//baseURL: Host,
|
|
|
headers: { |
|
|
headers: { |
|
|
'X-Requested-With': 'XMLHttpRequest', |
|
|
'X-Requested-With': 'XMLHttpRequest', |
|
|
} |
|
|
}, |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
apiUrl: '', |
|
|
apiUrl: '', |
|
|
joinTime: false, |
|
|
joinTime: false, |
|
|
withToken: false, |
|
|
withToken: false, |
|
|
withAcceptLanguage: false, |
|
|
withAcceptLanguage: false, |
|
|
}); |
|
|
}, |
|
|
} |
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
export const getCitys = (provinceCode: string) => { |
|
|
export const getCitys = (provinceCode: string) => { |
|
|
return defHttp.get<Position[]>({ |
|
|
return defHttp.get<Position[]>( |
|
|
url: format(Api.GetCitys, {province: provinceCode}), |
|
|
{ |
|
|
|
|
|
url: format(Api.GetCitys, { province: provinceCode }), |
|
|
//baseURL: Host,
|
|
|
//baseURL: Host,
|
|
|
headers: { |
|
|
headers: { |
|
|
'X-Requested-With': 'XMLHttpRequest' |
|
|
'X-Requested-With': 'XMLHttpRequest', |
|
|
} |
|
|
}, |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
apiUrl: '', |
|
|
apiUrl: '', |
|
|
joinTime: false, |
|
|
joinTime: false, |
|
|
withToken: false, |
|
|
withToken: false, |
|
|
withAcceptLanguage: false, |
|
|
withAcceptLanguage: false, |
|
|
}); |
|
|
}, |
|
|
} |
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
export const getWeather = (cityCode: string) => { |
|
|
export const getWeather = (cityCode: string) => { |
|
|
return defHttp.get<WeatherResult>({ |
|
|
return defHttp.get<WeatherResult>( |
|
|
url: format(Api.GetWeather, {code: cityCode}), |
|
|
{ |
|
|
|
|
|
url: format(Api.GetWeather, { code: cityCode }), |
|
|
//baseURL: Host,
|
|
|
//baseURL: Host,
|
|
|
headers: { |
|
|
headers: { |
|
|
'X-Requested-With': 'XMLHttpRequest' |
|
|
'X-Requested-With': 'XMLHttpRequest', |
|
|
} |
|
|
}, |
|
|
}, { |
|
|
}, |
|
|
|
|
|
{ |
|
|
apiUrl: '', |
|
|
apiUrl: '', |
|
|
joinTime: false, |
|
|
joinTime: false, |
|
|
withToken: false, |
|
|
withToken: false, |
|
|
withAcceptLanguage: false, |
|
|
withAcceptLanguage: false, |
|
|
}); |
|
|
}, |
|
|
} |
|
|
); |
|
|
|
|
|
}; |
|
|
|