Commit 21c6004d authored by 程恺文's avatar 程恺文

feat:支持路径传图片

parent 6c0a598a
Pipeline #60153 waiting for manual action with stages
......@@ -17,6 +17,7 @@ import styles from './index.less';
import { defaultApp } from '@/micro';
import { log } from 'kit_utils';
let big='广州大.png'
let bigNew=''
class HuaNongLogin extends Component {
constructor(props) {
super(props);
......@@ -41,6 +42,9 @@ class HuaNongLogin extends Component {
if(item[0]=='big'){
big=item[1]
}
if(item[0]=='bigNew'){
bigNew=item[1]
}
}
})
}
......@@ -203,7 +207,7 @@ _createGuid() {
.toUpperCase();
}
componentDidMount() {
console.log(this.props,this.props.global.logo);
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);
......@@ -228,7 +232,7 @@ _createGuid() {
return (
<HelmetProvider>
<div className={styles.quota} style={{'background': `url(${require("@/assets/images/login/节水/"+big)})`}}>
<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 src={this.props.global && this.props.global.transformDevAssetsBaseURL && this.props.global.transformDevAssetsBaseURL(this.props.global.logo)} alt="" />
......
......@@ -17,6 +17,8 @@
height: 100%;
// background: url('@/assets/images/login/节水/广州大.png') no-repeat;
background-size: cover;
background-size:100% 100%;
background-attachment:fixed;
.head {
position: absolute;
top: 0;
......
......@@ -17,6 +17,7 @@ import styles from './index.less';
import { defaultApp } from '@/micro';
import { log } from 'kit_utils';
let smallBg='建桥图片.jpg'
let smallBgNew=''
class HuaNongLogin extends Component {
constructor(props) {
super(props);
......@@ -42,6 +43,9 @@ class HuaNongLogin extends Component {
if(item[0]=='smallBg'){
smallBg=item[1]
}
if(item[0]=='smallBgNew'){
smallBgNew=item[1]
}
}
})
......@@ -229,7 +233,7 @@ _createGuid() {
</div>
<div className={styles.wrap_content}>
< div>
<img className={styles.from_img} src={require(`@/assets/images/login/节水/${smallBg}`)} alt="" />
<img className={styles.from_img} src={smallBgNew?this.props.global.transformDevAssetsBaseURL(smallBgNew): require(`@/assets/images/login/节水/${smallBg}`) } alt="" />
<div className={styles.from}>
<div className={styles.slogan}>
<div className={styles.slogan_back} />
......
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