Commit a6be700e authored by 程恺文's avatar 程恺文

feat:节水主题一支持传参背景图

parent 5844f0fc
Pipeline #60095 passed with stages
...@@ -16,9 +16,11 @@ import LoginAction from '../../login'; ...@@ -16,9 +16,11 @@ import LoginAction from '../../login';
import styles from './index.less'; import styles from './index.less';
import { defaultApp } from '@/micro'; import { defaultApp } from '@/micro';
import { log } from 'kit_utils'; import { log } from 'kit_utils';
let big='广州大.png'
class HuaNongLogin extends Component { class HuaNongLogin extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
console.log(props);
this.state = { this.state = {
time: '16:00', time: '16:00',
week: '星期一', week: '星期一',
...@@ -33,6 +35,14 @@ class HuaNongLogin extends Component { ...@@ -33,6 +35,14 @@ class HuaNongLogin extends Component {
}; };
this.fromRef = React.createRef(); this.fromRef = React.createRef();
this.sliVerify = 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]
}
}
})
} }
handleSubmit = values => { handleSubmit = values => {
const { action, type, autoLogin } = this.state; const { action, type, autoLogin } = this.state;
...@@ -193,7 +203,7 @@ _createGuid() { ...@@ -193,7 +203,7 @@ _createGuid() {
.toUpperCase(); .toUpperCase();
} }
componentDidMount() { componentDidMount() {
console.log(this.props); console.log(this.props,this.props.global.logo);
console.log(this); console.log(this);
this.onActinoChange(this.state.action); this.onActinoChange(this.state.action);
this.getCurrentTime(this.showTime); this.getCurrentTime(this.showTime);
...@@ -215,9 +225,10 @@ _createGuid() { ...@@ -215,9 +225,10 @@ _createGuid() {
this.clearTime(); this.clearTime();
} }
render() { render() {
return ( return (
<HelmetProvider> <HelmetProvider>
<div className={styles.quota}> <div className={styles.quota} style={{'background': `url(${require("@/assets/images/login/节水/"+big)})`}}>
<div className={styles.head}> <div className={styles.head}>
<div className={styles.title}> <div className={styles.title}>
<img src={this.props.global && this.props.global.transformDevAssetsBaseURL && this.props.global.transformDevAssetsBaseURL(this.props.global.logo)} alt="" /> <img src={this.props.global && this.props.global.transformDevAssetsBaseURL && this.props.global.transformDevAssetsBaseURL(this.props.global.logo)} alt="" />
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url('@/assets/images/login/节水/广州大.png') no-repeat; // background: url('@/assets/images/login/节水/广州大.png') no-repeat;
background-size: cover; background-size: cover;
.head { .head {
position: absolute; position: absolute;
......
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