Browse Source

fix: 全局ajax问题

tags/PMS_V1.0.0_Alpha6
chenglb 1 year ago
parent
commit
ece232d302
  1. 4
      src/config/ajax.js
  2. 2
      src/pages/InRoadMgm/PersonMgm/PersonInfo/loadable.jsx

4
src/config/ajax.js

@ -114,7 +114,7 @@ function ajax(ajaxData = {}) {
if(JSON.parse(err.config.data)?.guard){ if(JSON.parse(err.config.data)?.guard){
window.queryRecord[err.config.url].ing = false window.queryRecord[err.config.url].ing = false
} }
if(location.hash.replace(/\?.*/, '') != JSON.parse(err.config.data)?.pageHash){
if(location.hash.replace(/\?.*/, '').replace('#/',"").replace('/', '_') != JSON.parse(err.config.data)?.pageHash){
console.log('接口异常,但页面已销毁') console.log('接口异常,但页面已销毁')
reject(new Error(1)) reject(new Error(1))
return return
@ -126,7 +126,7 @@ function ajax(ajaxData = {}) {
window.queryRecord[err.config.url].ing = false window.queryRecord[err.config.url].ing = false
} }
} }
if(location.hash.replace(/\?.*/, '') != err.config.params.pageHash){
if(location.hash.replace(/\?.*/, '').replace('#/',"").replace('/', '_') != err.config.params.pageHash){
console.log('接口异常,但页面已销毁') console.log('接口异常,但页面已销毁')
reject(new Error(1)) reject(new Error(1))
return return

2
src/pages/InRoadMgm/PersonMgm/PersonInfo/loadable.jsx

@ -798,7 +798,7 @@ function PersonInfo() {
yisaLabel="资产名称" yisaLabel="资产名称"
yisaData={assetEditOptions} yisaData={assetEditOptions}
mode="multiple" mode="multiple"
defaultValue={currentPersonInfo.good_ids ? currentPersonInfo.good_ids.split(',') : []}
defaultValue={currentPersonInfo.good_ids ? currentPersonInfo.good_ids.split(',') : []} // ,
placeholder="" placeholder=""
hasUnlimited={false} hasUnlimited={false}
showClose={true} showClose={true}

Loading…
Cancel
Save