1
This commit is contained in:
@@ -36,7 +36,7 @@ const handleAdd = async (fields) => {
|
||||
* @param fields
|
||||
*/
|
||||
const handleUpdate = async (fields) => {
|
||||
fields.status = fields.status ? 1 : 0
|
||||
fields.status = fields.status ? 0 : 1
|
||||
|
||||
const hide = message.loading('正在修改');
|
||||
try {
|
||||
@@ -111,7 +111,7 @@ const MenuTableList: React.FC = () => {
|
||||
valueType: 'text',
|
||||
search: false,
|
||||
render: (_, record) => {
|
||||
return <Image src={record.imageUrl} width={60} height={60}></Image>
|
||||
return <Image src={record.imageUrl} width={60} height={60}></Image>
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -144,6 +144,12 @@ const MenuTableList: React.FC = () => {
|
||||
hidden={!access.hasPerms('admin/banner/update')}
|
||||
onClick={() => {
|
||||
setModalVisible(true);
|
||||
let data = JSON.parse(JSON.stringify(record))
|
||||
if (data.status == 0) {
|
||||
data.status = true
|
||||
}else{
|
||||
data.status = false
|
||||
}
|
||||
setCurrentRow(record);
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -127,14 +127,11 @@ export const errorConfig: RequestConfig = {
|
||||
// 拦截请求配置,进行个性化处理。
|
||||
const Authorization = localStorage.getItem('token') || ''
|
||||
const headers = { Authorization };
|
||||
console.log(process.env.API_URL);
|
||||
|
||||
let url = `${process.env.API_URL}${config.url}`;
|
||||
|
||||
if (config.url.includes('https://')) {
|
||||
url = config.url;
|
||||
}
|
||||
|
||||
// let url = `${process.env.API_BASEURL ? process.env.API_BASEURL : ''}` + config.url;
|
||||
// if (config.url.includes('https://')) {
|
||||
// url = config.url;
|
||||
|
||||
Reference in New Issue
Block a user