Commit d247759f authored by 喻天's avatar 喻天

fix: 节水主题一 修改

parent 54422316
Pipeline #71483 failed with stages
......@@ -16,8 +16,10 @@ import LoginAction from '../../login';
import styles from './index.less';
import { defaultApp } from '@/micro';
import { log } from 'kit_utils';
let big='广州大.png'
let bigNew=''
let big = '广州大.png'
let bigNew = ''
let hasOnline = true
let slogan = '建桥宣传语.png'
class HuaNongLogin extends Component {
constructor(props) {
super(props);
......@@ -36,17 +38,23 @@ class HuaNongLogin extends Component {
};
this.fromRef = React.createRef();
this.sliVerify = React.createRef();
props.loginParams.map(v=>{
let item= v.split('=')
if(item.length>0){
if(item[0]=='big'){
big=item[1]
}
if(item[0]=='bigNew'){
bigNew=item[1]
}
props.loginParams.map(v => {
let item = v.split('=')
if (item.length > 0) {
if (item[0] == 'big') {
big = item[1]
}
if (item[0] == 'bigNew') {
bigNew = item[1]
}
if (item[0] == 'slogan') {
slogan = item[1]
}
if (item[0] == 'hasOnline') {
hasOnline = item[1] == "true"
}
}
})
})
}
handleSubmit = values => {
const { action, type, autoLogin } = this.state;
......@@ -54,33 +62,37 @@ class HuaNongLogin extends Component {
(type === 'Account'
? action.loginHandler(values.userName, values.password, null, autoLogin, this.sliVerify)
: type === 'Mobile'
? action.phoneLoginFormHandler(values.mobile, values.captcha)
: null);
? action.phoneLoginFormHandler(values.mobile, values.captcha)
: null);
this.setSubmitting(true);
this.props.updateCurrentIndex(-1);
//没取到0id 要给定时器
if( window.gzTime){
clearInterval( window.gzTime)
if (window.gzTime) {
clearInterval(window.gzTime)
}
if (hasOnline) {
setTimeout(() => {
appService
.getInOnLine({
UserID: globalConfig.userInfo.oid || globalConfig.userInfo.OID,
SatrtDate: this.getNowDate(),
Port: location.port,
Oid: this._createGuid(),
})
}, 10000)
window.gzTime = setInterval(() => {
appService
.getInOnLine({
UserID: globalConfig.userInfo.oid || globalConfig.userInfo.OID,
SatrtDate: this.getNowDate(),
Port: location.port,
Oid: this._createGuid(),
})
}, 180000)
}
setTimeout(()=>{
appService
. getInOnLine({
UserID: globalConfig.userInfo.oid||globalConfig.userInfo.OID,
SatrtDate: this.getNowDate(),
Port: location.port,
Oid:this._createGuid(),
})
},10000)
window.gzTime= setInterval(()=>{
appService
. getInOnLine({
UserID: globalConfig.userInfo.oid||globalConfig.userInfo.OID,
SatrtDate: this.getNowDate(),
Port: location.port,
Oid:this._createGuid(),
})
},180000)
};
onActinoChange = action => {
......@@ -168,7 +180,7 @@ class HuaNongLogin extends Component {
clearTime() {
this.timeTimer && clearInterval(this.timeTimer);
}
getNowDate () {
getNowDate() {
var date = new Date();
var sign2 = ":";
var year = date.getFullYear() // 年
......@@ -197,7 +209,7 @@ getNowDate () {
}
return year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
}
_createGuid() {
_createGuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
.replace(/[xy]/g, function (c) {
let r = (Math.random() * 16) | 0,
......@@ -207,18 +219,20 @@ _createGuid() {
.toUpperCase();
}
componentDidMount() {
console.log(this.props, this.props.global.logo, this.props.global.transformDevAssetsBaseURL('assets/images/广州/背景.png'));
console.log(this);
this.onActinoChange(this.state.action);
this.getCurrentTime(this.showTime);
/* request(urlUtils.getUrl(
"/PandaEnergy/GZshuiwuju"
) + '/GuangZhou/InOnLine', {
query: {
UserID: _config.userInfo.OID,
SatrtDate: SatrtDate,
Port: location.port,
Oid,
}
}) */
/* request(urlUtils.getUrl(
"/PandaEnergy/GZshuiwuju"
) + '/GuangZhou/InOnLine', {
query: {
UserID: _config.userInfo.OID,
SatrtDate: SatrtDate,
Port: location.port,
Oid,
}
}) */
......@@ -230,13 +244,13 @@ _createGuid() {
return (
<HelmetProvider>
<div className={styles.quota} style={{'background': `url(${bigNew?this.props.global.transformDevAssetsBaseURL(bigNew):require("@/assets/images/login/节水/"+big)}) no-repeat`}}>
<div className={styles.quota} style={{ 'background': `url(${bigNew ? this.props.global.transformDevAssetsBaseURL(bigNew) : require("@/assets/images/login/节水/" + big)}) no-repeat` }}>
<div className={styles.head}>
<div className={styles.title}>
<img className={styles.imgs} src={this.props.global && this.props.global.transformDevAssetsBaseURL && this.props.global.transformDevAssetsBaseURL(this.props.global.logo)} alt="" />
{/* <img src={require('@/assets/images/login/能源-定额/华农logo.png')} alt="" /> */}
<span>{this.props.global.title || this.state.title}</span>
</div>
<div className={styles.title}>
<img className={styles.imgs} src={this.props.global && this.props.global.transformDevAssetsBaseURL && this.props.global.transformDevAssetsBaseURL(this.props.global.logo)} alt="" />
{/* <img src={require('@/assets/images/login/能源-定额/华农logo.png')} alt="" /> */}
<span>{this.props.global.title || this.state.title}</span>
</div>
<div className={styles.time_and_date}>
<div className={styles.time}>{this.state.time}</div>
<div className={styles.date}>
......@@ -248,7 +262,7 @@ _createGuid() {
<div className={styles.wrap_content}>
<div className={styles.from}>
<div className={styles.slogan}>
<div className={styles.slogan_back} />
<div className={styles.slogan_back} style={{ background: `url(${this.props.global.transformDevAssetsBaseURL(slogan)}) center no-repeat` }} />
</div>
<div className={styles.login}>{this.renderPlatform()}</div>
</div>
......
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