Commit 2564c2d0 by 王禹桐

fixed: bug登录页底部隐藏

parent af91e513
var os = require('os'), IP = '', ifaces = os.networkInterfaces() // 获取本机IP
var os = require('os'), IP = 'http://47.116.126.39:8080', ifaces = os.networkInterfaces() // 获取本机IP
out:
for (var i in ifaces) {
for (var j in ifaces[i]) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{"name":"reactCli_library","content":{"../node_modules/react/index.js":{"id":0,"buildMeta":{"providedExports":true}},"../node_modules/prop-types/index.js":{"id":1,"buildMeta":{"providedExports":true}},"../node_modules/react-dom/index.js":{"id":6,"buildMeta":{"providedExports":true}},"../node_modules/webpack/buildin/global.js":{"id":53,"buildMeta":{"providedExports":true}},"../node_modules/react-router/esm/react-router.js":{"id":60,"buildMeta":{"exportsType":"namespace","providedExports":["MemoryRouter","Prompt","Redirect","Route","Router","StaticRouter","Switch","__HistoryContext","__RouterContext","generatePath","matchPath","useHistory","useLocation","useParams","useRouteMatch","withRouter"]}},"../node_modules/react-is/index.js":{"id":63,"buildMeta":{"providedExports":true}},"../node_modules/object-assign/index.js":{"id":66,"buildMeta":{"providedExports":true}},"../node_modules/@babel/runtime/helpers/esm/extends.js":{"id":69,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js":{"id":95,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/tiny-invariant/dist/tiny-invariant.esm.js":{"id":96,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/history/esm/history.js":{"id":106,"buildMeta":{"exportsType":"namespace","providedExports":["createBrowserHistory","createHashHistory","createMemoryHistory","createLocation","locationsAreEqual","parsePath","createPath"]}},"../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":{"id":216,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":{"id":326,"buildMeta":{"providedExports":true}},"../node_modules/react/cjs/react.production.min.js":{"id":456,"buildMeta":{"providedExports":true}},"../node_modules/react-dom/cjs/react-dom.production.min.js":{"id":466,"buildMeta":{"providedExports":true}},"../node_modules/scheduler/index.js":{"id":467,"buildMeta":{"providedExports":true}},"../node_modules/scheduler/cjs/scheduler.production.min.js":{"id":468,"buildMeta":{"providedExports":true}},"../node_modules/react-is/cjs/react-is.production.min.js":{"id":469,"buildMeta":{"providedExports":true}},"../node_modules/prop-types/factoryWithThrowingShims.js":{"id":470,"buildMeta":{"providedExports":true}},"../node_modules/prop-types/lib/ReactPropTypesSecret.js":{"id":471,"buildMeta":{"providedExports":true}},"../node_modules/mini-create-react-context/dist/esm/index.js":{"id":650,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/path-to-regexp/index.js":{"id":651,"buildMeta":{"providedExports":true}},"../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":{"id":1198,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/resolve-pathname/esm/resolve-pathname.js":{"id":1199,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/value-equal/esm/value-equal.js":{"id":1200,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/react-router-dom/esm/react-router-dom.js":{"id":1785,"buildMeta":{"exportsType":"namespace","providedExports":["MemoryRouter","Prompt","Redirect","Route","Router","StaticRouter","Switch","generatePath","matchPath","useHistory","useLocation","useParams","useRouteMatch","withRouter","BrowserRouter","HashRouter","Link","NavLink"]}},"../node_modules/path-to-regexp/node_modules/isarray/index.js":{"id":1786,"buildMeta":{"providedExports":true}}}}
\ No newline at end of file
{"name":"reactCli_library","content":{"../node_modules/react/index.js":{"id":0,"buildMeta":{"providedExports":true}},"../node_modules/prop-types/index.js":{"id":1,"buildMeta":{"providedExports":true}},"../node_modules/react-dom/index.js":{"id":6,"buildMeta":{"providedExports":true}},"../node_modules/webpack/buildin/global.js":{"id":53,"buildMeta":{"providedExports":true}},"../node_modules/react-router/esm/react-router.js":{"id":60,"buildMeta":{"exportsType":"namespace","providedExports":["MemoryRouter","Prompt","Redirect","Route","Router","StaticRouter","Switch","__HistoryContext","__RouterContext","generatePath","matchPath","useHistory","useLocation","useParams","useRouteMatch","withRouter"]}},"../node_modules/object-assign/index.js":{"id":65,"buildMeta":{"providedExports":true}},"../node_modules/@babel/runtime/helpers/esm/extends.js":{"id":68,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/history/esm/history.js":{"id":90,"buildMeta":{"exportsType":"namespace","providedExports":["createBrowserHistory","createHashHistory","createMemoryHistory","createLocation","locationsAreEqual","parsePath","createPath"]}},"../node_modules/tiny-invariant/dist/tiny-invariant.esm.js":{"id":95,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js":{"id":105,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":{"id":215,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":{"id":325,"buildMeta":{"providedExports":true}},"../node_modules/react/cjs/react.production.min.js":{"id":454,"buildMeta":{"providedExports":true}},"../node_modules/react-dom/cjs/react-dom.production.min.js":{"id":464,"buildMeta":{"providedExports":true}},"../node_modules/scheduler/index.js":{"id":465,"buildMeta":{"providedExports":true}},"../node_modules/scheduler/cjs/scheduler.production.min.js":{"id":466,"buildMeta":{"providedExports":true}},"../node_modules/prop-types/factoryWithThrowingShims.js":{"id":467,"buildMeta":{"providedExports":true}},"../node_modules/prop-types/lib/ReactPropTypesSecret.js":{"id":468,"buildMeta":{"providedExports":true}},"../node_modules/hoist-non-react-statics/node_modules/react-is/index.js":{"id":505,"buildMeta":{"providedExports":true}},"../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js":{"id":506,"buildMeta":{"providedExports":true}},"../node_modules/path-to-regexp/index.js":{"id":650,"buildMeta":{"providedExports":true}},"../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":{"id":1206,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/resolve-pathname/esm/resolve-pathname.js":{"id":1207,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/value-equal/esm/value-equal.js":{"id":1208,"buildMeta":{"exportsType":"namespace","providedExports":["default"]}},"../node_modules/react-router-dom/esm/react-router-dom.js":{"id":1803,"buildMeta":{"exportsType":"namespace","providedExports":["MemoryRouter","Prompt","Redirect","Route","Router","StaticRouter","Switch","generatePath","matchPath","useHistory","useLocation","useParams","useRouteMatch","withRouter","BrowserRouter","HashRouter","Link","NavLink"]}},"../node_modules/path-to-regexp/node_modules/isarray/index.js":{"id":1804,"buildMeta":{"providedExports":true}},"../node_modules/react-router/node_modules/react-is/index.js":{"id":1805,"buildMeta":{"providedExports":true}},"../node_modules/react-router/node_modules/react-is/cjs/react-is.production.min.js":{"id":1806,"buildMeta":{"providedExports":true}}}}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -86,10 +86,7 @@ class Header extends PureComponent {
</div>
)}
<div className={styles.logo}>
<img
className={styles.image}
src={nav.logo ? nav.logo : headerLogo}
/>
<img className={styles.image} src={nav.logo ? nav.logo : ""} />
</div>
</div>
<div className={styles.rightContainer}>
......
......@@ -705,16 +705,20 @@ class homePage extends Component {
/>
</span>
<Card
style={{ width: "100%", backgroundColor: "#ffffff"}}
style={{ width: "100%", backgroundColor: "#ffffff" }}
bordered={false}
>
{/* bug-11956-jmy 百分比显示不全 bug-12345-jmy 百分比后的箭头显示不出来*/}
<Meta
style={{marginRight: "-10px"}}
style={{ marginRight: "-10px" }}
avatar={
<Icon
type="user"
style={{ fontSize: "48px",marginRight:'-10px', marginLeft:"-16px"}}
style={{
fontSize: "48px",
marginRight: "-10px",
marginLeft: "-16px",
}}
/>
}
title={
......@@ -799,11 +803,15 @@ class homePage extends Component {
>
{/* bug-11956-jmy 百分比显示不全 bug-12345-jmy 百分比后的箭头显示不出来*/}
<Meta
style={{marginRight: "-10px"}}
style={{ marginRight: "-10px" }}
avatar={
<Icon
type="calendar"
style={{ fontSize: "48px",marginRight:'-10px', marginLeft:"-16px"}}
style={{
fontSize: "48px",
marginRight: "-10px",
marginLeft: "-16px",
}}
/>
}
title={
......@@ -880,11 +888,15 @@ class homePage extends Component {
>
{/* bug-11956-jmy 百分比显示不全 bug-12345-jmy 百分比后的箭头显示不出来*/}
<Meta
style={{marginRight: "-10px"}}
style={{ marginRight: "-10px" }}
avatar={
<Icon
type="play-square"
style={{ fontSize: "48px",marginRight:'-10px', marginLeft:"-16px"}}
style={{
fontSize: "48px",
marginRight: "-10px",
marginLeft: "-16px",
}}
/>
}
title={
......@@ -959,11 +971,15 @@ class homePage extends Component {
>
{/* bug-11956-jmy 百分比显示不全 bug-12345-jmy 百分比后的箭头显示不出来*/}
<Meta
style={{marginRight: "-10px"}}
style={{ marginRight: "-10px" }}
avatar={
<Icon
type="desktop"
style={{ fontSize: "48px",marginRight:'-10px', marginLeft:"-16px"}}
style={{
fontSize: "48px",
marginRight: "-10px",
marginLeft: "-16px",
}}
/>
}
title={
......@@ -1094,9 +1110,7 @@ class homePage extends Component {
/>
</Col>
<Col span={2}>
<div>
</div>
<div></div>
<Select
style={{
width: "150px",
......@@ -1153,7 +1167,7 @@ class homePage extends Component {
this.props.logoSiteList.data.logo
? this.props.logoSiteList.data &&
this.props.logoSiteList.data.logo
: defaultLogo
: ""
}
/>
{/* bug-11957-jmy 图片盖住了文字*/}
......
......@@ -9,11 +9,14 @@ import { Button, Form, Input, message } from "antd";
import style from "./Style/login.less";
import { exfetchR, getSkinData, toAssToken } from "./redux/actions";
import commonFunc from "@/util/commonFunc";
import SelectLang from "@/common/Layout/Header/SelectLang"; {/* bug-11961-cwj暂时注释 2期上 */ }
import moment from 'moment'
import SelectLang from "@/common/Layout/Header/SelectLang";
{
/* bug-11961-cwj暂时注释 2期上 */
}
import moment from "moment";
import md5 from "md5";
import { sm2 } from 'sm-crypto'
import intl from 'react-intl-universal';
import { sm2 } from "sm-crypto";
import intl from "react-intl-universal";
const FormItem = Form.Item;
const companySiteCode = `${commonFunc.companyCode}/${commonFunc.siteCode}`;
......@@ -27,14 +30,54 @@ class Login extends React.Component {
componentDidMount() {
const { getSkinData } = this.props;
getSkinData((res) => {
console.log("primary-color:", res)
document.documentElement.style.setProperty('--primary-color', res.data.themeColor);
})
getSkinData(res => {
console.log("primary-color:", res);
document.documentElement.style.setProperty(
"--primary-color",
res.data.themeColor
);
});
}
generateCharacter(n) {
var chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
var chars = [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
];
var res = "";
for (var i = 0; i < n; i++) {
var id = Math.ceil(Math.random() * 35);
......@@ -45,61 +88,67 @@ class Login extends React.Component {
}
getCurrentDay() {
let date = ""
date = moment(new Date()).format("YYYYMMDD")
return date
let date = "";
date = moment(new Date()).format("YYYYMMDD");
return date;
}
// 提交登录按钮发送给后台json
handleSubmit = e => {
e.preventDefault();
this.props.form.validateFields((errors, values) => {
if (errors) {
return;
}
const { exfetchR, toAssToken } = this.props;
const public_key = '047214fe3a249b75b6ba92ee494e0a8a68c0a19893a480b3c28bf06cd5b7d621243c7f6704caa3b43ade6be15de11cabd185611a9edfdcf1b11d7a2478c67b4c1c'
const public_key =
"047214fe3a249b75b6ba92ee494e0a8a68c0a19893a480b3c28bf06cd5b7d621243c7f6704caa3b43ade6be15de11cabd185611a9edfdcf1b11d7a2478c67b4c1c";
const private_key = '00a2bbe941a177ca9f200d1c4d37e8f0b43b9cd2ea662304a05c064c6416e74d49'
const private_key =
"00a2bbe941a177ca9f200d1c4d37e8f0b43b9cd2ea662304a05c064c6416e74d49";
let salt = ""
let date = ""
let key = ""
let sign = ""
let password = ""
let account = ""
let salt = "";
let date = "";
let key = "";
let sign = "";
let password = "";
let account = "";
salt = this.generateCharacter(16)
console.log("validate-salt", salt)
date = this.getCurrentDay()
console.log("validate-date", date)
salt = this.generateCharacter(16);
console.log("validate-salt", salt);
date = this.getCurrentDay();
console.log("validate-date", date);
password = sm2.doEncrypt(values.password + salt, public_key, 1);
account = sm2.doEncrypt(values.account.trim() + salt, public_key, 1)
account = sm2.doEncrypt(values.account.trim() + salt, public_key, 1);
password = "04" + password
account = "04" + account
password = "04" + password;
account = "04" + account;
if (salt && date) {
key = salt + date
console.log("validate-key", key)
key = salt + date;
console.log("validate-key", key);
}
sign = "account=" + account + "&password=" + password + "&salt=" + salt + "&key=" + key
sign =
"account=" +
account +
"&password=" +
password +
"&salt=" +
salt +
"&key=" +
key;
console.log("validate-sign", md5(sign))
console.log("validate-sign", md5(sign));
let parms = {
account,
password,
salt: salt,
sign: md5(sign),
languageCode: sessionStorage.getItem("lang") || null //用户选择的语种,否则为null
}
languageCode: sessionStorage.getItem("lang") || null, //用户选择的语种,否则为null
};
// let data = {
// account: String(values.account).trim(),
......@@ -108,7 +157,7 @@ class Login extends React.Component {
exfetchR(parms, res => {
//只有社群的话直接滚走去社群
if (res.data.isOnlyCommunity) {
toAssToken()
toAssToken();
} else {
if (res.code == 1000) {
console.log(
......@@ -116,22 +165,22 @@ class Login extends React.Component {
"===========重定向========="
);
if (location.search) {
if (location.search.split("?referrer=")[1] == `/${companySiteCode}/`) {
if (
location.search.split("?referrer=")[1] == `/${companySiteCode}/`
) {
this.props.history.push(`/${companySiteCode}/index/homepage`);
} else {
this.props.history.push(location.search.split("?referrer=")[1]);
}
} else {
this.props.history.push(`/${companySiteCode}/index/homepage`);
}
// this.props.history.push(`/${companySiteCode}/index/homepage`);
} else {
message.error(res.msg)
message.error(res.msg);
}
}
});
});
};
......@@ -239,10 +288,9 @@ class Login extends React.Component {
</div>
</div>
<div className={style.bottom}>
{/* <div className={style.bottom}>
版权所有 上海复深蓝软件股份有限公司 备案号:<a href='https://beian.miit.gov.cn' style={{color:"#666"}} target="_blank" rel="noopener">沪ICP备11042121号-5</a>
</div>
</div> */}
</div>
);
}
......@@ -254,7 +302,7 @@ function mapStateToProps(state, ownProps) {
function mapDispatchToProps(dispatch) {
return {
exfetchR: (data, cb) => dispatch(exfetchR(data, cb)),
getSkinData: (cb) => dispatch(getSkinData(cb)),
getSkinData: cb => dispatch(getSkinData(cb)),
toAssToken: (data, cb) => dispatch(toAssToken(data, cb)),
};
}
......
// let baseUrl = API_CONFIG.BASE_URL;
const {
IP
} = require('../../build/Ip');
const { IP } = require("../../build/Ip");
// let baseUrl = "http://172.16.1.208";
let baseUrl = '';
let baseUrl = "";
if (location.host.includes("localhost")) {
baseUrl = IP + '/admin';
// baseUrl="http://dev.mg.kmelearning.com";
}
const service = {
webManage: `${baseUrl}/web-manage/manage`,
webMall: `${baseUrl}/mall`,
webLog: `${baseUrl}/cloud-logging`,
systemApi: `${baseUrl}/system/api`,
systemManage: `${baseUrl}/system/manage`,
message: `${baseUrl}/message`,
newMessage: `${baseUrl}/newMessage`,
ossUrl: `${baseUrl}/aliyun`,
base: `${baseUrl}`,
comment: `${baseUrl}/web-manage/comment`,
//站点域名
managerDomen: "https://mg.kmelearning.com",
//微信域名
wechartDomen: "https://wechat.kmelearning.com/#",
pcDomen: "https://pc.kmelearning.com",
// baseUrl = IP + '/admin';
baseUrl = IP;
// baseUrl="http://dev.mg.kmelearning.com";
}
lacales: `https://cloud-wmy.oss-cn-shanghai.aliyuncs.com`, //语言包域名
};
export default service;
const service = {
webManage: `${baseUrl}/web-manage/manage`,
webMall: `${baseUrl}/mall`,
webLog: `${baseUrl}/cloud-logging`,
systemApi: `${baseUrl}/system/api`,
systemManage: `${baseUrl}/system/manage`,
message: `${baseUrl}/message`,
newMessage: `${baseUrl}/newMessage`,
ossUrl: `${baseUrl}/aliyun`,
base: `${baseUrl}`,
comment: `${baseUrl}/web-manage/comment`,
//站点域名
managerDomen: "https://mg.kmelearning.com",
//微信域名
wechartDomen: "https://wechat.kmelearning.com/#",
pcDomen: "https://pc.kmelearning.com",
lacales: `https://cloud-wmy.oss-cn-shanghai.aliyuncs.com`, //语言包域名
};
export default service;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment