From 8594168d33a0a541b129d4d8e878ecea64e838ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com>
Date: Fri, 25 Jun 2021 13:15:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8C=87=E5=90=91=E5=90=8E?=
=?UTF-8?q?=E5=8F=B0=E7=9A=84url=E5=8F=8A=E4=BC=98=E5=8C=96=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E7=BB=93=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jsconfig.json | 14 +++++++
src/military/components/chooseNav/index.jsx | 29 -------------
src/military/components/chooseNav/index.scss | 41 -------------------
src/{ => military}/fetch.js | 13 ++----
src/military/notice/api.js | 2 +-
.../components/itemList/index.jsx | 2 +-
.../components/itemList/index.scss | 0
src/military/notice/noticeDetail/index.jsx | 2 +-
src/military/notice/noticeList/index.jsx | 8 ++--
src/military/notice/noticeList/index.scss | 3 ++
10 files changed, 28 insertions(+), 86 deletions(-)
create mode 100644 jsconfig.json
delete mode 100644 src/military/components/chooseNav/index.jsx
delete mode 100644 src/military/components/chooseNav/index.scss
rename src/{ => military}/fetch.js (82%)
rename src/military/{ => notice}/components/itemList/index.jsx (94%)
rename src/military/{ => notice}/components/itemList/index.scss (100%)
diff --git a/jsconfig.json b/jsconfig.json
new file mode 100644
index 000000000..9c99023ee
--- /dev/null
+++ b/jsconfig.json
@@ -0,0 +1,14 @@
+{
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "educoder": ["./src/common/educoder.js"],
+ "forge":["./src/forge"],
+ "military":["./src/military"],
+ }
+ },
+ "exclude": [
+ "node_modules",
+ "build"
+ ]
+}
\ No newline at end of file
diff --git a/src/military/components/chooseNav/index.jsx b/src/military/components/chooseNav/index.jsx
deleted file mode 100644
index 3f1216c46..000000000
--- a/src/military/components/chooseNav/index.jsx
+++ /dev/null
@@ -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 (
-
-
-
{title}
-
-
{ setOption({ code: "", dicItemName: "" }) }}>全部
- {
- options.map((item) => {
- return
{ setOption(item) }} >{item.dicItemName}
- })
- }
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/military/components/chooseNav/index.scss b/src/military/components/chooseNav/index.scss
deleted file mode 100644
index dd8728fa8..000000000
--- a/src/military/components/chooseNav/index.scss
+++ /dev/null
@@ -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;
-}
-
diff --git a/src/fetch.js b/src/military/fetch.js
similarity index 82%
rename from src/fetch.js
rename to src/military/fetch.js
index 6a35c325a..32d04610a 100644
--- a/src/fetch.js
+++ b/src/military/fetch.js
@@ -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实例
diff --git a/src/military/notice/api.js b/src/military/notice/api.js
index 53e72fa86..d01e2a619 100644
--- a/src/military/notice/api.js
+++ b/src/military/notice/api.js
@@ -1,4 +1,4 @@
-import fetch from '../../fetch';
+import fetch from '../fetch';
import { notification } from 'antd';
diff --git a/src/military/components/itemList/index.jsx b/src/military/notice/components/itemList/index.jsx
similarity index 94%
rename from src/military/components/itemList/index.jsx
rename to src/military/notice/components/itemList/index.jsx
index fc65227bc..a5a3f51ce 100644
--- a/src/military/components/itemList/index.jsx
+++ b/src/military/notice/components/itemList/index.jsx
@@ -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;
diff --git a/src/military/components/itemList/index.scss b/src/military/notice/components/itemList/index.scss
similarity index 100%
rename from src/military/components/itemList/index.scss
rename to src/military/notice/components/itemList/index.scss
diff --git a/src/military/notice/noticeDetail/index.jsx b/src/military/notice/noticeDetail/index.jsx
index b68b521d7..c7024f635 100644
--- a/src/military/notice/noticeDetail/index.jsx
+++ b/src/military/notice/noticeDetail/index.jsx
@@ -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';
diff --git a/src/military/notice/noticeList/index.jsx b/src/military/notice/noticeList/index.jsx
index 46fa5848d..171723e24 100644
--- a/src/military/notice/noticeList/index.jsx
+++ b/src/military/notice/noticeList/index.jsx
@@ -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 ?
+ {noticeList.length > 0 ?
{ setCurPage(page) }}
@@ -265,7 +265,7 @@ export default (props) => {
list={noticeList}
itemClick={noticeClick}
/>
- {noticeList.length > 0 ?
+ {noticeList.length > 0 ?
{ setCurPage(page) }}
@@ -308,7 +308,7 @@ export default (props) => {
list={noticeList}
itemClick={noticeClick}
/>
- {noticeList.length > 0 ?
+ {noticeList.length > 0 ?
{ setCurPage(page) }}
diff --git a/src/military/notice/noticeList/index.scss b/src/military/notice/noticeList/index.scss
index 4fc4559ef..76e2a88f7 100644
--- a/src/military/notice/noticeList/index.scss
+++ b/src/military/notice/noticeList/index.scss
@@ -62,6 +62,9 @@
align-items: center;
font-size: 1rem;
font-weight: bold;
+ svg{
+ margin-right: .25em;
+ }
}
}