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,14 +38,20 @@ 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]
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] == 'bigNew') {
bigNew = item[1]
}
if (item[0] == 'slogan') {
slogan = item[1]
}
if (item[0] == 'hasOnline') {
hasOnline = item[1] == "true"
}
}
})
......@@ -60,27 +68,31 @@ class HuaNongLogin extends Component {
this.setSubmitting(true);
this.props.updateCurrentIndex(-1);
//没取到0id 要给定时器
if( window.gzTime){
clearInterval( window.gzTime)
if (window.gzTime) {
clearInterval(window.gzTime)
}
setTimeout(()=>{
if (hasOnline) {
setTimeout(() => {
appService
. getInOnLine({
UserID: globalConfig.userInfo.oid||globalConfig.userInfo.OID,
.getInOnLine({
UserID: globalConfig.userInfo.oid || globalConfig.userInfo.OID,
SatrtDate: this.getNowDate(),
Port: location.port,
Oid:this._createGuid(),
Oid: this._createGuid(),
})
},10000)
window.gzTime= setInterval(()=>{
}, 10000)
window.gzTime = setInterval(() => {
appService
. getInOnLine({
UserID: globalConfig.userInfo.oid||globalConfig.userInfo.OID,
.getInOnLine({
UserID: globalConfig.userInfo.oid || globalConfig.userInfo.OID,
SatrtDate: this.getNowDate(),
Port: location.port,
Oid:this._createGuid(),
Oid: this._createGuid(),
})
},180000)
}, 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,6 +219,8 @@ _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(
......@@ -230,7 +244,7 @@ _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="" />
......@@ -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