请求头加入Content-Type
This commit is contained in:
parent
3c63397501
commit
906947359f
@ -9,7 +9,7 @@ import {
|
|||||||
} from '../util/AjaxUtils'
|
} from '../util/AjaxUtils'
|
||||||
|
|
||||||
|
|
||||||
// 开发环境
|
// // 开发环境
|
||||||
// const operatorPluginBaseUrl = 'http://192.168.0.115:8099' //开票
|
// const operatorPluginBaseUrl = 'http://192.168.0.115:8099' //开票
|
||||||
// const aiShopBaseUrl = 'http://192.168.0.115:8081'//买卖'
|
// const aiShopBaseUrl = 'http://192.168.0.115:8081'//买卖'
|
||||||
// const operatorBaseUrl = 'http://192.168.0.15:8091' //绑定手机号
|
// const operatorBaseUrl = 'http://192.168.0.15:8091' //绑定手机号
|
||||||
@ -27,8 +27,27 @@ request.interceptors.request.use(
|
|||||||
config.headers = config.headers || {}
|
config.headers = config.headers || {}
|
||||||
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
||||||
config.headers['Content-Type'] = 'application/json';
|
config.headers['Content-Type'] = 'application/json';
|
||||||
|
// config.data = { unused: 0 }
|
||||||
|
if (config.method === 'get' ) {
|
||||||
|
if (!config.data) {
|
||||||
config.data = { unused: 0 }
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.method === 'put') {
|
||||||
|
if (!config.data) {
|
||||||
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.method === 'post') {
|
||||||
|
if (!config.data) {
|
||||||
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.method === 'delete') {
|
||||||
|
if (!config.data) {
|
||||||
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -57,22 +76,27 @@ aiShopRequest.interceptors.request.use(
|
|||||||
config.headers = config.headers || {}
|
config.headers = config.headers || {}
|
||||||
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
||||||
config.headers['Content-Type'] = 'application/json';
|
config.headers['Content-Type'] = 'application/json';
|
||||||
|
// config.data = { unused: 0 }
|
||||||
|
if (config.method === 'get' ) {
|
||||||
|
if (!config.data) {
|
||||||
config.data = { unused: 0 }
|
config.data = { unused: 0 }
|
||||||
// if (config.method === 'get' ) {
|
}
|
||||||
// if (!config.data) {
|
}
|
||||||
// config.data = { unused: 0 }
|
if (config.method === 'put') {
|
||||||
// }
|
if (!config.data) {
|
||||||
// }
|
config.data = { unused: 0 }
|
||||||
// if (config.method === 'put') {
|
}
|
||||||
// if (!config.data) {
|
}
|
||||||
// config.data = { unused: 0 }
|
if (config.method === 'post') {
|
||||||
// }
|
if (!config.data) {
|
||||||
// }
|
config.data = { unused: 0 }
|
||||||
// if (config.method === 'post') {
|
}
|
||||||
// if (!config.data) {
|
}
|
||||||
// config.data = { unused: 0 }
|
if (config.method === 'delete') {
|
||||||
// }
|
if (!config.data) {
|
||||||
// }
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
@ -99,7 +123,28 @@ phoneRequest.interceptors.request.use(
|
|||||||
config.headers = config.headers || {}
|
config.headers = config.headers || {}
|
||||||
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
config.headers['Auth'] = token ? `Bearer ${token}` : '';
|
||||||
config.headers['Content-Type'] = 'application/json';
|
config.headers['Content-Type'] = 'application/json';
|
||||||
|
// config.data = { unused: 0 }
|
||||||
|
if (config.method === 'get' ) {
|
||||||
|
if (!config.data) {
|
||||||
config.data = { unused: 0 }
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.method === 'put') {
|
||||||
|
if (!config.data) {
|
||||||
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.method === 'post') {
|
||||||
|
if (!config.data) {
|
||||||
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config.method === 'delete') {
|
||||||
|
if (!config.data) {
|
||||||
|
config.data = { unused: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
|
|||||||
import RefunModal from '../../components/RefunModal/RefunModal.tsx'
|
import RefunModal from '../../components/RefunModal/RefunModal.tsx'
|
||||||
import CorrectionModal from '../../components/CorrectionModal/CorrectionModal.tsx'
|
import CorrectionModal from '../../components/CorrectionModal/CorrectionModal.tsx'
|
||||||
import ContractModal from '../../components/ContractModal/ContractModal.tsx'
|
import ContractModal from '../../components/ContractModal/ContractModal.tsx'
|
||||||
// import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
|
import MenuWithBottomButtom from '../../components/menu/MenuWithBottomButton.tsx'
|
||||||
// import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
|
// import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
|
||||||
// import ListProj from "../../components/list/ListProj.tsx";
|
// import ListProj from "../../components/list/ListProj.tsx";
|
||||||
// import ListProjAgent from "../../components/list/ListProjAgent.tsx";
|
// import ListProjAgent from "../../components/list/ListProjAgent.tsx";
|
||||||
@ -1699,7 +1699,7 @@ export default function Index() {
|
|||||||
list={agentMenu.list}
|
list={agentMenu.list}
|
||||||
handleListItem={agentMenu.handleListItem}
|
handleListItem={agentMenu.handleListItem}
|
||||||
/> */}
|
/> */}
|
||||||
{/* <MenuWithBottomButtom
|
<MenuWithBottomButtom
|
||||||
button={sellMenu.button}
|
button={sellMenu.button}
|
||||||
list={sellMenu.list}
|
list={sellMenu.list}
|
||||||
handleListItem={sellMenu.handleListItem}
|
handleListItem={sellMenu.handleListItem}
|
||||||
@ -1732,7 +1732,7 @@ export default function Index() {
|
|||||||
tradingEndTime={tradingEndTime}
|
tradingEndTime={tradingEndTime}
|
||||||
tradingStatus={tradingStatus}
|
tradingStatus={tradingStatus}
|
||||||
|
|
||||||
/> */}
|
/>
|
||||||
{/* <MenuWithTopButton
|
{/* <MenuWithTopButton
|
||||||
button={refundMenu.button}
|
button={refundMenu.button}
|
||||||
list={refundMenu.list}
|
list={refundMenu.list}
|
||||||
|
Loading…
Reference in New Issue
Block a user