一级a做爰片免费网站短视频播放云优客seo排名公司
参考文章:https://blog.csdn.net/qq_45560350/article/details/130588101
解决问题:再图层中点击仓库的时候,点击后又取消掉,我们希望这个请求可以被取消掉,我们口可以利用AbortController
控制器对象
实操:
1.再请求前创造一个构造器
const layerName__controller = {}layerName__controller[layerName] = new AbortController();getWFSItemByEventApi(params, {signal: layerName__controller[layerName].signal,}).then(res => {}).finally(() => {layerName__controller[layerName] = null;})
2.我们的请求,要在请求体里面添加上这个属性
export const getWFSItemByEventApi = (params, othrer) => {return http.request<ResultType>({url: "/cupCommonApi/cup-emergency/eventresource/getWFSItemByEvent",method: "post",data: params,...othrer,});
};
3.取消请求
// 删除图层layerName__controller[data.layerName]?.abort();