Commit 253b85c1 by 纪昌帅

save

parent d4f03acb
import React from "react";
import { Redirect, withRouter } from "react-router-dom";
import { Icon, Input, Button, Tabs, Divider, Popover, message, Checkbox } from "antd";
import {
Icon,
Input,
Button,
Tabs,
Divider,
Popover,
message,
Checkbox,
} from "antd";
import "./style";
import intl, { init } from "react-intl-universal";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import { loginAction, bgmImage, logoImage, loginPc, editPassword, firstLogin, forgetLogin, forgetPassword, testPassword, testLogin, getBrowserConfig, selectLanguageGet } from "./action";
import {
loginAction,
bgmImage,
logoImage,
loginPc,
editPassword,
firstLogin,
forgetLogin,
forgetPassword,
testPassword,
testLogin,
getBrowserConfig,
selectLanguageGet,
} from "./action";
import { fnPrefix } from "../../utils/router";
// import encrypt, { md5 } from "Utils/encrypt";
import Storage from '../../utils/storage';
import api from '../../utils/api';
import LanguageCheck from '../Home/component/nav/languageCheck';
import Storage from "../../utils/storage";
import api from "../../utils/api";
import LanguageCheck from "../Home/component/nav/languageCheck";
import func from "../../utils/commonFunc";
import moment from 'moment'
import moment from "moment";
import md5 from "md5";
import loginCookie from "js-cookie";
// import {sm2} from 'sm-crypto'
......@@ -30,23 +52,26 @@ class Login extends React.Component {
tabsKey: "1",
url: null,
// logoUrl:'http://cloud-wmy.oss-cn-shanghai.aliyuncs.com/wmy/1535870248541.png',
logoUrl: '',
btnName: intl.get('SendCode'),
imgsUrl: api.baseUrl + "/system/api/public/getCaptcha?captchaKey=1544531906454&companyCode=shyz&siteCode=shyz",
logoUrl: "",
btnName: intl.get("SendCode"),
imgsUrl:
api.baseUrl +
"/system/api/public/getCaptcha?captchaKey=1544531906454&companyCode=shyz&siteCode=shyz",
codeBtnState: false,
m1Mobile: null,
m2Mobile: null,
codeBtnColor: '#1890ff',
modalVsb: 'none',
modal2Vsb: 'none',
codeBtnColor: "#1890ff",
modalVsb: "none",
modal2Vsb: "none",
footer: intl.get("PoweredByCompanyName"),
language: localStorage.getItem('lang_type') == 'en_US' ? 'English' : '简体中文',
language:
localStorage.getItem("lang_type") == "en_US" ? "English" : "简体中文",
msgInfo: null,
disabledBtn: true,
borderRed: "",
firstLoginInput: false,
loginNameDesc: intl.get('Username'),
loginPwdDesc: intl.get('Password'),
loginNameDesc: intl.get("Username"),
loginPwdDesc: intl.get("Password"),
isRemember: false,
};
}
......@@ -63,8 +88,8 @@ class Login extends React.Component {
sessionStorage.setItem("siteName", data.titleName);
}
});
this.props.loginAction(Storage.sessionGet('token'));
if (Storage.sessionGet('token')) {
this.props.loginAction(Storage.sessionGet("token"));
if (Storage.sessionGet("token")) {
this.setState({
redirectToReferrer: true,
});
......@@ -79,47 +104,51 @@ class Login extends React.Component {
isMounted = true;
const times = new Date().getTime();
this.props.logoImage({}, (res) => {
if (res.code === '1000' && res.data.siteLogo) {
isMounted && this.setState({
logoUrl: res.data.siteLogo
});
if (res.code === "1000" && res.data.siteLogo) {
isMounted &&
this.setState({
logoUrl: res.data.siteLogo,
});
}
});
this.props.bgmImage({ type: 1 }, (res) => {
if (res.code === '1000') {
isMounted && this.setState({
url: res.data.bgimgPath ? res.data.bgimgPath : null,
// loginNameDesc: res.data.loginNameDesc ? res.data.loginNameDesc : intl.get('Username'),
// loginPwdDesc: res.data.loginPwdDesc ? res.data.loginPwdDesc : intl.get('Password')
});
if (res.code === "1000") {
isMounted &&
this.setState({
url: res.data.bgimgPath ? res.data.bgimgPath : null,
// loginNameDesc: res.data.loginNameDesc ? res.data.loginNameDesc : intl.get('Username'),
// loginPwdDesc: res.data.loginPwdDesc ? res.data.loginPwdDesc : intl.get('Password')
});
}
});
this.setState({
imgsUrl: api.baseUrl + '/system/api/public/getCaptcha?companyCode=shyz&siteCode=shyz&captchaKey=' + times,
imgsUrl:
api.baseUrl +
"/system/api/public/getCaptcha?companyCode=shyz&siteCode=shyz&captchaKey=" +
times,
captchaKey: String(times),
});
}
fnChangeLanguage = e => {
fnChangeLanguage = (e) => {
localStorage.setItem("lang_type", e.target.value);
console.log(localStorage.getItem('lang_type'));
if (e.target.value == 'zh_CN') {
console.log(localStorage.getItem("lang_type"));
if (e.target.value == "zh_CN") {
this.setState({
language: '简体中文'
language: "简体中文",
});
} else if (e.target.value == 'en_US') {
} else if (e.target.value == "en_US") {
this.setState({
language: 'English'
language: "English",
});
}
window.location.reload();
};
tabsCallback = (key) => {
if (key === '1') {
if (key === "1") {
this.loadAccountInfo(); //切换至账号登录时亦从cookie填充账号
this.codeSetInterval(0);
this.setState({
......@@ -145,14 +174,13 @@ class Login extends React.Component {
});
//this.imgClick();
}
}
};
inputFocus = () => {
this.setState({
borderRed: ""
borderRed: "",
});
}
};
testCodeBtn = (type) => {
const params = {
......@@ -171,7 +199,7 @@ class Login extends React.Component {
if (type === 1) {
if (!reg.test(params.mobile)) {
this.setState({
msgInfo: intl.get('WrongPhoneNumberFormat'),
msgInfo: intl.get("WrongPhoneNumberFormat"),
});
return false;
} else {
......@@ -180,20 +208,19 @@ class Login extends React.Component {
});
this.codeSetInterval(1);
this.props.testPassword(params, (res) => {
if (res.code === '1000') {
if (res.code === "1000") {
this.setState({
smsSendRequestNo: res.data.smsSendRequestNo,
borderRed: ""
borderRed: "",
});
} else {
if (res.subCode === '210001' || res.subCode === '210002') {
if (res.subCode === "210001" || res.subCode === "210002") {
this.setState({
borderRed: "input-red"
borderRed: "input-red",
});
} else {
this.setState({
borderRed: ""
borderRed: "",
});
}
message.error(intl.get(res.subMsg));
......@@ -203,7 +230,7 @@ class Login extends React.Component {
} else if (type === 2) {
if (!reg.test(params2.mobile)) {
this.setState({
msgInfo: intl.get('WrongPhoneNumberFormat'),
msgInfo: intl.get("WrongPhoneNumberFormat"),
});
return false;
} else {
......@@ -212,21 +239,19 @@ class Login extends React.Component {
});
this.codeSetInterval(1);
this.props.forgetPassword(params2, (res) => {
if (res.code === '1000') {
if (res.code === "1000") {
this.setState({
smsSendRequestNo: res.data.smsSendRequestNo
smsSendRequestNo: res.data.smsSendRequestNo,
});
} else {
message.error(intl.get(res.subMsg));
}
});
}
} else if (type === 3) {
if (!reg.test(params3.mobile)) {
this.setState({
msgInfo: intl.get('WrongPhoneNumberFormat'),
msgInfo: intl.get("WrongPhoneNumberFormat"),
});
return false;
} else {
......@@ -235,10 +260,9 @@ class Login extends React.Component {
});
this.codeSetInterval(1);
this.props.editPassword(params3, (res) => {
if (res.code === '1000') {
if (res.code === "1000") {
this.setState({
smsSendRequestNo: res.data.smsSendRequestNo
smsSendRequestNo: res.data.smsSendRequestNo,
});
} else {
message.error(intl.get(res.subMsg));
......@@ -246,16 +270,15 @@ class Login extends React.Component {
});
}
}
}
};
codeSetInterval = (data) => {
let times = 90;
let _this = this;
if (!data) {
_this.setState({
btnName: intl.get('SendCode'),
btnName: intl.get("SendCode"),
codeBtnState: false,
codeBtnColor: '#1890ff',
codeBtnColor: "#1890ff",
backColor: null,
disabledBtn: true,
});
......@@ -266,8 +289,8 @@ class Login extends React.Component {
this.setState({
codeBtnState: true,
codeBtnColor: '#d9d9d9',
backColor: '#f5f5f5',
codeBtnColor: "#d9d9d9",
backColor: "#f5f5f5",
disabledBtn: false,
});
......@@ -275,13 +298,13 @@ class Login extends React.Component {
times = times - 1;
if (times > 0) {
_this.setState({
btnName: intl.get('SendAgain') + "(" + times + ")",
btnName: intl.get("SendAgain") + "(" + times + ")",
});
} else {
_this.setState({
btnName: intl.get('SendCode'),
btnName: intl.get("SendCode"),
codeBtnState: false,
codeBtnColor: '#1890ff',
codeBtnColor: "#1890ff",
backColor: null,
disabledBtn: true,
});
......@@ -289,96 +312,145 @@ class Login extends React.Component {
_this.imgClick();
}
}, 1000);
}
};
imgClick = () => {
const times = new Date().getTime();
this.setState({
imgsUrl: api.baseUrl + '/system/api/public/getCaptcha?companyCode=shyz&siteCode=shyz&captchaKey=' + times,
captchaKey: String(times)
imgsUrl:
api.baseUrl +
"/system/api/public/getCaptcha?companyCode=shyz&siteCode=shyz&captchaKey=" +
times,
captchaKey: String(times),
});
}
};
// 账号登录
accountVal = (value) => {
this.setState({
accountVal: value
accountVal: value,
});
};
passwordVal = (value) => {
this.setState({
passwordVal: value
passwordVal: value,
});
}
};
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']
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 res = "";
for(var i = 0; i < n ; i ++) {
var id = Math.ceil(Math.random()*35);
res += chars[id];
}
return res;
for (var i = 0; i < n; i++) {
var id = Math.ceil(Math.random() * 35);
res += chars[id];
}
return res;
}
getCurrentDay(){
let date=""
date = moment(new Date()).format("YYYYMMDD")
return date
getCurrentDay() {
let date = "";
date = moment(new Date()).format("YYYYMMDD");
return date;
}
//如果local中获取不到语言类型,从后台获取
getLanguageType = () => {
this.props.selectLanguageGet(res=>{
this.props.selectLanguageGet((res) => {
// debugger
if(res.code == "1000" && res.data){
func.changeLanguage({languageCode: res.data});
if (res.code == "1000" && res.data) {
func.changeLanguage({ languageCode: res.data });
}
})
}
});
};
//用户名登录
userNameLogin = () => {
console.log("123124345432")
const public_key = '047214fe3a249b75b6ba92ee494e0a8a68c0a19893a480b3c28bf06cd5b7d621243c7f6704caa3b43ade6be15de11cabd185611a9edfdcf1b11d7a2478c67b4c1c'
const private_key = '00a2bbe941a177ca9f200d1c4d37e8f0b43b9cd2ea662304a05c064c6416e74d49'
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)
password = sm2.doEncrypt(this.state.passwordVal+salt, public_key, 1);
account = sm2.doEncrypt(this.state.accountVal+salt, public_key, 1)
password = "04" + password
account = "04" + account
if(salt && date){
key = salt+date
console.log("validate-key",key)
console.log("123124345432");
const public_key =
"047214fe3a249b75b6ba92ee494e0a8a68c0a19893a480b3c28bf06cd5b7d621243c7f6704caa3b43ade6be15de11cabd185611a9edfdcf1b11d7a2478c67b4c1c";
const private_key =
"00a2bbe941a177ca9f200d1c4d37e8f0b43b9cd2ea662304a05c064c6416e74d49";
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);
password = sm2.doEncrypt(this.state.passwordVal + salt, public_key, 1);
account = sm2.doEncrypt(this.state.accountVal + salt, public_key, 1);
password = "04" + password;
account = "04" + account;
if (salt && date) {
key = salt + date;
console.log("validate-key", key);
}
sign="account="+account+"&password="+password+"&salt="+salt+"&key="+key
console.log("validate-sign",md5(sign))
let parms={
sign =
"account=" +
account +
"&password=" +
password +
"&salt=" +
salt +
"&key=" +
key;
console.log("validate-sign", md5(sign));
let parms = {
account,
password,
salt:salt,
sign: md5(sign)
}
salt: salt,
sign: md5(sign),
};
// const params = {
// account: this.state.accountVal,
......@@ -388,10 +460,10 @@ class Login extends React.Component {
const params = {
account,
password,
salt:salt,
salt: salt,
sign: md5(sign),
// languageCode: localStorage.getItem("lang_type") || null //local获取lang_type
languageCode: sessionStorage.getItem("lang_type") || null //local获取lang_type
languageCode: sessionStorage.getItem("lang_type") || null, //local获取lang_type
};
// 判断网络是否异常
......@@ -402,43 +474,48 @@ class Login extends React.Component {
}
if (!params.account) {
message.error(intl.get('Username'));
message.error(intl.get("Username"));
return false;
}
if (!params.password) {
message.error(intl.get('pwd.empty'));
message.error(intl.get("pwd.empty"));
return false;
}
this.props.loginPc(params, (res) => {
if (res.code === '1000') {//登录成功
if (res.code === "1000") {
//登录成功
this.getLanguageType();
if (res.data.userInfo.firstLogin === true) {
this.setState({
modal2Vsb: 'block',
modal2Vsb: "block",
m2Mobile: res.data.userInfo.mobile,
firstLoginInput: res.data.userInfo.mobile ? true : false,
m2accountId: res.data.userInfo.id,
});
}
// 签到打卡
Storage.sessionPut('isPCEnableSign', res.data.isPCEnableSign);
Storage.sessionPut('isFirstLogin', res.data.isFirstLogin);
Storage.sessionPut('isEnableSign', res.data.isEnableSign);
Storage.sessionPut("isPCEnableSign", res.data.isPCEnableSign);
Storage.sessionPut("isFirstLogin", res.data.isFirstLogin);
Storage.sessionPut("isEnableSign", res.data.isEnableSign);
console.log("ressssss==", res);
if (res.data.Authorization) {
//;
Storage.sessionPut('token', res.data.Authorization);
Storage.sessionPut("token", res.data.Authorization);
//保存密码
if (this.state.isRemember) {
let userName = this.state.accountVal;
let password = this.state.passwordVal;
let Days = 30; //cookie保存时间
let Days = 30; //cookie保存时间
let exp = new Date();
exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
loginCookie.set("username",encodeURIComponent(userName),{expires:30});
loginCookie.set("password",encodeURIComponent(password),{expires:30});
loginCookie.set("username", encodeURIComponent(userName), {
expires: 30,
});
loginCookie.set("password", encodeURIComponent(password), {
expires: 30,
});
// document.cookie = "userName=" + encodeURIComponent(userName) + ";expires=" + exp.toGMTString();
// document.cookie = "password=" + encodeURIComponent(password) + ";expires=" + exp.toGMTString();
} else {
......@@ -449,27 +526,23 @@ class Login extends React.Component {
// document.cookie = "userName=" + "" + ";expires=" + exp.toGMTString();
// document.cookie = "password=" + "" + ";expires=" + exp.toGMTString();
this.setState({
accountVal: '',
passwordVal: ''
accountVal: "",
passwordVal: "",
});
}
this.setState({
redirectToReferrer: true,
});
}
} else {
this.setState({
msgInfo1: res.subMsg?intl.get(res.subMsg) :res.msg,
msgInfo1: res.subMsg ? intl.get(res.subMsg) : res.msg,
});
//message.error(intl.get(res.subMsg));
}
});
func.mainLoadingHide();
}
};
// 首次登录
m2MobileFn = (value) => {
this.setState({
......@@ -482,23 +555,24 @@ class Login extends React.Component {
this.setState({
m1Mobile: value,
});
}
};
testPhoneCode = (value) => {
this.setState({
testPhoneCode: value
testPhoneCode: value,
});
}
};
newPassword = (value) => { //bug-12732-liyuan
newPassword = (value) => {
//bug-12732-liyuan
// const regu = /^.*(?=.{8,20})(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$/;
const regu = /(^.*(?=.{8,20})(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*\d)(?=.*[A-Z]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[A-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*[A-Z])(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)/;
const regu =
/(^.*(?=.{8,20})(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*\d)(?=.*[A-Z]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[A-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*[A-Z])(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)/;
let re = new RegExp(regu);
if(re.test(value)){
if (re.test(value)) {
this.setState({
m2Passowrd: value,
msgInfo: '',
msgInfo: "",
});
} else {
this.setState({
......@@ -506,24 +580,25 @@ class Login extends React.Component {
msgInfo: intl.get("pwd.type.error"),
});
}
}
};
passwordAgain = (value) => {
// const regu = /^.*(?=.{8,20})(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$/;
const regu = /(^.*(?=.{8,20})(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*\d)(?=.*[A-Z]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[A-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*[A-Z])(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)/;
const regu =
/(^.*(?=.{8,20})(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*\d)(?=.*[A-Z]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*\d)(?=.*[A-Z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)|(^.*(?=.{8,20})(?=.*[A-Z])(?=.*[a-z])(?=.*[~!@#$%^&*()_+[\]{}|\;:'",./<>?]).*$)/;
let re = new RegExp(regu);
if(re.test(value)){
if (re.test(value)) {
this.setState({
m2PassowrdAgain: value,
msgInfo: '',
})
}else{
msgInfo: "",
});
} else {
this.setState({
m2PassowrdAgain: value,
msgInfo: intl.get("pwd.type.error"),
});
}
}
};
m1PassowrdAgainBlur = () => {
const { m2Passowrd, m2PassowrdAgain } = this.state;
if (!m2PassowrdAgain) {
......@@ -537,11 +612,11 @@ class Login extends React.Component {
});
} else {
this.setState({
msgInfo: intl.get('TwoInputPasswordsMustBeConsistent'),
msgInfo: intl.get("TwoInputPasswordsMustBeConsistent"),
});
}
}
}
};
m2PassowrdAgainBlur = () => {
const { m2Passowrd, m2PassowrdAgain } = this.state;
......@@ -556,24 +631,31 @@ class Login extends React.Component {
});
} else {
this.setState({
msgInfo: intl.get('TwoInputPasswordsMustBeConsistent'),
msgInfo: intl.get("TwoInputPasswordsMustBeConsistent"),
});
}
}
}
};
m2loginFn = (e) => {
const { m2Mobile, testPhoneCode, m2Passowrd, m2PassowrdAgain, m2accountId, smsSendRequestNo } = this.state;
const {
m2Mobile,
testPhoneCode,
m2Passowrd,
m2PassowrdAgain,
m2accountId,
smsSendRequestNo,
} = this.state;
const reg = /^1[3456789]\d{9}$/;
if (!m2Mobile) {
this.setState({
msgInfo: intl.get('mobile.number.empty'),
msgInfo: intl.get("mobile.number.empty"),
});
return false;
}
if (!reg.test(m2Mobile)) {
this.setState({
msgInfo: intl.get('WrongPhoneNumberFormat'),
msgInfo: intl.get("WrongPhoneNumberFormat"),
});
return false;
} else {
......@@ -584,57 +666,67 @@ class Login extends React.Component {
if (!testPhoneCode) {
this.setState({
msgInfo: intl.get('PleaseInputSmsCode'),
msgInfo: intl.get("PleaseInputSmsCode"),
});
return false;
}
if (!m2Passowrd) {
this.setState({
msgInfo: intl.get('NewPassword'),
msgInfo: intl.get("NewPassword"),
});
return false;
}
if (!m2PassowrdAgain) {
this.setState({
msgInfo: intl.get('ConfirmNewPassword'),
msgInfo: intl.get("ConfirmNewPassword"),
});
return false;
}
if (m2Passowrd !== m2PassowrdAgain) {
this.setState({
msgInfo: intl.get('TwoInputPasswordsMustBeConsistent'),
msgInfo: intl.get("TwoInputPasswordsMustBeConsistent"),
});
return false;
}
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 newPassword=""
let confirmNewPassword=""
let salt = "";
let date = "";
let key = "";
let sign = "";
let newPassword = "";
let confirmNewPassword = "";
salt = this.generateCharacter(16)
console.log("validate-salt",salt)
date = this.getCurrentDay()
console.log("validate-date",date)
newPassword = sm2.doEncrypt(m2Passowrd+salt, public_key, 1);
confirmNewPassword = sm2.doEncrypt(m2PassowrdAgain+salt, public_key, 1)
salt = this.generateCharacter(16);
console.log("validate-salt", salt);
date = this.getCurrentDay();
console.log("validate-date", date);
newPassword = sm2.doEncrypt(m2Passowrd + salt, public_key, 1);
confirmNewPassword = sm2.doEncrypt(m2PassowrdAgain + salt, public_key, 1);
newPassword = "04" + newPassword
confirmNewPassword = "04" + confirmNewPassword
newPassword = "04" + newPassword;
confirmNewPassword = "04" + confirmNewPassword;
if(salt && date){
key = salt+date
console.log("validate-key",key)
if (salt && date) {
key = salt + date;
console.log("validate-key", key);
}
sign="confirmPassword="+confirmNewPassword+"&password="+newPassword+"&salt="+salt+"&key="+key
console.log("validate-sign",md5(sign))
sign =
"confirmPassword=" +
confirmNewPassword +
"&password=" +
newPassword +
"&salt=" +
salt +
"&key=" +
key;
console.log("validate-sign", md5(sign));
// const params = {
// accountId: m2accountId,
......@@ -654,18 +746,18 @@ class Login extends React.Component {
password: newPassword,
confirmPassword: confirmNewPassword,
smsSendRequestNo: smsSendRequestNo,
salt:salt,
sign: md5(sign)
salt: salt,
sign: md5(sign),
};
this.props.firstLogin(params, (res) => {
if (res.code === '1000') {
if (res.code === "1000") {
message.success(intl.get(res.subMsg));
this.modal2Click(e);
} else {
message.error(intl.get(res.subMsg));
}
});
}
};
// 短信登录
......@@ -673,27 +765,28 @@ class Login extends React.Component {
this.setState({
testMobile: value,
});
}
};
testImgCode = (value) => {
this.setState({
imgVerifyCode: value
imgVerifyCode: value,
});
}
};
//短信验证码登录
testLoginFn = () => {
const { testMobile, testPhoneCode, smsSendRequestNo, imgVerifyCode } = this.state;
const { testMobile, testPhoneCode, smsSendRequestNo, imgVerifyCode } =
this.state;
const reg = /^1[3456789]\d{9}$/;
if (!testMobile) {
this.setState({
msgInfo: intl.get('mobile.number.empty'),
msgInfo: intl.get("mobile.number.empty"),
});
return false;
}
if (!reg.test(testMobile)) {
this.setState({
msgInfo: intl.get('WrongPhoneNumberFormat'),
msgInfo: intl.get("WrongPhoneNumberFormat"),
});
return false;
} else {
......@@ -704,13 +797,13 @@ class Login extends React.Component {
if (!imgVerifyCode) {
this.setState({
msgInfo: intl.get('PleaseInputCaptchaCode'),
msgInfo: intl.get("PleaseInputCaptchaCode"),
});
return false;
}
if (!testPhoneCode) {
this.setState({
msgInfo: intl.get('PleaseInputSmsCode'),
msgInfo: intl.get("PleaseInputSmsCode"),
});
return false;
}
......@@ -719,22 +812,22 @@ class Login extends React.Component {
smsVerifyCode: testPhoneCode,
smsSendRequestNo: smsSendRequestNo,
// languageCode: localStorage.getItem("lang_type") || null //local获取lang_type
languageCode: sessionStorage.getItem("lang_type") || null //local获取lang_type
languageCode: sessionStorage.getItem("lang_type") || null, //local获取lang_type
};
this.props.testLogin(params, (res) => {
if (res.code === '1000') {
if (res.code === "1000") {
this.getLanguageType();
message.success(intl.get('success'));
message.success(intl.get("success"));
if (res.data.Authorization) {
Storage.sessionPut('token', res.data.Authorization);
Storage.sessionPut("token", res.data.Authorization);
this.setState({
redirectToReferrer: true,
});
}
// 签到打卡
Storage.sessionPut('isPCEnableSign', res.data.isPCEnableSign);
Storage.sessionPut('isFirstLogin', res.data.isFirstLogin);
Storage.sessionPut('isEnableSign', res.data.isEnableSign);
Storage.sessionPut("isPCEnableSign", res.data.isPCEnableSign);
Storage.sessionPut("isFirstLogin", res.data.isFirstLogin);
Storage.sessionPut("isEnableSign", res.data.isEnableSign);
} else {
message.error(intl.get(res.subMsg));
}
......@@ -747,15 +840,14 @@ class Login extends React.Component {
console.log("记住密码:", isChecked);
if (isChecked) {
this.setState({
isRemember: true
isRemember: true,
});
} else {
this.setState({
isRemember: false
isRemember: false,
});
}
}
};
loadAccountInfo = () => {
//读取cookie
......@@ -770,31 +862,37 @@ class Login extends React.Component {
isRemember: true,
});
}
}
};
// 忘记密码
lostPassword = () => {
this.codeSetInterval(0);
this.setState({
modalVsb: 'block',
modalVsb: "block",
});
}
};
m1loginFn = (e) => {
const { m1Mobile, testPhoneCode, m2Passowrd, m2PassowrdAgain, m2accountId, smsSendRequestNo } = this.state;
const {
m1Mobile,
testPhoneCode,
m2Passowrd,
m2PassowrdAgain,
m2accountId,
smsSendRequestNo,
} = this.state;
const reg = /^1[3456789]\d{9}$/;
if (!m1Mobile) {
this.setState({
msgInfo: intl.get('mobile.number.empty'),
msgInfo: intl.get("mobile.number.empty"),
});
return false;
}
if (!reg.test(m1Mobile)) {
this.setState({
msgInfo: intl.get('WrongPhoneNumberFormat'),
msgInfo: intl.get("WrongPhoneNumberFormat"),
});
return false;
} else {
......@@ -804,7 +902,7 @@ class Login extends React.Component {
}
if (!testPhoneCode) {
this.setState({
msgInfo: intl.get('PleaseInputSmsCode'),
msgInfo: intl.get("PleaseInputSmsCode"),
});
return false;
} else {
......@@ -814,7 +912,7 @@ class Login extends React.Component {
}
if (!m2Passowrd) {
this.setState({
msgInfo: intl.get('NewPassword'),
msgInfo: intl.get("NewPassword"),
});
return false;
} else {
......@@ -825,7 +923,7 @@ class Login extends React.Component {
if (!m2PassowrdAgain) {
this.setState({
msgInfo: intl.get('ConfirmNewPassword'),
msgInfo: intl.get("ConfirmNewPassword"),
});
return false;
} else {
......@@ -836,7 +934,7 @@ class Login extends React.Component {
if (m2Passowrd !== m2PassowrdAgain) {
this.setState({
msgInfo: intl.get('TwoInputPasswordsMustBeConsistent'),
msgInfo: intl.get("TwoInputPasswordsMustBeConsistent"),
});
return false;
} else {
......@@ -845,34 +943,44 @@ class Login extends React.Component {
});
}
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 newPassword=""
let confirmNewPassword=""
let salt = "";
let date = "";
let key = "";
let sign = "";
let newPassword = "";
let confirmNewPassword = "";
salt = this.generateCharacter(16)
console.log("validate-salt",salt)
date = this.getCurrentDay()
console.log("validate-date",date)
newPassword = sm2.doEncrypt(m2Passowrd+salt, public_key, 1);
confirmNewPassword = sm2.doEncrypt(m2PassowrdAgain+salt, public_key, 1)
salt = this.generateCharacter(16);
console.log("validate-salt", salt);
date = this.getCurrentDay();
console.log("validate-date", date);
newPassword = sm2.doEncrypt(m2Passowrd + salt, public_key, 1);
confirmNewPassword = sm2.doEncrypt(m2PassowrdAgain + salt, public_key, 1);
newPassword = "04" + newPassword
confirmNewPassword = "04" + confirmNewPassword
newPassword = "04" + newPassword;
confirmNewPassword = "04" + confirmNewPassword;
if(salt && date){
key = salt+date
console.log("validate-key",key)
if (salt && date) {
key = salt + date;
console.log("validate-key", key);
}
sign="confirmPassword="+confirmNewPassword+"&password="+newPassword+"&salt="+salt+"&key="+key
console.log("validate-sign",md5(sign))
sign =
"confirmPassword=" +
confirmNewPassword +
"&password=" +
newPassword +
"&salt=" +
salt +
"&key=" +
key;
console.log("validate-sign", md5(sign));
// const params = {
// accountId: m2accountId,
......@@ -890,24 +998,24 @@ class Login extends React.Component {
password: newPassword,
confirmPassword: confirmNewPassword,
smsSendRequestNo: smsSendRequestNo,
salt:salt,
sign: md5(sign)
salt: salt,
sign: md5(sign),
};
this.props.forgetLogin(params, (res) => {
if (res.code === '1000') {
if (res.code === "1000") {
message.success(intl.get(res.subMsg));
this.modal1Click(e);
} else {
message.error(intl.get(res.subMsg));
}
});
}
};
modal1Click = (e) => {
e.stopPropagation();
this.setState({
modalVsb: 'none',
modalVsb: "none",
m1Mobile: null,
testPhoneCode: null,
m2Passowrd: null,
......@@ -916,17 +1024,17 @@ class Login extends React.Component {
smsSendRequestNo: null,
msgInfo: null,
});
}
};
modal1Content = (e) => {
e.stopPropagation();
}
};
modal2Click = (e) => {
func.mainLoadingHide();
this.codeSetInterval(0);
this.setState({
disabledBtn: true,
btnName: intl.get('SendCode'),
modal2Vsb: 'none',
btnName: intl.get("SendCode"),
modal2Vsb: "none",
m2Mobile: null,
testPhoneCode: null,
m2Passowrd: null,
......@@ -935,17 +1043,16 @@ class Login extends React.Component {
smsSendRequestNo: null,
msgInfo: null,
});
}
};
modal2Content = (e) => {
e.stopPropagation();
}
};
componentWillUnmount() {
isMounted = false;
this.props = null;
}
render() {
//const from = this.props.location.pathname;
console.log(this.state.logoUrl);
......@@ -955,35 +1062,35 @@ class Login extends React.Component {
const SUPPOER_LOCALES = [
{
name: "简体中文",
value: "zh_CN"
value: "zh_CN",
},
{
name: "English",
value: "en_US"
}
value: "en_US",
},
];
if (redirectToReferrer) {
const { from } = this.props.location.state || {
from: { pathname: fnPrefix(this.props.match.path) + "/index" } // default site
from: { pathname: fnPrefix(this.props.match.path) + "/index" }, // default site
};
return <Redirect to={from} />;
}
const remarkStyle = {//bug-12732-liyuan
marginBottom: 0,
lineHeight: '1.8',
fontSize: '12px',
padding: '0 16px'
}
const remarkStyle = {
//bug-12732-liyuan
marginBottom: 0,
lineHeight: "1.8",
fontSize: "12px",
padding: "0 16px",
};
return (
<div className="login">
<div style={{ width: "100%", background: "#fff" }}>
<div className="login-logo">
{
this.state.logoUrl?
<img className="logo-img" src={this.state.logoUrl } />:""
}
{this.state.logoUrl ? (
<img className="logo-img" src={this.state.logoUrl} />
) : (
""
)}
{/* <Popover content={<select onChange={this.fnChangeLanguage} className="logo-popover" >
<option value="" disabled="">Change Language</option>
......@@ -1002,27 +1109,49 @@ class Login extends React.Component {
</div>
<div className="login-color">
<div className="login-bgp" style={{ backgroundImage: "url(" + this.state.url + ")" }}></div>
<div
className="login-bgp"
style={{ backgroundImage: "url(" + this.state.url + ")" }}
></div>
<div className="login-box">
<div className="login-form">
<Tabs
animated={false}
tabBarGutter={60}
tabBarStyle={{ display: "flex", justifyContent: "center" }}
tabBarExtraContent={<Divider style={{ position: 'absolute', left: '156px', top: '16px' }} type="vertical" />}
tabBarExtraContent={
<Divider
style={{ position: "absolute", left: "156px", top: "16px" }}
type="vertical"
/>
}
defaultActiveKey={this.state.tabsKey}
onChange={(key) => this.tabsCallback(key)}
>
<TabPane tab={<span style={{maxWidth:'90px',
paddingLeft: '0px',
display: 'inline-block',
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: 'ellipsis'
}} title={intl.get('AccountLogin')}>{intl.get('AccountLogin')}</span>} key="1" style={{ textAlign: "center" }}>
<TabPane
tab={
<span
style={{
maxWidth: "90px",
paddingLeft: "0px",
display: "inline-block",
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
}}
title={intl.get("AccountLogin")}
>
{intl.get("AccountLogin")}
</span>
}
key="1"
style={{ textAlign: "center" }}
>
<Input
style={{ width: "90%", marginTop: "20px" }}
prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />}
prefix={
<Icon type="user" style={{ color: "rgba(0,0,0,.25)" }} />
}
placeholder={this.state.loginNameDesc}
value={this.state.accountVal}
whitespace="true"
......@@ -1031,67 +1160,163 @@ class Login extends React.Component {
<Input.Password
type="password"
maxLength={20}
style={{ width: "90%", marginTop: "30px", marginBottom: "8px" }}
prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
style={{
width: "90%",
marginTop: "30px",
marginBottom: "8px",
}}
prefix={
<Icon type="lock" style={{ color: "rgba(0,0,0,.25)" }} />
}
placeholder={this.state.loginPwdDesc}
value={this.state.passwordVal}
onChange={(e) => this.passwordVal(e.target.value)}
onPressEnter={this.userNameLogin}
/>
{/*记住密码,忘记密码 */}
<div style={{ paddingRight: '8px', paddingLeft: '8px', height: "20px" }}>
<div
style={{
paddingRight: "8px",
paddingLeft: "8px",
height: "20px",
}}
>
<span>
<Checkbox checked={this.state.isRemember} onClick={this.handleCheckbox} style={{ position: "absolute", left: "20px", color: '#999' }}>{intl.get('KeepPassword')}</Checkbox>
<Checkbox
checked={this.state.isRemember}
onClick={this.handleCheckbox}
style={{
position: "absolute",
left: "20px",
color: "#999",
}}
>
{intl.get("KeepPassword")}
</Checkbox>
</span>
<span>
<a onClick={this.lostPassword} style={{ position: "absolute", right: "20px", color: '#999' }}>{intl.get('ForgotPassword')}</a>
<a
onClick={this.lostPassword}
style={{
position: "absolute",
right: "20px",
color: "#999",
}}
>
{intl.get("ForgotPassword")}
</a>
</span>
</div>
<span className="test-info-user">{this.state.msgInfo1}</span>
<Button className="login-btn-tab1" style={{ width: '90%' }} type="primary" onClick={this.userNameLogin} title={intl.get('LogIn')}>{intl.get('LogIn')}</Button>
<Button
className="login-btn-tab1"
style={{ width: "90%" }}
type="primary"
onClick={this.userNameLogin}
title={intl.get("LogIn")}
>
{intl.get("LogIn")}
</Button>
</TabPane>
<TabPane tab={<span style={{maxWidth:'90px',
paddingLeft: '0px',
display: 'inline-block',
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: 'ellipsis'
}} title={intl.get('SmsLogin')} >{intl.get('SmsLogin')}</span>}
key="2" style={{ padding: "5%" }}>
<TabPane
tab={
<span
style={{
maxWidth: "90px",
paddingLeft: "0px",
display: "inline-block",
overflow: "hidden",
whiteSpace: "nowrap",
textOverflow: "ellipsis",
}}
title={intl.get("SmsLogin")}
>
{intl.get("SmsLogin")}
</span>
}
key="2"
style={{ padding: "5%" }}
>
<Input
className={this.state.borderRed}
onFocus={this.inputFocus}
style={{ width: "100%", marginTop: "0px" }}
prefix={<Icon type="mobile" style={{ color: 'rgba(0,0,0,.25)' }} />}
placeholder={intl.get('mobile.number.empty')}
prefix={
<Icon
type="mobile"
style={{ color: "rgba(0,0,0,.25)" }}
/>
}
placeholder={intl.get("mobile.number.empty")}
value={this.state.testMobile}
onChange={(e) => this.testMobileFn(e.target.value)}
/>
<div>
<Input
style={{ width: "55%", marginTop: "25px", marginRight: "10%" }}
prefix={<Icon type="safety" style={{ color: 'rgba(0,0,0,.25)' }} />}
placeholder={intl.get('PleaseInputCaptchaCode')}
style={{
width: "55%",
marginTop: "25px",
marginRight: "10%",
}}
prefix={
<Icon
type="safety"
style={{ color: "rgba(0,0,0,.25)" }}
/>
}
placeholder={intl.get("PleaseInputCaptchaCode")}
value={this.state.imgVerifyCode}
onChange={(e) => this.testImgCode(e.target.value)}
/>
<a onClick={this.imgClick}><img style={{ height: "38px", width: "35%", marginTop: "-3px" }} src={this.state.imgsUrl} /></a>
<a onClick={this.imgClick}>
<img
style={{
height: "38px",
width: "35%",
marginTop: "-3px",
}}
src={this.state.imgsUrl}
/>
</a>
</div>
<Input
style={{ width: "55%", marginTop: "25px", marginBottom: "8px", marginRight: "10%" }}
style={{
width: "55%",
marginTop: "25px",
marginBottom: "8px",
marginRight: "10%",
}}
onChange={(e) => this.testPhoneCode(e.target.value)}
value={this.state.testPhoneCode}
disabled={this.state.disabledBtn}
placeholder={intl.get('VerificationCode')}
placeholder={intl.get("VerificationCode")}
onPressEnter={this.testLoginFn}
/>
<Button className="login-btn-tab2" style={{ color: this.state.codeBtnColor, backgroundColor: this.state.backColor }} disabled={this.state.codeBtnState} onClick={() => this.testCodeBtn(1)} title={this.state.btnName}>{this.state.btnName}</Button>
<Button
className="login-btn-tab2"
style={{
color: this.state.codeBtnColor,
backgroundColor: this.state.backColor,
}}
disabled={this.state.codeBtnState}
onClick={() => this.testCodeBtn(1)}
title={this.state.btnName}
>
{this.state.btnName}
</Button>
<p className="test-info">{this.state.msgInfo}</p>
<Button type="primary" className="login-btn-tab3" onClick={this.testLoginFn} title={intl.get('LogIn')}>{intl.get('LogIn')}</Button>
<Button
type="primary"
className="login-btn-tab3"
onClick={this.testLoginFn}
title={intl.get("LogIn")}
>
{intl.get("LogIn")}
</Button>
</TabPane>
</Tabs>
</div>
......@@ -1101,22 +1326,39 @@ class Login extends React.Component {
{this.state.footer}
<br />
<span>
{/* <a href="http://www.miibeian.gov.cn"> 沪ICP备11001012号</a> */}
{/* <a href="http://www.miibeian.gov.cn"> 沪ICP备11001012号</a> */}
{/* bug-10823-cwj */}
<a href="http://www.beian.miit.gov.cn/"> ICP11001012</a>
</span>
</p>
{/* 下边是两个弹框 第一个是 忘记密码 第二个是首次登录 */}
<div className="login-modal1" onClick={this.modal1Click} style={{ display: this.state.modalVsb }}>
<div className="modal1-content" onClick={(e) => this.modal1Content(e)}>
<Icon type="close" className="icon-close" onClick={this.modal1Click} />
<div className="modal1-h3" title={intl.get('ResetPassword')}>{intl.get('ResetPassword')}</div>
<p className="modal1-p" >{intl.get('UseTheBindedPhoneNumberToResetPassword')}</p>
<div
className="login-modal1"
onClick={this.modal1Click}
style={{ display: this.state.modalVsb }}
>
<div
className="modal1-content"
onClick={(e) => this.modal1Content(e)}
>
<Icon
type="close"
className="icon-close"
onClick={this.modal1Click}
/>
<div className="modal1-h3" title={intl.get("ResetPassword")}>
{intl.get("ResetPassword")}
</div>
<p className="modal1-p">
{intl.get("UseTheBindedPhoneNumberToResetPassword")}
</p>
<div className="modal1-form">
<Input
style={{ width: "100%", marginTop: "0px" }}
prefix={<Icon type="mobile" style={{ color: 'rgba(0,0,0,.25)' }} />}
placeholder={intl.get('mobile.number.empty')}
prefix={
<Icon type="mobile" style={{ color: "rgba(0,0,0,.25)" }} />
}
placeholder={intl.get("mobile.number.empty")}
value={this.state.m1Mobile}
onChange={(e) => this.m1MobileFn(e.target.value)}
/>
......@@ -1126,16 +1368,36 @@ class Login extends React.Component {
value={this.state.testPhoneCode}
disabled={this.state.disabledBtn}
onChange={(e) => this.testPhoneCode(e.target.value)}
placeholder={intl.get('VerificationCode')}
placeholder={intl.get("VerificationCode")}
/>
<Button className="modal1-btn-tab2" style={{ color: this.state.codeBtnColor, backgroundColor: this.state.backColor }} disabled={this.state.codeBtnState} onClick={() => this.testCodeBtn(2)}>{this.state.btnName}</Button>
<Button
className="modal1-btn-tab2"
style={{
color: this.state.codeBtnColor,
backgroundColor: this.state.backColor,
}}
disabled={this.state.codeBtnState}
onClick={() => this.testCodeBtn(2)}
>
{this.state.btnName}
</Button>
{/* type="password" 浏览器会有自动填充,添加一个 input display none 就可以解决 */}
<Input type="text" name="text" style={{ display: "none" }} />
<Input type="password" name="password" style={{ display: "none" }} />
<Input
style={{ width: "100%", marginTop: "25px", marginBottom: "8px" }}
prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
placeholder={intl.get('NewPassword')}
type="password"
name="password"
style={{ display: "none" }}
/>
<Input
style={{
width: "100%",
marginTop: "25px",
marginBottom: "8px",
}}
prefix={
<Icon type="lock" style={{ color: "rgba(0,0,0,.25)" }} />
}
placeholder={intl.get("NewPassword")}
maxLength={20}
type="password"
value={this.state.m2Passowrd}
......@@ -1143,13 +1405,23 @@ class Login extends React.Component {
onBlur={this.m1PassowrdAgainBlur}
className={this.state.msgInfo ? "foucesErr" : ""} //bug-12732-liyuan
/>
<Input type="password" name="password" style={{ display: "none" }} />
<Input
style={{ width: "100%", marginTop: "25px", marginBottom: "30px" }}
prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
placeholder={intl.get('ConfirmNewPassword')}
type="password"
maxLength={20}
name="password"
style={{ display: "none" }}
/>
<Input
style={{
width: "100%",
marginTop: "25px",
marginBottom: "30px",
}}
prefix={
<Icon type="lock" style={{ color: "rgba(0,0,0,.25)" }} />
}
placeholder={intl.get("ConfirmNewPassword")}
type="password"
maxLength={20}
value={this.state.m2PassowrdAgain}
onChange={(e) => this.passwordAgain(e.target.value)}
onBlur={this.m1PassowrdAgainBlur}
......@@ -1157,34 +1429,57 @@ class Login extends React.Component {
className={this.state.msgInfo ? "foucesErr" : ""} //bug-12732-liyuan
/>
<p className="login-info">{this.state.msgInfo}</p>
<Button type="primary" className="modal1-btn-tab3" onClick={this.m1loginFn} >{intl.get('Yes')}</Button>
<Button
type="primary"
className="modal1-btn-tab3"
onClick={this.m1loginFn}
>
{intl.get("Yes")}
</Button>
</div>
{/*bug-12732-liyuan*/}
<p style={{...remarkStyle, marginTop: '32px'}}>
<p style={{ ...remarkStyle, marginTop: "32px" }}>
<span>(1)</span>&nbsp;&nbsp;
<span>{intl.get("Passwordonlysupportsletters")}</span>
</p>
<p style={{...remarkStyle, marginTop: '0'}}>
<p style={{ ...remarkStyle, marginTop: "0" }}>
<span>(2)</span>&nbsp;&nbsp;
<span>{intl.get("bitsinlengthandmustinclude3ofthefollowing")}</span>
<span>
{intl.get("bitsinlengthandmustinclude3ofthefollowing")}
</span>
</p>
<p style={{...remarkStyle, marginTop: '0', paddingBottom: '12px'}}>
<p
style={{ ...remarkStyle, marginTop: "0", paddingBottom: "12px" }}
>
<span>(3)</span>&nbsp;&nbsp;
<span>{intl.get("Passwordcannotincludeuserinformation")}</span>
</p>
</div>
</div>
<div className="login-modal2" onClick={(e) => this.modal2Click(e)} style={{ display: this.state.modal2Vsb }}>
<div className="modal1-content" onClick={(e) => this.modal2Content(e)}>
<div
className="login-modal2"
onClick={(e) => this.modal2Click(e)}
style={{ display: this.state.modal2Vsb }}
>
<div
className="modal1-content"
onClick={(e) => this.modal2Content(e)}
>
{/* <Icon type="close" className="icon-close" onClick={(e)=>this.modal2Click(e)} /> */}
<div className="modal1-h3" title={intl.get('ChangePassword')}>{intl.get('ChangePassword')}</div>
<p className="modal1-p" >{intl.get('PleaseChangePasswordForYourFirstLogIn')}</p>
<div className="modal1-h3" title={intl.get("ChangePassword")}>
{intl.get("ChangePassword")}
</div>
<p className="modal1-p">
{intl.get("PleaseChangePasswordForYourFirstLogIn")}
</p>
<div className="modal1-form">
<Input
style={{ width: "100%", marginTop: "0px" }}
prefix={<Icon type="mobile" style={{ color: 'rgba(0,0,0,.25)' }} />}
placeholder={intl.get('mobile.number.empty')}
prefix={
<Icon type="mobile" style={{ color: "rgba(0,0,0,.25)" }} />
}
placeholder={intl.get("mobile.number.empty")}
// defaultValue={this.state.m2Mobile}
value={this.state.m2Mobile}
disabled={this.state.firstLoginInput ? true : false}
......@@ -1196,47 +1491,91 @@ class Login extends React.Component {
value={this.state.testPhoneCode}
disabled={this.state.disabledBtn}
onChange={(e) => this.testPhoneCode(e.target.value)}
placeholder={intl.get('VerificationCode')}
placeholder={intl.get("VerificationCode")}
/>
<Button className="modal1-btn-tab2" style={{ color: this.state.codeBtnColor, backgroundColor: this.state.backColor }} disabled={this.state.codeBtnState} onClick={() => this.testCodeBtn(3)} title={this.state.btnName} >{this.state.btnName}</Button>
<Button
className="modal1-btn-tab2"
style={{
color: this.state.codeBtnColor,
backgroundColor: this.state.backColor,
}}
disabled={this.state.codeBtnState}
onClick={() => this.testCodeBtn(3)}
title={this.state.btnName}
>
{this.state.btnName}
</Button>
<Input type="text" name="text" style={{ display: "none" }} />
<Input type="password" name="password" maxLength={20} style={{ display: "none" }} />
<Input
style={{ width: "100%", marginTop: "25px", marginBottom: "8px" }}
prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
type="password"
name="password"
maxLength={20}
style={{ display: "none" }}
/>
<Input
style={{
width: "100%",
marginTop: "25px",
marginBottom: "8px",
}}
prefix={
<Icon type="lock" style={{ color: "rgba(0,0,0,.25)" }} />
}
type="password"
value={this.state.m2Passowrd}
onChange={(e) => this.newPassword(e.target.value)}
onBlur={this.m2PassowrdAgainBlur}
placeholder={intl.get('NewPassword')}
placeholder={intl.get("NewPassword")}
maxLength={20}
className={this.state.msgInfo ? "foucesErr" : ""} //bug-12732-liyuan
/>
<Input type="password" name="password" maxLength={20} style={{ display: "none" }} />
<Input
style={{ width: "100%", marginTop: "25px", marginBottom: "30px" }}
prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
type="password"
name="password"
maxLength={20}
style={{ display: "none" }}
/>
<Input
style={{
width: "100%",
marginTop: "25px",
marginBottom: "30px",
}}
prefix={
<Icon type="lock" style={{ color: "rgba(0,0,0,.25)" }} />
}
onChange={(e) => this.passwordAgain(e.target.value)}
type="password"
value={this.state.m2PassowrdAgain}
onBlur={this.m2PassowrdAgainBlur}
placeholder={intl.get('ConfirmNewPassword')}
placeholder={intl.get("ConfirmNewPassword")}
onPressEnter={this.m2loginFn}
className={this.state.msgInfo ? "foucesErr" : ""} //bug-12732-liyuan
maxLength={20}
/>
<p className="login-info">{this.state.msgInfo}</p>
<Button type="primary" className="modal2-btn-tab3" onClick={this.m2loginFn}>{intl.get('Yes')}</Button>
<Button
type="primary"
className="modal2-btn-tab3"
onClick={this.m2loginFn}
>
{intl.get("Yes")}
</Button>
</div>
<p style={{...remarkStyle, marginTop: '32px'}}>{/*bug-12679-liyuan*/}
<p style={{ ...remarkStyle, marginTop: "32px" }}>
{/*bug-12679-liyuan*/}
<span>(1)</span>&nbsp;&nbsp;
<span>{intl.get("Passwordonlysupportsletters")}</span>
</p>
<p style={{...remarkStyle, marginTop: '0'}}>
<p style={{ ...remarkStyle, marginTop: "0" }}>
<span>(2)</span>&nbsp;&nbsp;
<span>{intl.get("bitsinlengthandmustinclude3ofthefollowing")}</span>
<span>
{intl.get("bitsinlengthandmustinclude3ofthefollowing")}
</span>
</p>
<p style={{...remarkStyle, marginTop: '0', paddingBottom: '12px'}}>
<p
style={{ ...remarkStyle, marginTop: "0", paddingBottom: "12px" }}
>
<span>(3)</span>&nbsp;&nbsp;
<span>{intl.get("Passwordcannotincludeuserinformation")}</span>
</p>
......@@ -1247,13 +1586,13 @@ class Login extends React.Component {
}
}
const mapStateToProps = state => ({
const mapStateToProps = (state) => ({
token: state.loginReducer.token,
imgUrl: state.loginReducer.imgUrl,
accountObj: state.loginReducer.accountObj,
});
const mapDispatchToProps = dispatch => ({
const mapDispatchToProps = (dispatch) => ({
loginAction: bindActionCreators(loginAction, dispatch),
bgmImage: bindActionCreators(bgmImage, dispatch),
logoImage: bindActionCreators(logoImage, dispatch),
......
......@@ -8,12 +8,12 @@
.login {
height: 100%;
position: relative;
input{
input {
height: 40px;
}
input:focus{
-webkit-box-shadow:2px 5px 6px 0px rgba(66, 133, 244, 0.32);
-moz-box-shadow:2px 5px 6px 0px rgba(66, 133, 244, 0.32);
input:focus {
-webkit-box-shadow: 2px 5px 6px 0px rgba(66, 133, 244, 0.32);
-moz-box-shadow: 2px 5px 6px 0px rgba(66, 133, 244, 0.32);
}
// position: fixed;
// _position: absolute;
......@@ -27,11 +27,11 @@
// background-size: cover;
// zoom: 1;
// background-color: #fff;
.login-logo{
.login-logo {
width: 1200px;
height: 65px;
margin: auto;
.logo-img{
.logo-img {
width: 160px;
height: 50px;
//background-color: #368ae2;
......@@ -40,58 +40,58 @@
// margin-left: 200px;
// margin-right: 800px;
}
.logo-popover{
.logo-popover {
position: relative;
top: 2px;
}
.logo-language{
.logo-language {
font-size: 12px;
color: #4285F4;
color: #4285f4;
margin-left: 3px;
cursor: pointer;
}
.home-header{
.home-header {
display: inline-block;
cursor: pointer;
float: right;
margin-top: 30px;
position: relative;
//margin-right: 30px;
//margin-right: -70px;
.home-header-language-check{
float: right;
margin-top: 30px;
position: relative;
//margin-right: 30px;
//margin-right: -70px;
.home-header-language-check {
cursor: pointer;
img{
img {
width: 20px;
height: 20px;
float: left;
}
.home-header-language-text{
.home-header-language-text {
margin-left: 5px;
height: 20px;
line-height: 20px;
float: left;
font-size: 12px;
color: #4285F4;
color: #4285f4;
//display: none;
}
.home-header-language-active-text{
.home-header-language-active-text {
margin-left: 5px;
height: 20px;
line-height: 20px;
float: left;
font-size: 12px;
color: #4285F4;
color: #4285f4;
}
.home-header-language-options{
.home-header-language-options {
position: absolute;
top: 30px;
left: -62px;
width: 155px;
padding: 10px 0;
background-color: #fff;
border:1px solid #e5e5e5;
border: 1px solid #e5e5e5;
z-index: 100;
.language-option{
.language-option {
width: 100%;
height: 20px;
line-height: 20px;
......@@ -100,33 +100,33 @@
color: #333;
padding: 14px 12px;
position: relative;
.language-option-bg{
.language-option-bg {
width: 100%;
height: 20px;
position: absolute;
left: 0;
top: 0;
background-color: #4285F4;
background-color: #4285f4;
opacity: 0.2;
}
}
.isCurrentLanguageOption{
color:#4285F4;
.isCurrentLanguageOption {
color: #4285f4;
}
.language-option:hover {
color:#4285F4;
color: #4285f4;
}
}
}
}
}
.login-color{
.login-color {
width: 100%;
overflow: hidden;
position: relative;
height: 600px;
margin: auto;
.login-bgp{
.login-bgp {
//width: 1920px;
height: 600px;
position: absolute;
......@@ -141,49 +141,52 @@
//background-image: url(https://ss0.bdstatic.com/l4oZeXSm1A5BphGlnYG/skin/115.jpg);
//background-image: url(https://ss0.bdstatic.com/l4oZeXSm1A5BphGlnYG/skin/875.jpg);
}
.login-box{
.login-box {
width: 1200px;
height: 600px;
margin: auto;
position: relative;
background-image: url(https://ss0.bdstatic.com/l4oZeXSm1A5BphGlnYG/skin/115.jpg);
.login-form {
width: 350px;
height: 355px;
background-color: #fff;
position: absolute!important;
position: absolute !important;
right: 60px;
//left: 870px;
bottom: 0;
margin: auto;
top: 0;
box-shadow: 0 5px 15px #7f7f7f;
.input-red{
.input-red {
border-radius: 4px;
input{
border: 1px solid #EE6157;
input {
border: 1px solid #ee6157;
}
}
.test-info{
.test-info {
text-align: center;
color: #EE6157;
color: #ee6157;
position: relative;
top: -6px;
font-size: 12px;
}
.ant-tabs:not(.ant-tabs-vertical)>.ant-tabs-content>.ant-tabs-tabpane{
.ant-tabs:not(.ant-tabs-vertical)
> .ant-tabs-content
> .ant-tabs-tabpane {
height: 275px;
}
.test-info-user{
.test-info-user {
margin-bottom: 10px;
width: 90%;
display: inline-block;
text-align: center;
color: #EE6157;
color: #ee6157;
position: relative;
top: 35px;
font-size: 12px;
}
.login-btn-tab1{
.login-btn-tab1 {
height: 40px;
font-size: 14px;
margin-top: 2px;
......@@ -191,15 +194,15 @@
position: absolute;
bottom: 5px;
left: 5%;
span{
span {
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
display:inline-block;
height:18px;
display: inline-block;
height: 18px;
}
}
.login-btn-tab2{
.login-btn-tab2 {
width: 35%;
height: 40px;
margin-top: 20px;
......@@ -208,7 +211,7 @@
text-align: center;
padding: 0px;
span{
span {
display: inline-block;
width: 100%;
overflow: hidden;
......@@ -217,7 +220,7 @@
height: 18px;
}
}
.login-btn-tab3{
.login-btn-tab3 {
height: 40px;
font-size: 14px;
margin-top: 2px;
......@@ -230,15 +233,15 @@
margin-top: 2.5px;
}
.ant-checkbox-input{
.ant-checkbox-input {
height: 10px;
width: 10px;
}
.ant-checkbox-inner {
height: 10px;
width: 10px;
}
.ant-checkbox-inner{
height: 10px;
width: 10px;
}
.ant-checkbox-checked .ant-checkbox-inner {
background-color: #fff;
border-color: #999999;
......@@ -253,8 +256,8 @@
border-top: 0;
border-left: 0;
content: " ";
-webkit-transition: all .2s cubic-bezier(.12,.4,.29,1.46) .1s;
transition: all .2s cubic-bezier(.12,.4,.29,1.46) .1s;
-webkit-transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
transition: all 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46) 0.1s;
opacity: 1;
}
.ant-checkbox-inner:after {
......@@ -263,7 +266,7 @@
transform: rotate(45deg) scale(0);
position: absolute;
left: 2.2px;
top: -.2px;
top: -0.2px;
display: table;
width: 3.7px;
height: 6px;
......@@ -271,44 +274,45 @@
border-top: 0;
border-left: 0;
content: " ";
-webkit-transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;
transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;
-webkit-transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),
opacity 0.1s;
transition: all 0.1s cubic-bezier(0.71, -0.46, 0.88, 0.6),
opacity 0.1s;
opacity: 0;
}
.ant-checkbox + span,
.ant-checkbox-wrapper + span {
padding-left: 4px;
padding-right: 8px;
}
// 修改antd复选框end,预测这部分内容会去除。
}
.ant-checkbox+span, .ant-checkbox-wrapper+span {
padding-left: 4px;
padding-right: 8px;
}
// 修改antd复选框end,预测这部分内容会去除。
}
// .login-btn-tab2:hover{
// background-color: #1890ff;
// color: #fff;
// }
}
}
// .login-btn-tab2:hover{
// background-color: #1890ff;
// color: #fff;
// }
}
.login-footer{
.login-footer {
text-align: center;
color: #999;
font-size: 14px;
margin-top: 10px;
height: 70px;
line-height: 28px;
padding:0px;
padding: 0px;
}
.login-modal1{
.login-modal1 {
z-index: 999;
position: absolute;
width: 100%;
height: 110%;
left: 0px;
top: 0px;
background-color:rgba(10, 10, 10, 0.6);
.modal1-content{
background-color: rgba(10, 10, 10, 0.6);
.modal1-content {
position: relative;
z-index: 1000;
width: 350px;
......@@ -316,16 +320,16 @@
background-color: #fff;
margin: auto;
margin-top: 143px;
.icon-close{
.icon-close {
position: absolute;
top: 12px;
right: 8px;
color: #999;
cursor: pointer;
}
.modal1-h3{
padding-left:8px;
padding-right:8px;
.modal1-h3 {
padding-left: 8px;
padding-right: 8px;
height: 40px;
color: #333;
font-size: 16px;
......@@ -337,19 +341,19 @@
white-space: nowrap;
text-overflow: ellipsis;
}
.modal1-p{
.modal1-p {
color: #666;
font-size: 12px;
margin-left: 5%;
margin-top: 20px;
margin-bottom: 0;
}
.modal1-form{
.modal1-form {
padding: 5%;
height: 325px;
text-align: center;
position: relative;
.modal1-btn-tab2{
.modal1-btn-tab2 {
width: 35%;
height: 40px;
margin-top: 20px;
......@@ -360,32 +364,30 @@
white-space: nowrap;
text-overflow: ellipsis;
}
.login-info{
color: #EE6157;
.login-info {
color: #ee6157;
font-size: 12px;
margin-bottom: 0px;
}
.modal1-btn-tab3{
.modal1-btn-tab3 {
width: 90%;
height: 40px;
position: absolute;
left: 5%;
bottom: -22px;
}
}
}
}
.login-modal2{
.login-modal2 {
z-index: 999;
position: absolute;
width: 100%;
height: 110%;
left: 0px;
top: 0px;
background-color:rgba(10, 10, 10, 0.6);
.modal1-content{
background-color: rgba(10, 10, 10, 0.6);
.modal1-content {
z-index: 1000;
width: 350px;
// height: 450px; bug-12732-liyuan
......@@ -393,16 +395,16 @@
background-color: #fff;
margin: auto;
margin-top: 143px;
.icon-close{
.icon-close {
position: absolute;
top: 12px;
right: 8px;
color: #999;
cursor: pointer;
}
.modal1-h3{
padding-left:8px;
padding-right:8px;
.modal1-h3 {
padding-left: 8px;
padding-right: 8px;
height: 40px;
color: #333;
font-size: 16px;
......@@ -414,19 +416,19 @@
white-space: nowrap;
text-overflow: ellipsis;
}
.modal1-p{
.modal1-p {
color: #666;
font-size: 12px;
margin-left: 5%;
margin-top: 20px;
margin-bottom: 0;
}
.modal1-form{
.modal1-form {
position: relative;
padding: 5%;
height: 325px;
text-align: center;
.modal1-btn-tab2{
.modal1-btn-tab2 {
width: 35%;
height: 40px;
margin-top: 20px;
......@@ -437,12 +439,12 @@
white-space: nowrap;
text-overflow: ellipsis;
}
.login-info{
color: #EE6157;
.login-info {
color: #ee6157;
font-size: 12px;
margin-bottom: 0px;
}
.modal2-btn-tab3{
.modal2-btn-tab3 {
width: 90%;
height: 40px;
position: absolute;
......@@ -450,15 +452,13 @@
bottom: -22px;
}
}
}
}
.foucesErr{//bug-12732-liyuan
input{
.foucesErr {
//bug-12732-liyuan
input {
box-shadow: none;
border: 1px solid#ee6157 !important;
}
}
}
......@@ -86,7 +86,7 @@
"mylabiliry103": "评分说明",
"ViewMore": "查看项目",
"pictureBestSize03": "支持",
"PoweredByCompanyName": "上海易知信息科技股份有限公司提供技术支持",
"PoweredByCompanyName": "上海复深蓝软件股份有限公司提供技术支持",
"pictureBestSize04": "大小",
"ApplyNotice": "报名须知",
"pictureBestSize02": "比例为",
......
......@@ -26,7 +26,7 @@
"PleaseInputSmsCode": "请输入验证码",
"confirm.pwd.not.correct": "两次输入的密码不一致",
"8-20CharactersIncludingNumbersAndLetters": "8-20个字符,由字母、数字和符号组合",
"PoweredByShanghaiYizhiTechnologyCo.,Ltd.": "上海易知信息科技股份有限公司提供技术支持",
"PoweredByShanghaiYizhiTechnologyCo.,Ltd.": "上海复深蓝软件股份有限公司提供技术支持",
"Home": "首页",
"Course": "课程",
"MyStudy": "我的学习",
......@@ -392,7 +392,7 @@
"WrongCaptchaCode": "校验码输入不正确",
"WorngSmsCode": "验证码输入不正确",
"TwoInputPasswordsMustBeConsistent": "两次输入的密码不一致",
"PoweredByCompanyName": "版权所有 ©上海易知信息科技股份有限公司",
"PoweredByCompanyName": "版权所有 ©上海复深蓝软件股份有限公司",
"ToSearch1": "搜索",
"ToSearch2": ">>",
"Photo": "头像",
......
var baseUrl = "https://uat.wechat.kmelearning.com";
if (location.host.indexOf("localhost") != -1) {
//
//
// baseUrl = "http://dev.pc.kmelearning.com";
baseUrl = "https://test.pc.kmelearning.com";
// baseUrl = "http://dev.pc.kmelearning.com";
// baseUrl = "https://test.pc.kmelearning.com";
baseUrl = "http://wx.fairyclass.cn";
// baseUrl = "https://uat.pc.kmelearning.com";
// baseUrl = "https://pc.kmelearning.com";
// baseUrl = "https://sasspc.kmelearning.com";
}else {
//这里不许改,谁改谁请30杯奶茶,并且罚款500
baseUrl = "";
// baseUrl = "https://uat.pc.kmelearning.com";
// baseUrl = "https://pc.kmelearning.com";
// baseUrl = "https://sasspc.kmelearning.com";
} else {
//这里不许改,谁改谁请30杯奶茶,并且罚款500
baseUrl = "";
}
// if(urlConfigObj.urlPrefix){
// baseUrl += "/"+ urlConfigObj.urlPrefix;
// } // baseUrl = "https://pc.kmelearning.com";
const api = {
ranking: baseUrl+ "/web-student",
indexUrl: baseUrl + "/web-student",
albumUrl: baseUrl + "/web-student",
tranningList: baseUrl + "/web-student/api/trainingProject/page/list",
trainingHot: baseUrl + "/web-student/api/trainingProject/hot/page/list",
mytrainingList: baseUrl + "/web-student/pc/trainingProject/pc/page/my/list", //我的培训项目列表
ranking: baseUrl + "/web-student",
indexUrl: baseUrl + "/web-student",
albumUrl: baseUrl + "/web-student",
tranningList: baseUrl + "/web-student/api/trainingProject/page/list",
trainingHot: baseUrl + "/web-student/api/trainingProject/hot/page/list",
mytrainingList: baseUrl + "/web-student/pc/trainingProject/pc/page/my/list", //我的培训项目列表
baseUrl: baseUrl,
login: baseUrl + "/system/api/loginApp",
living: baseUrl + "/web-student/api/live/pc/pageList",
livStatuGet: baseUrl + "/web-student/api/live/show/config/status/get",
liveBackList: baseUrl + "/web-student/api/live/review/list", //直播回放列表
liveReviewSwitch:
baseUrl + "/web-student/api/live/review/switch/on/live/list",
message: baseUrl + "/web-student",
messageList: baseUrl + "/newMessage",
menu: baseUrl + "/web-student/api/system/pc/my/item",
info: baseUrl + "/system/api/account/get",
accountSave: baseUrl + "/system/api/account/pc/updateInfo",
myCourse: baseUrl + "/web-student/api/recorde/my/list",
myTraining: baseUrl + "/web-student/api/trainingProject/my/page/list",
survey: baseUrl + "/web-student/api/researchQuestion/list/all",
surveySubmit: baseUrl + "/web-student/api/researchAnswer/submit",
mycollection: baseUrl + "/web-student/",
myCollectionDelete: baseUrl + "/web-student/api/pc/favoritepc/delete",
ossUrl: baseUrl + "/aliyun", //oss上传服务域名
logoImage: baseUrl + "/system",
systemUrl: baseUrl + "/system",
search: baseUrl + "/esearch",
searchCommit: baseUrl + "/web-student",
course: baseUrl + "/web-student",
exam: baseUrl + "/web-student",
homework: baseUrl + "/web-student",
loginUrl: baseUrl + "/system/api",
loginImg: baseUrl + "/web-student/api",
caseUrl: baseUrl + "/web-student",
forum: baseUrl + "/web-student",
my: {
baseUrl: baseUrl,
login: baseUrl + "/system/api/loginApp",
living: baseUrl + "/web-student/api/live/pc/pageList",
livStatuGet: baseUrl + "/web-student/api/live/show/config/status/get",
liveBackList: baseUrl + "/web-student/api/live/review/list",//直播回放列表
liveReviewSwitch: baseUrl + "/web-student/api/live/review/switch/on/live/list",
message: baseUrl + "/web-student",
messageList: baseUrl + "/newMessage",
menu: baseUrl + "/web-student/api/system/pc/my/item",
info: baseUrl + "/system/api/account/get",
accountSave: baseUrl + "/system/api/account/pc/updateInfo",
myCourse: baseUrl + "/web-student/api/recorde/my/list",
myTraining: baseUrl + "/web-student/api/trainingProject/my/page/list",
survey: baseUrl + "/web-student/api/researchQuestion/list/all",
surveySubmit: baseUrl + "/web-student/api/researchAnswer/submit",
mycollection: baseUrl + "/web-student/",
myCollectionDelete: baseUrl + "/web-student/api/pc/favoritepc/delete",
ossUrl: baseUrl + "/aliyun", //oss上传服务域名
logoImage: baseUrl + '/system',
systemUrl: baseUrl + "/system",
search: baseUrl + "/esearch",
searchCommit: baseUrl + "/web-student",
course: baseUrl + "/web-student",
exam: baseUrl + "/web-student",
homework: baseUrl + "/web-student",
loginUrl: baseUrl + "/system/api",
loginImg: baseUrl + '/web-student/api',
caseUrl:baseUrl +"/web-student",
forum:baseUrl + '/web-student',
my: {
baseUrl: baseUrl,
login: baseUrl + "/system/api/loginApp",
living: baseUrl + "/web-student/api/live/pc/pageList",
message: baseUrl + "/web-student",
messageList: baseUrl + "/newMessage",
menu: baseUrl + "/web-student/api/system/pc/my/item",
info: baseUrl + "/system/api/account/get",
accountSave: baseUrl + "/system/api/account/pc/updateInfo",
myCourse: baseUrl + "/web-student/pc/my",
myCourseUrl:baseUrl+"/web-student",
myTraining: baseUrl + "/web-student/pc/my",
myIntegral: baseUrl + "/web-student",
myDuration: baseUrl + "/web-student",
myCertificate: baseUrl + "/web-student",
myCase: baseUrl + "/web-student",
getCaptcha: baseUrl + "/system/api/public/getCaptcha",
myTaskNum: baseUrl + '/web-student/calendar/api/pc/getPageNum',
myTaskList: baseUrl + '/web-student/calendar/api/pc/getPage',
myCalendarTaskNum: baseUrl + '/web-student/calendar/api/calendarTaskNum',
},
news: {
list: baseUrl + "/web-student/api/info/page/pcList",
info: baseUrl + "/web-student/api/info/page/pcView",
},
TrainingItem: baseUrl + "/web-student/pc/trainingProject/pc/one/detail/progress/view",
trainEnjoin: baseUrl + "/web-student/api/enroll/pc/insert",
trainingComment: baseUrl + "/web-student/api/tpComment/pc/list",
trainingResource: baseUrl + "/web-student/student/document/query/ByRelationId",
trainingStutas: baseUrl + "/web-student/student/document/canStudy",
trainingResourceUrl: baseUrl + "/web-student/student/document/download",
checkActivitiew: baseUrl + "/web-student/pc/trainingProject/pc/click/activity",
commitReplay: baseUrl + "/web-student/api/tpCommentReply/pc/reply/Children/save",
commitComment: baseUrl + "/web-student/api/tpComment/pc/save",
commentreplaytoreply: baseUrl + "/web-student/api/tpCommentReply/pc/reply/Children/save",
loadchildren: `${baseUrl}/web-student/api/tpCommentReply/pc/list`,
addLike: `${baseUrl}/web-student/api/tpCommentThumbsUp/pc/save`,
addMethod: baseUrl + "/web-student/api/tpCommentThumbsUp/pc/save",
deleteLike: `${baseUrl}/web-student/api/tpCommentThumbsUp/pc/delete`,
downLineDetail: `${baseUrl}/web-student/pc/trainingProject/offlineCourse/get`,
siteFooter: baseUrl + "/web-student/api/portal/pc/pageFooterItem/get",
getgrant:baseUrl+"/web-student/pc/trainingProject/pc/certificate/grant",
getbanner:baseUrl+"/web-student/api/banner/home/image/list",
addNum:baseUrl+"/web-student/pc/trainingProject/pc/tpPlanActivity/view/record/add",
databaseActivity:baseUrl+"/web-student/student/document/getDetailById",//项目内容活动-资料
languageTypes: baseUrl+"/system/api/internationalizationWord/public/languageType/getList",
getlanguageClass: baseUrl+"/web-student/public/api/siteLanguage/page",//获取语言类
languageChaneg: baseUrl+"/web-student/public/api/siteLanguage/language/get",//语言JSON
selectLanguageSave: baseUrl+"/web-student/student/siteLanguage/record/international/selectLanguage/save",//用户登录后修改语言
selectLanguageGet: baseUrl+"/web-student/student/siteLanguage/record/international/selectLanguage/get",//回显语言类型
canVisit: baseUrl + "/web-student/student/site/student/canVisit",
exchange: baseUrl + "/mall",//积分兑换商城
myCourse: baseUrl + "/web-student/pc/my",
myCourseUrl: baseUrl + "/web-student",
myTraining: baseUrl + "/web-student/pc/my",
myIntegral: baseUrl + "/web-student",
myDuration: baseUrl + "/web-student",
myCertificate: baseUrl + "/web-student",
myCase: baseUrl + "/web-student",
getCaptcha: baseUrl + "/system/api/public/getCaptcha",
myTaskNum: baseUrl + "/web-student/calendar/api/pc/getPageNum",
myTaskList: baseUrl + "/web-student/calendar/api/pc/getPage",
myCalendarTaskNum: baseUrl + "/web-student/calendar/api/calendarTaskNum",
},
news: {
list: baseUrl + "/web-student/api/info/page/pcList",
info: baseUrl + "/web-student/api/info/page/pcView",
},
TrainingItem:
baseUrl + "/web-student/pc/trainingProject/pc/one/detail/progress/view",
trainEnjoin: baseUrl + "/web-student/api/enroll/pc/insert",
trainingComment: baseUrl + "/web-student/api/tpComment/pc/list",
trainingResource:
baseUrl + "/web-student/student/document/query/ByRelationId",
trainingStutas: baseUrl + "/web-student/student/document/canStudy",
trainingResourceUrl: baseUrl + "/web-student/student/document/download",
checkActivitiew:
baseUrl + "/web-student/pc/trainingProject/pc/click/activity",
commitReplay:
baseUrl + "/web-student/api/tpCommentReply/pc/reply/Children/save",
commitComment: baseUrl + "/web-student/api/tpComment/pc/save",
commentreplaytoreply:
baseUrl + "/web-student/api/tpCommentReply/pc/reply/Children/save",
loadchildren: `${baseUrl}/web-student/api/tpCommentReply/pc/list`,
addLike: `${baseUrl}/web-student/api/tpCommentThumbsUp/pc/save`,
addMethod: baseUrl + "/web-student/api/tpCommentThumbsUp/pc/save",
deleteLike: `${baseUrl}/web-student/api/tpCommentThumbsUp/pc/delete`,
downLineDetail: `${baseUrl}/web-student/pc/trainingProject/offlineCourse/get`,
siteFooter: baseUrl + "/web-student/api/portal/pc/pageFooterItem/get",
getgrant: baseUrl + "/web-student/pc/trainingProject/pc/certificate/grant",
getbanner: baseUrl + "/web-student/api/banner/home/image/list",
addNum:
baseUrl +
"/web-student/pc/trainingProject/pc/tpPlanActivity/view/record/add",
databaseActivity: baseUrl + "/web-student/student/document/getDetailById", //项目内容活动-资料
languageTypes:
baseUrl +
"/system/api/internationalizationWord/public/languageType/getList",
getlanguageClass: baseUrl + "/web-student/public/api/siteLanguage/page", //获取语言类
languageChaneg: baseUrl + "/web-student/public/api/siteLanguage/language/get", //语言JSON
selectLanguageSave:
baseUrl +
"/web-student/student/siteLanguage/record/international/selectLanguage/save", //用户登录后修改语言
selectLanguageGet:
baseUrl +
"/web-student/student/siteLanguage/record/international/selectLanguage/get", //回显语言类型
canVisit: baseUrl + "/web-student/student/site/student/canVisit",
exchange: baseUrl + "/mall", //积分兑换商城
};
export default api;
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