forked from Gitlink/forgeplus-react
修改指向后台的url及优化代码结构
This commit is contained in:
parent
c36925c136
commit
8594168d33
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"educoder": ["./src/common/educoder.js"],
|
||||
"forge":["./src/forge"],
|
||||
"military":["./src/military"],
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"build"
|
||||
]
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import './index.scss';
|
||||
|
||||
export default (props) => {
|
||||
const { title, options, changeOptionId, type } = props;
|
||||
|
||||
const [option, setOption] = useState({ code: "", dicItemName: "" ,dicItemCode:""});
|
||||
|
||||
useEffect(() => {
|
||||
changeOptionId(option, type);
|
||||
}, [option])
|
||||
|
||||
return (
|
||||
|
||||
<div className="shop-box">
|
||||
<div className="choose-title">{title}</div>
|
||||
<div className="choose-list">
|
||||
<div className={classNames({ "choose-item-checked": option.code === "", "choose-item": true })} key={"all"} onClick={() => { setOption({ code: "", dicItemName: "" }) }}>全部</div>
|
||||
{
|
||||
options.map((item) => {
|
||||
return <div className={classNames({ "choose-item-checked": option.code === item.code, "choose-item": true })} key={item.dicItemName} onClick={() => { setOption(item) }} >{item.dicItemName}</div>
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
.nav-content {
|
||||
margin:20px 0;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
box-shadow: #ddd 0px 0px 5px;
|
||||
}
|
||||
.shop-box {
|
||||
width: 1280px;
|
||||
border-top: 1px solid #eaeaea;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
}
|
||||
.choose-title {
|
||||
width: 110px;
|
||||
background: #f3f3f3;
|
||||
text-align: center;
|
||||
padding: 16px 0;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
font-weight: 600;
|
||||
}
|
||||
.choose-list {
|
||||
width: 1170px;
|
||||
padding: 16px 0;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
}
|
||||
.choose-item {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 0 15px ;
|
||||
cursor: pointer;
|
||||
&:hover{
|
||||
color: #0072ff;
|
||||
}
|
||||
}
|
||||
|
||||
.choose-item-checked {
|
||||
color: #0072ff;
|
||||
}
|
||||
|
|
@ -2,17 +2,12 @@ import { notification } from 'antd';
|
|||
import axios from 'axios';
|
||||
import cookie from 'react-cookies';
|
||||
|
||||
// export const httpUrl='http://117.50.100.12:8001';
|
||||
// export const httpUrl='http://192.168.31.72:8081';
|
||||
// export const httpUrl='http://192.168.31.72:8083';
|
||||
|
||||
// export const httpUrl = 'http://106.75.31.211:58088'; //可视化
|
||||
export const httpUrl = 'http://117.50.100.12:8008'; //公告
|
||||
// export const httpUrl = 'http://117.50.100.12:8009'; //公告
|
||||
// export const httpUrl = 'http://117.50.100.12:8008'; //测试环境
|
||||
export const httpUrl = 'https://info.osredm.com/'; //生产环境
|
||||
|
||||
|
||||
|
||||
// const TokenKey = 'autologin_forge_military';
|
||||
const TokenKey = 'autologin_trustie';
|
||||
const TokenKey = 'autologin_forge_military';
|
||||
axios.defaults.withCredentials = true;
|
||||
|
||||
// 创建axios实例
|
|
@ -1,4 +1,4 @@
|
|||
import fetch from '../../fetch';
|
||||
import fetch from '../fetch';
|
||||
import { notification } from 'antd';
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { NewSvg } from '../../notice/svg';
|
||||
import { NewSvg } from '../../svg';
|
||||
import './index.scss';
|
||||
export default (props) => {
|
||||
const { list, itemClick, } = props;
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Icon, } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import { httpUrl } from '../../../fetch';
|
||||
import { httpUrl } from '../../fetch';
|
||||
import { getNoticeDetail } from '../api';
|
||||
import { noticeType } from '../static';
|
||||
import './index.scss';
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
|||
import classNames from 'classnames';
|
||||
import { Pagination, Icon, Input, Tabs } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import ItemList from '../../components/itemList';
|
||||
import ItemList from '../components/itemList';
|
||||
import Nodata from '../../../forge/Nodata';
|
||||
import Loading from "../../../Loading";
|
||||
import { AbandonSvg, AllSvg, ChangeSvg, CheckSvg } from '../svg';
|
||||
|
@ -220,7 +220,7 @@ export default (props) => {
|
|||
list={noticeList}
|
||||
itemClick={noticeClick}
|
||||
/>
|
||||
{noticeList.length > 0 ? <div className="edu-txt-center mt10">
|
||||
{noticeList.length > 0 ? <div className="edu-txt-center mt30 mb30">
|
||||
<Pagination
|
||||
showQuickJumper
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
|
@ -265,7 +265,7 @@ export default (props) => {
|
|||
list={noticeList}
|
||||
itemClick={noticeClick}
|
||||
/>
|
||||
{noticeList.length > 0 ? <div className="edu-txt-center mt10">
|
||||
{noticeList.length > 0 ? <div className="edu-txt-center mt30 mb30">
|
||||
<Pagination
|
||||
showQuickJumper
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
|
@ -308,7 +308,7 @@ export default (props) => {
|
|||
list={noticeList}
|
||||
itemClick={noticeClick}
|
||||
/>
|
||||
{noticeList.length > 0 ? <div className="edu-txt-center mt10">
|
||||
{noticeList.length > 0 ? <div className="edu-txt-center mt30 mb30">
|
||||
<Pagination
|
||||
showQuickJumper
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
align-items: center;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
svg{
|
||||
margin-right: .25em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue