Commit 661996ca authored by 程恺文's avatar 程恺文

feat: 优化

parent 5ed15f09
Pipeline #59303 passed with stages
/* eslint-disable */ /* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin; // const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
// const proxyURL = 'https://work.panda-water.cn'; // const proxyURL = 'https://work.panda-water.cn';
const proxyURL = 'http://192.168.12.3:8082'; const proxyURL = 'http://192.168.10.179:8095';
// const proxyURL = 'https://panda-water.cn' // const proxyURL = 'https://panda-water.cn'
module.exports = { module.exports = {
......
This diff was suppressed by a .gitattributes entry.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com * @Author: 634665781 634665781@qq.com
* @Date: 2022-07-08 14:28:01 * @Date: 2022-07-08 14:28:01
* @LastEditors: 634665781 634665781@qq.com * @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2022-08-18 11:45:07 * @LastEditTime: 2022-09-05 17:38:26
* @FilePath: \CivWeb\src\pages\user\login\index.js * @FilePath: \CivWeb\src\pages\user\login\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -25,14 +25,15 @@ const LoginTemplate = { ...@@ -25,14 +25,15 @@ const LoginTemplate = {
'新春 - 智联.html': NewYear, '新春 - 智联.html': NewYear,
'Dark - IOTMultiLogin.html': BaseLogin, 'Dark - IOTMultiLogin.html': BaseLogin,
'Dark.html': BaseLogin, 'Dark.html': BaseLogin,
'DarkCloud.html': window.location.origin.replace(/^(http|https):\/\//, '') === 'panda-water.cn' ? CloudLogin : BaseLogin, 'DarkCloud.html':
window.location.origin.replace(/^(http|https):\/\//, '') === 'panda-water.cn' ? CloudLogin : BaseLogin,
'信息化.html': InfoLogin, '信息化.html': InfoLogin,
'项目 - 榆林.html': Yulin, '项目 - 榆林.html': Yulin,
'能源-定额平台.html': EnergyQuota, '能源-定额平台.html': EnergyQuota,
'节水主题一.html':EnergGz, '节水主题一.html': EnergGz,
'Water.html': WaterLogin, 'Water.html': WaterLogin,
'项目 - 江水置换.html': JSZHLogin, '项目 - 江水置换.html': JSZHLogin,
'节水主题二.html':EnergJS2, '节水主题二.html': EnergJS2,
'项目 - 澄迈.html': ChengmaiLogin, '项目 - 澄迈.html': ChengmaiLogin,
'项目 - 呼和浩特.html': HuhehaoteLogin, '项目 - 呼和浩特.html': HuhehaoteLogin,
default: BaseLogin, default: BaseLogin,
...@@ -46,8 +47,15 @@ export default (props) => { ...@@ -46,8 +47,15 @@ export default (props) => {
} }
}, []); }, []);
if(Object.keys(window.globalConfig || {}).length === 0) return null; if(Object.keys(window.globalConfig || {}).length === 0) return null;
const template = window.globalConfig && window.globalConfig.loginTemplate; let template = window.globalConfig && window.globalConfig.loginTemplate;
let arr =template.split('|')
let loginParams=[]
if(arr.length>1){
template=arr[0]
loginParams =arr[1].split('&')
}
const RenderComponent = LoginTemplate[template] ? LoginTemplate[template]: LoginTemplate['default']; const RenderComponent = LoginTemplate[template] ? LoginTemplate[template]: LoginTemplate['default'];
return <RenderComponent {...props}/> return <RenderComponent {...props} loginParams={loginParams}/>
}; };
...@@ -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 smallBg='建桥图片.png'
class HuaNongLogin extends Component { class HuaNongLogin extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
time: '16:00', time: '16:00',
week: '星期一', week: '星期一',
...@@ -33,6 +35,15 @@ class HuaNongLogin extends Component { ...@@ -33,6 +35,15 @@ 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]=='smallBg'){
smallBg=item[1]
}
}
})
} }
handleSubmit = values => { handleSubmit = values => {
const { action, type, autoLogin } = this.state; const { action, type, autoLogin } = this.state;
...@@ -215,7 +226,7 @@ _createGuid() { ...@@ -215,7 +226,7 @@ _createGuid() {
</div> </div>
<div className={styles.wrap_content}> <div className={styles.wrap_content}>
< div> < div>
<img className={styles.from_img} src={require('@/assets/images/login/节水/建桥图片.jpg')} alt="" /> <img className={styles.from_img} src={require(`@/assets/images/login/节水/${smallBg}`)} alt="" />
<div className={styles.from}> <div className={styles.from}>
<div className={styles.slogan}> <div className={styles.slogan}>
<div className={styles.slogan_back} /> <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