| | |
| | | mapContainer = param; |
| | | } |
| | | |
| | | export const fetchMapPreferences = async (zoneId, setMapPreferences) => { |
| | | try { |
| | | const res = await request.post('/map/config/preferences', { |
| | | zoneId: zoneId |
| | | }, { |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' } |
| | | }); |
| | | const { code, msg, data } = res.data; |
| | | if (code === 200) { |
| | | setMapPreferences(data); |
| | | return data || {}; |
| | | } |
| | | notify?.error(msg); |
| | | } catch (error) { |
| | | notify?.error(error.message); |
| | | console.error(error.message); |
| | | } |
| | | return {}; |
| | | } |
| | | |
| | | export const fetchMapData = (zoneId, setRcsStatus, setCurSprite) => { |
| | | Tool.clearMapData(); |
| | | return request.post('/map/data/fetch', { |