| | |
| | | import * as PIXI from 'pixi.js'; |
| | | import * as TWEEDLE from 'tweedle.js'; |
| | | import Http from '@/utils/http'; |
| | | import { message } from 'antd'; |
| | | import { API_TIMEOUT } from '@/config/setting' |
| | | |
| | | let app = null; |
| | | let mapContainer = null; |
| | |
| | | |
| | | } |
| | | |
| | | export const saveMapData = async () => { |
| | | export const saveMapData = async (intl) => { |
| | | if (!mapContainer) { |
| | | return; |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | const resp = await Http.doPost('api/map/save', { itemList: mapItemList }) |
| | | console.log(resp); |
| | | const closeLoading = message.loading({ content: intl.formatMessage({ id: 'common.loading.api.message', defaultMessage: '等待服务器......' }), duration: API_TIMEOUT }); |
| | | await Http.doPostPromise('api/map/save', { itemList: mapItemList }, (res) => { |
| | | closeLoading(); |
| | | console.log(res); |
| | | }).catch((error) => { |
| | | closeLoading(); |
| | | console.error(error); |
| | | }) |
| | | } |