Commit 6564f887 authored by 杨思琦's avatar 杨思琦

Merge branch 'master' into 'dev'

# Conflicts: # package.json
parents 9addcd69 cfead008
...@@ -106,17 +106,17 @@ ...@@ -106,17 +106,17 @@
"@babel/polyfill": "7.4.3", "@babel/polyfill": "7.4.3",
"@babel/runtime": "^7.10.5", "@babel/runtime": "^7.10.5",
"@esri/calcite-colors": "6.0.3", "@esri/calcite-colors": "6.0.3",
"@wisdom-cesium/cesium": "1.1.12", "@wisdom-cesium/cesium": "^1.1.12",
"@wisdom-cesium/krpano": "1.0.29-28", "@wisdom-cesium/krpano": "1.0.29-52",
"@wisdom-components/basictable": "^1.5.16", "@wisdom-components/basictable": "^1.5.16",
"@wisdom-components/empty": "^1.4.1", "@wisdom-components/empty": "^1.4.1",
"@wisdom-map/amap": "1.1.0-beta.51", "@wisdom-map/amap": "1.1.0-beta.53",
"@wisdom-map/arcgismap": "1.4.0-151", "@wisdom-map/arcgismap": "1.4.0-151",
"@wisdom-map/basemap": "1.1.0-24", "@wisdom-map/basemap": "1.1.0-24",
"@wisdom-map/util": "^1.0.28-0", "@wisdom-map/util": "^1.0.28-0",
"@wisdom-utils/components": "0.1.288", "@wisdom-utils/components": "0.1.297",
"@wisdom-utils/runtime": "0.0.38", "@wisdom-utils/runtime": "0.0.46",
"@wisdom-utils/utils": "0.1.330", "@wisdom-utils/utils": "0.1.337",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"antd": "4.21.2", "antd": "4.21.2",
"compression": "1.7.4", "compression": "1.7.4",
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
"pinyin-match": "^1.1.1", "pinyin-match": "^1.1.1",
"promise.prototype.finally": "^3.1.2", "promise.prototype.finally": "^3.1.2",
"prop-types": "15.7.2", "prop-types": "15.7.2",
"qiankun": "^2.4.6", "qiankun": "2.7.8",
"qrcode.react": "^1.0.0", "qrcode.react": "^1.0.0",
"rc-cascader": "^2.3.2", "rc-cascader": "^2.3.2",
"rc-queue-anim": "^2.0.0", "rc-queue-anim": "^2.0.0",
......
This diff was suppressed by a .gitattributes entry.
/* eslint-disable global-require */
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { Helmet } from 'react-helmet'; import { Helmet } from 'react-helmet';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Router, Switch } from '@wisdom-utils/runtime'; import { Router, Switch } from '@wisdom-utils/runtime';
import { helpers, event } from '@wisdom-utils/utils'; import { helpers, event } from '@wisdom-utils/utils';
import { AliveScope } from 'react-activation';
import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings'; import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings';
// eslint-disable-next-line import/extensions // eslint-disable-next-line import/extensions
import { dyRoutes } from '../../routes/config'; import { dyRoutes } from '../../routes/config';
const pkg = require('../../../package.json'); const pkg = require('../../../package.json');
const { renderRoutes } = helpers; const { renderRoutes } = helpers;
const config = require('../../../config/config'); const config = require('../../../config/config');
...@@ -36,16 +35,31 @@ const App = props => { ...@@ -36,16 +35,31 @@ const App = props => {
{props?.global?.title && <meta name="description" content={`${props.global.title}`} />} {props?.global?.title && <meta name="description" content={`${props.global.title}`} />}
</Helmet> </Helmet>
<Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}> <Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}>
<Switch> {window?.qiankunIsCache ? (
{renderRoutes( <AliveScope>
'panda-console-base', <Switch>
dyRoutes( {renderRoutes(
props.menu || [], 'panda-console-base',
props.global && props.global.layout, dyRoutes(
(props.global && props.global.theme) || 'dark', props.menu || [],
).routes, props.global && props.global.layout,
)} (props.global && props.global.theme) || 'dark',
</Switch> ).routes,
)}
</Switch>
</AliveScope>
) : (
<Switch>
{renderRoutes(
'panda-console-base',
dyRoutes(
props.menu || [],
props.global && props.global.layout,
(props.global && props.global.theme) || 'dark',
).routes,
)}
</Switch>
)}
</Router> </Router>
</> </>
); );
...@@ -54,6 +68,7 @@ const App = props => { ...@@ -54,6 +68,7 @@ const App = props => {
const mapStateToProps = state => ({ const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']), global: state.getIn(['global', 'globalConfig']),
menu: state.getIn(['global', 'menu']), menu: state.getIn(['global', 'menu']),
products: state.getIn(['global', 'products']),
flatMenu: state.getIn(['global', 'flatMenu']), flatMenu: state.getIn(['global', 'flatMenu']),
}); });
export default connect( export default connect(
......
...@@ -241,7 +241,7 @@ export function logout(data) { ...@@ -241,7 +241,7 @@ export function logout(data) {
window[products[item]].unmount({ store }); window[products[item]].unmount({ store });
}); });
} }
store.set('event:dropCache');
return { return {
type: LOGINOUT, type: LOGINOUT,
data: { data: {
......
...@@ -9,6 +9,11 @@ body, ...@@ -9,6 +9,11 @@ body,
} }
#app { #app {
background: transparent!important; background: transparent!important;
.ka-wrapper,
.ka-content{
width: 100%;
height: 100%;
}
} }
* { * {
margin: 0; margin: 0;
......
// @eslint-disable // @eslint-disable
import React, { Suspense, useEffect, useRef, useState } from 'react'; import React, { Suspense, useEffect, useRef, useState } from 'react';
import { Anchor, Popover, Radio, Spin } from 'antd'; import { Anchor, Modal, Popover, Radio, Spin } from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import _ from 'lodash'; import _ from 'lodash';
...@@ -242,6 +242,13 @@ const transformFloatMenu = (routes, homepage) => { ...@@ -242,6 +242,13 @@ const transformFloatMenu = (routes, homepage) => {
return routes.concat(route); return routes.concat(route);
}; };
const finishInitWeb = homepage => {
event.emit('initweb', false);
typeof homepage === 'string' &&
homepage !== '' &&
window.history.replaceState({ delete: true }, null, `/civbase/${homepage}`);
};
const Layout = props => { const Layout = props => {
const currentProduct = `__global__recent_productIndex__micro_${window.location.hostname}_${params.getParams( const currentProduct = `__global__recent_productIndex__micro_${window.location.hostname}_${params.getParams(
'client', 'client',
...@@ -254,6 +261,7 @@ const Layout = props => { ...@@ -254,6 +261,7 @@ const Layout = props => {
const [siteAction, setSiteAction] = useState(() => new Site(props, setSiteLoading)); const [siteAction, setSiteAction] = useState(() => new Site(props, setSiteLoading));
const [menuLoading, setMenuLoading] = useState(true); const [menuLoading, setMenuLoading] = useState(true);
const [subLoading, setSubLoading] = useState(true); const [subLoading, setSubLoading] = useState(true);
const [initWebContent, setInitWebContent] = useState(false);
// const [settings, setSetting] = useState({}); // const [settings, setSetting] = useState({});
// const [routeConfig, setRouteConfig] = useState(null); // const [routeConfig, setRouteConfig] = useState(null);
// const [matchPath, setMatchPath] = useState(''); // const [matchPath, setMatchPath] = useState('');
...@@ -271,6 +279,9 @@ const Layout = props => { ...@@ -271,6 +279,9 @@ const Layout = props => {
event.on('loading', ret => { event.on('loading', ret => {
setSubLoading(ret); setSubLoading(ret);
}); });
event.on('initweb', ret => {
setInitWebContent(ret);
});
}, []); }, []);
useEffect(() => { useEffect(() => {
...@@ -280,12 +291,13 @@ const Layout = props => { ...@@ -280,12 +291,13 @@ const Layout = props => {
if (!isLogin) { if (!isLogin) {
let client = props?.global?.client || sessionStorage.getItem('client') || null; let client = props?.global?.client || sessionStorage.getItem('client') || null;
client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city'; client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city';
// eslint-disable-next-line no-prototype-builtins
let generateType = props.global && props.global.hasOwnProperty('get') ? props.global.get('generateType') : null; let generateType = props.global && props.global.hasOwnProperty('get') ? props.global.get('generateType') : null;
generateType = generateType =
!_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined' !_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined'
? `&generateType=${generateType}` ? `&generateType=${generateType}`
: ''; : '';
history.replace(`/user/login?client=${client}${generateType}`); history.push(`/user/login?client=${client}${generateType}`, { reload: true });
props.logout(); props.logout();
} }
}, [history, props, props.global, siteAction]); }, [history, props, props.global, siteAction]);
...@@ -477,6 +489,24 @@ const Layout = props => { ...@@ -477,6 +489,24 @@ const Layout = props => {
<div id="micro-container" className="subapp-container"> <div id="micro-container" className="subapp-container">
{props.children} {props.children}
</div> </div>
<Modal
title={<div style={{ textAlign: 'center' }}>温馨提示</div>}
centered
width="333px"
visible={initWebContent}
cancelText="取消"
okText="确定"
onOk={() => {
finishInitWeb(props.global?.homepage ?? '');
}}
onCancel={() => {
finishInitWeb(props.global?.homepage ?? '');
}}
zIndex={2000}
>
缓存仅支持最新功能,若要体验完整版请进行相关功能升级,或点击确认完成初次兼容加载后再次进入功能即可
</Modal>
</BasicLayout> </BasicLayout>
</SecurityLayout> </SecurityLayout>
); );
......
...@@ -6,7 +6,9 @@ import PageLoading from '@wisdom-utils/components/lib/AppLayout/components/PageL ...@@ -6,7 +6,9 @@ import PageLoading from '@wisdom-utils/components/lib/AppLayout/components/PageL
import _ from 'lodash'; import _ from 'lodash';
import { stringify } from 'querystring'; import { stringify } from 'querystring';
import { store, helpers } from '@wisdom-utils/utils'; import { store, helpers } from '@wisdom-utils/utils';
import { ValidDefaultPWDContainer } from '@/components/Container' import { ValidDefaultPWDContainer } from '@/components/Container';
import { initSaveMicroApps } from '../micro';
class SecurityLayout extends React.Component { class SecurityLayout extends React.Component {
state = { state = {
isReady: false, isReady: false,
...@@ -22,66 +24,76 @@ class SecurityLayout extends React.Component { ...@@ -22,66 +24,76 @@ class SecurityLayout extends React.Component {
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
const products = (this.props.global.products || []).map(item => { const products = (this.props.global.products || []).map(item => {
if (item.PackageName === 'civweb4') { if (item.PackageName === 'civweb4') {
return 'web4_console' return 'web4_console';
} }
return `${item.PackageName}-main`; return `${item.PackageName}-main`;
}); });
const location = this.props.location; const { location } = this.props;
const pathname = location.pathname; const { pathname } = location;
const argv = pathname.split('/'); const argv = pathname.split('/');
const nextPathname = nextProps.location.pathname; const nextPathname = nextProps.location.pathname;
const nextArgv = nextPathname.split('/'); const nextArgv = nextPathname.split('/');
if (argv[2] !== nextArgv[2]) { if (argv[2] !== nextArgv[2]) {
Object.keys(products).forEach(item => { Object.keys(products).forEach(item => {
window[products[item]] && window[products[item]] && window[products[item]].unmount && window[products[item]].unmount({ store: store }); window[products[item]] &&
window[products[item]] &&
window[products[item]].unmount &&
window[products[item]].unmount({ store });
}); });
} }
if (this.props.location.pathname !== nextProps.location.pathname) { if (this.props.location.pathname !== nextProps.location.pathname) {
store.set('event:globalConfig', { globalConfig: nextProps.global }); if (window?.qiankunIsCache) {
const marks = document.querySelectorAll('#micro-container');
if (marks && marks.length) {
const activeAppPath = nextProps.location.pathname.match(/(\w+)/)
? nextProps.location.pathname.match(/(\w+)/)[0]
: null;
if (activeAppPath) {
initSaveMicroApps(nextProps.location.pathname, nextProps.global);
}
}
} else {
store.set('event:globalConfig', { globalConfig: nextProps.global });
}
} }
} }
render() { render() {
const { isReady } = this.state; const { isReady } = this.state;
const { children, global, loading } = this.props; const { children, global, loading } = this.props;
const tk = Cookies.get('token') || global.token; const tk = Cookies.get('token') || global.token;
const isLogin = tk !== null && tk !== 'undefined' && tk !== (void 0); const isLogin = tk !== null && tk !== 'undefined' && tk !== void 0;
const { pathname } = history.location;
if (!isLogin && window.location.pathname !== '/civbase/user/login' || (global.hasOwnProperty('size') && global.size === 0)) { if (
const { query = {}, search, pathname } = history.location; (!isLogin && window.location.pathname !== '/civbase/user/login') ||
const { redirect } = query; // eslint-disable-next-line no-prototype-builtins
// const queryString = stringify({ (global.hasOwnProperty('size') && global.size === 0)
// redirect: pathname + search, ) {
// });
this.props.updateCurrentIndex && this.props.updateCurrentIndex(0); this.props.updateCurrentIndex && this.props.updateCurrentIndex(0);
let client = global.client || sessionStorage.getItem('client'); let client = global.client || sessionStorage.getItem('client');
client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city'; client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city';
let { generateType } = global; let { generateType } = global;
generateType = !_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined' ? `&generateType=${generateType}` : ''; generateType =
!_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined'
? `&generateType=${generateType}`
: '';
// eslint-disable-next-line prettier/prettier
window.qiankunStarted = false;
return ( return (
<Redirect <Redirect to={{ pathname: `/user/login?client=${client}${generateType}`, state: { reload: true } }} exact />
to={{pathname: `/user/login?client=${client}${generateType}`, state:{reload: true}}}
/>
); );
}; }
if ((!isLogin && loading) || !isReady) { if ((!isLogin && loading) || !isReady) {
return <PageLoading />; return <PageLoading />;
} }
return ( return <ValidDefaultPWDContainer>{children}</ValidDefaultPWDContainer>;
<ValidDefaultPWDContainer>
{children}
</ValidDefaultPWDContainer>
);
} }
} }
const mapStateToProps = state => ({ const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']), global: state.getIn(['global', 'globalConfig']),
location: state.getIn(['router', 'location']).toJS() location: state.getIn(['router', 'location']).toJS(),
}); });
export default connect( export default connect(
mapStateToProps, mapStateToProps,
......
This diff is collapsed.
import React from 'react'; import React from 'react';
import classnames from 'classnames'; import classnames from 'classnames';
import { chunk } from 'lodash-es'; import { chunk } from 'lodash-es';
import cover from './images/default.png'; import cover from '@/assets/images/cloud/newProducts/default.png';
import styles from './index.less'; import styles from './index.less';
const assetPath = `${window.location.origin}/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles`; const assetPath = `${window.location.origin}/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles`;
...@@ -31,10 +31,15 @@ const Card = ({ onCardClick, ...props }) => { ...@@ -31,10 +31,15 @@ const Card = ({ onCardClick, ...props }) => {
{config && config['系统描述'] ? <div className={styles.back}>{config && config['系统描述']}</div> : null} {config && config['系统描述'] ? <div className={styles.back}>{config && config['系统描述']}</div> : null}
</div> </div>
<div className={classnames(styles['card-info'])}> <div className={classnames(styles['card-info'])}>
<div className={classnames(styles['card-desc'])}> <div
className={classnames(
styles['card-desc'],
styles[`card-desc-${config && config['副标题'] ? config['副标题'].split('\\n')?.length : '0'}`],
)}
>
{config && {config &&
config['副标题'] && config['副标题'] &&
config['副标题'].split('\\n').map((item, index) => <div key={index}>{item}</div>)} config['副标题'].split('\\n').map((item, index) => (index < 2 ? <div key={item}>{item}</div> : null))}
</div> </div>
<div className={classnames(styles['card-tags'])}> <div className={classnames(styles['card-tags'])}>
<div className={classnames(styles['card-list'])}> <div className={classnames(styles['card-list'])}>
...@@ -43,12 +48,10 @@ const Card = ({ onCardClick, ...props }) => { ...@@ -43,12 +48,10 @@ const Card = ({ onCardClick, ...props }) => {
<div key={index} className={classnames(styles['card-list-content'])}> <div key={index} className={classnames(styles['card-list-content'])}>
{item.map(child => ( {item.map(child => (
<div <div
className={classnames(styles['card-tag'])} className={classnames(
style={{ styles['card-tag'],
height: config['系统特点'].split(',').length <= 6 ? 44 : 40, config['系统特点'].split(',').length <= 6 ? '' : styles['card-tag-mini'],
lineHeight: config['系统特点'].split(',').length <= 6 ? '44px' : '40px', )}
marginTop: config['系统特点'].split(',').length <= 8 ? 10 : 0,
}}
key={child} key={child}
> >
<i className={classnames(styles['card-tag-icon'])} /> <i className={classnames(styles['card-tag-icon'])} />
......
...@@ -12,7 +12,7 @@ import { actionCreators } from '@/containers/App/store'; ...@@ -12,7 +12,7 @@ import { actionCreators } from '@/containers/App/store';
import { defaultApp } from '@/micro'; import { defaultApp } from '@/micro';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { encode } from 'js-base64'; import { encode } from 'js-base64';
import icon from './images/退出.png'; import icon from '@/assets/images/cloud/newProducts/退出.png';
import Panel from './Panel'; import Panel from './Panel';
import LoginAction from '../../../user/login/login'; import LoginAction from '../../../user/login/login';
import styles from './index.less'; import styles from './index.less';
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
@font-face { @font-face {
font-family: zihun; font-family: zihun;
src: url('./images/字魂143号-正酷超级黑(1).ttf') src: url('@/assets/images/cloud/newProducts/字魂143号-正酷超级黑(1).ttf')
} }
@font-face { @font-face {
font-family: pingfang; font-family: pingfang;
src: url('./images/PingFang Bold_0.ttf') src: url('@/assets/images/cloud/newProducts/PingFang Bold_0.ttf')
} }
...@@ -25,15 +25,11 @@ ...@@ -25,15 +25,11 @@
background-position: center; background-position: center;
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-image: url('./images/bg.png'); background-image: url('@/assets/images/cloud/newProducts/bg.png');
font-size: 20px; font-size: 20px;
.page { .page {
position: relative; position: relative;
//display: flex;
//flex-direction: column;
//align-items: center;
//justify-content: space-evenly;
height: 100%; height: 100%;
.pageTitle { .pageTitle {
...@@ -45,7 +41,7 @@ ...@@ -45,7 +41,7 @@
line-height: 4rem; line-height: 4rem;
text-shadow: 0 11px 15px rgba(0, 18, 44, 0.48); text-shadow: 0 11px 15px rgba(0, 18, 44, 0.48);
text-align: center; text-align: center;
background-image: url('./images/标题.png'); background-image: url('@/assets/images/cloud/newProducts/标题.png');
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
font-family: "zihun"; font-family: "zihun";
...@@ -56,7 +52,6 @@ ...@@ -56,7 +52,6 @@
top: 6px; top: 6px;
right: 20px; right: 20px;
font-size: .5rem; font-size: .5rem;
font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
...@@ -121,12 +116,12 @@ ...@@ -121,12 +116,12 @@
&.cus-arrow-prev { &.cus-arrow-prev {
left: 2em; left: 2em;
background-image: url('./images/arrow_left.png'); background-image: url('@/assets/images/cloud/newProducts/arrow_left.png');
} }
&.cus-arrow-next { &.cus-arrow-next {
right: 2em; right: 2em;
background-image: url('./images/arrow_right.png'); background-image: url('@/assets/images/cloud/newProducts/arrow_right.png');
} }
} }
} }
...@@ -134,7 +129,6 @@ ...@@ -134,7 +129,6 @@
.panel { .panel {
font-size: 20px; font-size: 20px;
height: 100%; height: 100%;
// padding: 0 200px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
...@@ -168,13 +162,13 @@ ...@@ -168,13 +162,13 @@
cursor: pointer; cursor: pointer;
width: 49%; width: 49%;
height: 24rem; height: 24rem;
background-image: url('./images/框.png'); background-image: url('@/assets/images/cloud/newProducts/框.png');
background-position: center; background-position: center;
.card-title { .card-title {
position: relative; position: relative;
padding: 0 4%;
margin-top: 0.5rem; margin-top: 0.5rem;
left: 4%;
font-size: 1.5rem; font-size: 1.5rem;
font-weight: 400; font-weight: 400;
color: #262626; color: #262626;
...@@ -194,7 +188,6 @@ ...@@ -194,7 +188,6 @@
transition: all 0.5s; transition: all 0.5s;
transition-delay: 0.2s; transition-delay: 0.2s;
font-size: 8px; font-size: 8px;
font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
} }
...@@ -202,31 +195,34 @@ ...@@ -202,31 +195,34 @@
.card-desc{ .card-desc{
padding: 1rem; padding: 1rem;
text-align: center; text-align: center;
//display: flex;
font-size: 1rem; font-size: 1rem;
background-position-x: -.5rem; background-position-x: -.5rem;
//align-items: center;
//justify-content: center;
height: 5rem; height: 5rem;
padding-left: 0.5rem; background-image: url(@/assets/images/cloud/newProducts/副标题.png);
padding-right: 0.5rem;
background-image: url(./images/副标题.png);
font-family: pingfang; font-family: pingfang;
font-weight: bold; font-weight: bold;
color: #FFFFFF; color: #FFFFFF;
background-size: cover; background-size: cover;
} }
.card-desc-2 {
div {
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
white-space: nowrap;
}
}
&:hover { &:hover {
background-image: url('./images/框_active.png'); background-image: url('@/assets/images/cloud/newProducts/框_active.png');
// transform: scale(1.05);
.back { .back {
opacity: 1; opacity: 1;
transform: translateY(0); transform: translateY(0);
} }
.card-desc { .card-desc {
background-image: url(./images/副标题_active.png); background-image: url('@/assets/images/cloud/newProducts/副标题_active.png');
color: #000000; color: #000000;
} }
...@@ -236,7 +232,7 @@ ...@@ -236,7 +232,7 @@
} }
.card-content{ .card-content{
padding: 1rem 1rem 1rem 2.2rem; padding: 1rem 4%;
&::after{ &::after{
...@@ -248,15 +244,17 @@ ...@@ -248,15 +244,17 @@
.card-img { .card-img {
position: relative; position: relative;
float: left; float: left;
width: 65%;
img{ img{
height: 17.9rem; height: 17.9rem;
width: 100%;
} }
} }
.card-info { .card-info {
float: left; float: left;
width: 33%; width: 35%;
} }
.card-tags { .card-tags {
...@@ -282,13 +280,19 @@ ...@@ -282,13 +280,19 @@
.card-tag{ .card-tag{
float: left; float: left;
width: 50%; width: 50%;
height: 35px; height: 44px;
line-height: 35px; margin-top: 10px;
line-height: 44px;
font-size: 0.88rem; font-size: 0.88rem;
font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
&.card-tag-mini {
margin-top: 5px;
height: 40px;
line-height: 40px;
}
.card-tag-icon { .card-tag-icon {
display: inline-block; display: inline-block;
margin-right: .5rem; margin-right: .5rem;
...@@ -326,15 +330,21 @@ ...@@ -326,15 +330,21 @@
} }
} }
.card-title {
font-size: 1.2rem !important;
}
.card { .card {
background-size: 100% 100%; background-size: 100% 100%;
height: 21rem; height: 17.6rem;
} }
.card-content{ .card-content{
.card-img { .card-img {
width: 48% !important;
img{ img{
height: 9rem !important; height: 12.6rem !important;
} }
} }
} }
...@@ -343,6 +353,18 @@ ...@@ -343,6 +353,18 @@
width: 50% !important; width: 50% !important;
} }
.card-tag{
margin-top: 6px !important;
height: 38px !important;
line-height: 38px !important;
&.card-tag-mini {
margin-top: 4px !important;
height: 30px !important;
line-height: 30px !important;
}
}
.panel { .panel {
font-size: 14px; font-size: 14px;
} }
...@@ -367,5 +389,159 @@ ...@@ -367,5 +389,159 @@
.panel { .panel {
font-size: 16px; font-size: 16px;
gap: 1.5em;
width: 44em;
&[num="2"],
&[num="4"] {
width: (44em * 2 + 2em);
}
&[num="3"],
&[num="5"],
&[num="6"] {
width: (44em * 3 + 3em);
}
&[num="1"],
&[num="2"],
&[num="3"] {
margin-bottom: 5em;
}
}
.card {
height: 19rem;
background-size: contain;
.card-title {
padding: 0 8%;
margin-top: 0.5rem;
font-size: 1.4rem;
}
.back {
padding: 1rem;
font-size: 10px !important;
}
.card-desc{
background-position-x: -.8rem;
height: 3.4rem;
padding: 0.5rem;
}
.card-desc-2 {
div {
font-size: 12px !important;
}
}
.card-content{
padding: 1rem 8%;
img{
height: 13.5rem !important;
}
}
}
.card-tag{
height: 40px !important;
line-height: 40px !important;
font-size: .4rem !important;
&.card-tag-mini {
height: 30px !important;
line-height: 30px !important;
}
}
}
@media screen and (min-width: 2000px) {
.newproducts {
p, h1 {
font-size: 28px;
}
.cus-arrow {
&.cus-arrow-prev {
left: 20px;
}
&.cus-arrow-next {
right: 20px;
}
}
}
.panel {
font-size: 24px;
gap: 1.5em;
width: 54em;
&[num="2"],
&[num="4"] {
width: (54em * 2 + 2em);
}
&[num="3"],
&[num="5"],
&[num="6"] {
width: (54em * 3 + 8em);
}
&[num="1"],
&[num="2"],
&[num="3"] {
margin-bottom: 5em;
}
}
.card {
height: 28rem;
width: 45%;
background-size: contain;
.card-title {
padding: 0 13%;
margin-top: 1rem;
font-size: 1.8rem;
}
.back {
padding: 1.2rem;
font-size: 14px !important;
}
.card-desc{
background-position-x: -.8rem;
height: 6rem;
}
.card-desc-2 {
div {
font-size: 18px !important;
}
}
.card-content{
padding: 1rem 13%;
img{
height: 20.7rem !important;
}
}
}
.card-tag{
height: 52px !important;
line-height: 52px !important;
font-size: 1rem !important;
&.card-tag-mini {
height: 46px !important;
line-height: 46px !important;
}
} }
} }
...@@ -60,7 +60,7 @@ const LoginTemplate = { ...@@ -60,7 +60,7 @@ const LoginTemplate = {
export default (props) => { export default (props) => {
const {location} = props.history; const {location} = props.history;
useEffect(() => { useEffect(() => {
if(location.state && location.state.reload) { if(location.state && location.state.reload && !window.qiankunIsCache) {
AppInitState(); AppInitState();
} }
}, []); }, []);
......
...@@ -4,7 +4,6 @@ import { message } from 'antd'; ...@@ -4,7 +4,6 @@ import { message } from 'antd';
import { decode, encode } from 'js-base64'; import { decode, encode } from 'js-base64';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import sha1 from 'sha1'; import sha1 from 'sha1';
import { SlideVerify } from '@wisdom-utils/components'; import { SlideVerify } from '@wisdom-utils/components';
import { appService, noticeService } from '@/api'; import { appService, noticeService } from '@/api';
import { getUserInfo, getWebSiteConfig } from '@/api/service/base'; import { getUserInfo, getWebSiteConfig } from '@/api/service/base';
...@@ -368,20 +367,16 @@ class Login { ...@@ -368,20 +367,16 @@ class Login {
const homeType = config.productType || 'civweb4'; const homeType = config.productType || 'civweb4';
// 产品类型和首页路径同时有才行 // 产品类型和首页路径同时有才行
// eslint-disable-next-line prettier/prettier // eslint-disable-next-line prettier/prettier
const homepage = params.getParams('homepage') const homepage = params.getParams('homepage') ? params.getParams('homepage') : homeType && config.homepage ? `${homeType}/${params.getParams('homepage') || config.homepage}` : '';
? params.getParams('homepage') window.qiankunIsCache = config.isCache || false;
: homeType && config.homepage
? `${homeType}/${params.getParams('homepage') || config.homepage}`
: '';
self.globalConfig = Object.assign(self.globalConfig, config, { self.globalConfig = Object.assign(self.globalConfig, config, {
theme: self.globalConfig.theme, theme: self.globalConfig.theme,
menu: self.globalConfig.menu, menu: self.globalConfig.menu,
style: self.globalConfig.style, style: self.globalConfig.style,
homepage: homepage || '', homepage: homepage || '',
products: self.globalConfig.products,
// mapsettings: config.mapsettings // mapsettings: config.mapsettings
}); });
self.updateConfig && self.updateConfig(self.globalConfig); self.updateConfig && self.updateConfig(self.globalConfig);
self.getProjectItems().then(res => { self.getProjectItems().then(res => {
window.subSysCfg = {}; window.subSysCfg = {};
...@@ -458,17 +453,31 @@ class Login { ...@@ -458,17 +453,31 @@ class Login {
self.updateConfig && self.updateConfig(self.globalConfig); self.updateConfig && self.updateConfig(self.globalConfig);
} }
if (self.globalConfig.widgets.length === 0) {
message.error({
duration: 3,
content: '当前账号未配置菜单',
});
self.events.emit('loginError', '当前账号未配置菜单');
self.handleLoginError();
return;
}
window.share.event = self.events; window.share.event = self.events;
self.callback && self.callback(); self.callback && self.callback();
// console.log("===loginSuccess===")
getIndustry ? self.events.emit('toggleIndustry') : self.events.emit('loginSuccess', self.history); getIndustry ? self.events.emit('toggleIndustry') : self.events.emit('loginSuccess', self.history);
}); });
} else { } else {
// loginSuccess // loginSuccess
self.updateConfig && self.updateConfig(self.globalConfig); self.updateConfig && self.updateConfig(self.globalConfig);
// console.log("===loginSuccess===") if (self.globalConfig.widgets.length === 0) {
message.error({
duration: 3,
content: '当前账号未配置菜单',
});
self.events.emit('loginError', '当前账号未配置菜单');
self.handleLoginError();
return;
}
getIndustry ? self.events.emit('toggleIndustry') : self.events.emit('loginSuccess', self.history); getIndustry ? self.events.emit('toggleIndustry') : self.events.emit('loginSuccess', self.history);
window.share.event = self.events; window.share.event = self.events;
self.callback && self.callback(); self.callback && self.callback();
......
...@@ -16,8 +16,10 @@ import LoginAction from '../../login'; ...@@ -16,8 +16,10 @@ 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' let big = '广州大.png'
let bigNew='' let bigNew = ''
let hasOnline = true
let slogan = ''
class HuaNongLogin extends Component { class HuaNongLogin extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -36,17 +38,23 @@ class HuaNongLogin extends Component { ...@@ -36,17 +38,23 @@ class HuaNongLogin extends Component {
}; };
this.fromRef = React.createRef(); this.fromRef = React.createRef();
this.sliVerify = React.createRef(); this.sliVerify = React.createRef();
props.loginParams.map(v=>{ props.loginParams.map(v => {
let item= v.split('=') let item = v.split('=')
if(item.length>0){ if (item.length > 0) {
if(item[0]=='big'){ if (item[0] == 'big') {
big=item[1] big = item[1]
} }
if(item[0]=='bigNew'){ if (item[0] == 'bigNew') {
bigNew=item[1] bigNew = item[1]
} }
if (item[0] == 'slogan') {
slogan = item[1]
}
if (item[0] == 'hasOnline') {
hasOnline = item[1] == "true"
}
} }
}) })
} }
handleSubmit = values => { handleSubmit = values => {
const { action, type, autoLogin } = this.state; const { action, type, autoLogin } = this.state;
...@@ -54,33 +62,37 @@ class HuaNongLogin extends Component { ...@@ -54,33 +62,37 @@ class HuaNongLogin extends Component {
(type === 'Account' (type === 'Account'
? action.loginHandler(values.userName, values.password, null, autoLogin, this.sliVerify) ? action.loginHandler(values.userName, values.password, null, autoLogin, this.sliVerify)
: type === 'Mobile' : type === 'Mobile'
? action.phoneLoginFormHandler(values.mobile, values.captcha) ? action.phoneLoginFormHandler(values.mobile, values.captcha)
: null); : null);
this.setSubmitting(true); this.setSubmitting(true);
this.props.updateCurrentIndex(-1); this.props.updateCurrentIndex(-1);
//没取到0id 要给定时器 //没取到0id 要给定时器
if( window.gzTime){ if (window.gzTime) {
clearInterval( 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 => { onActinoChange = action => {
...@@ -168,7 +180,7 @@ class HuaNongLogin extends Component { ...@@ -168,7 +180,7 @@ class HuaNongLogin extends Component {
clearTime() { clearTime() {
this.timeTimer && clearInterval(this.timeTimer); this.timeTimer && clearInterval(this.timeTimer);
} }
getNowDate () { getNowDate() {
var date = new Date(); var date = new Date();
var sign2 = ":"; var sign2 = ":";
var year = date.getFullYear() // 年 var year = date.getFullYear() // 年
...@@ -197,7 +209,7 @@ getNowDate () { ...@@ -197,7 +209,7 @@ getNowDate () {
} }
return year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds; return year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds;
} }
_createGuid() { _createGuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx" return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
.replace(/[xy]/g, function (c) { .replace(/[xy]/g, function (c) {
let r = (Math.random() * 16) | 0, let r = (Math.random() * 16) | 0,
...@@ -207,18 +219,20 @@ _createGuid() { ...@@ -207,18 +219,20 @@ _createGuid() {
.toUpperCase(); .toUpperCase();
} }
componentDidMount() { 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.onActinoChange(this.state.action);
this.getCurrentTime(this.showTime); this.getCurrentTime(this.showTime);
/* request(urlUtils.getUrl( /* request(urlUtils.getUrl(
"/PandaEnergy/GZshuiwuju" "/PandaEnergy/GZshuiwuju"
) + '/GuangZhou/InOnLine', { ) + '/GuangZhou/InOnLine', {
query: { query: {
UserID: _config.userInfo.OID, UserID: _config.userInfo.OID,
SatrtDate: SatrtDate, SatrtDate: SatrtDate,
Port: location.port, Port: location.port,
Oid, Oid,
} }
}) */ }) */
...@@ -230,13 +244,13 @@ _createGuid() { ...@@ -230,13 +244,13 @@ _createGuid() {
return ( return (
<HelmetProvider> <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.head}>
<div className={styles.title}> <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 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="" /> */} {/* <img src={require('@/assets/images/login/能源-定额/华农logo.png')} alt="" /> */}
<span>{this.props.global.title || this.state.title}</span> <span>{this.props.global.title || this.state.title}</span>
</div> </div>
<div className={styles.time_and_date}> <div className={styles.time_and_date}>
<div className={styles.time}>{this.state.time}</div> <div className={styles.time}>{this.state.time}</div>
<div className={styles.date}> <div className={styles.date}>
...@@ -248,7 +262,7 @@ _createGuid() { ...@@ -248,7 +262,7 @@ _createGuid() {
<div className={styles.wrap_content}> <div className={styles.wrap_content}>
<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} style={{ background: `url( ${!slogan ? require("@/assets/images/login/节水/建桥宣传语.png") : this.props.global.transformDevAssetsBaseURL(slogan)}) center no-repeat` }} />
</div> </div>
<div className={styles.login}>{this.renderPlatform()}</div> <div className={styles.login}>{this.renderPlatform()}</div>
</div> </div>
......
const pkg = require('../package.json'); const pkg = require('../package.json');
window.arcgisAssetsPath = `${ window.location.origin}/${pkg.name.toLocaleLowerCase()}`; window.arcgisAssetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}`;
\ No newline at end of file
...@@ -167,7 +167,6 @@ export const AppInitState = () => { ...@@ -167,7 +167,6 @@ export const AppInitState = () => {
window[products[item]].unmount && window[products[item]].unmount &&
window[products[item]].unmount({ store }); window[products[item]].unmount({ store });
}); });
initMicroApps();
} }
// eslint-disable-next-line no-new // eslint-disable-next-line no-new
// 增加免登判定 // 增加免登判定
...@@ -189,11 +188,11 @@ export const AppInitState = () => { ...@@ -189,11 +188,11 @@ export const AppInitState = () => {
logout: () => store.dispatch(actionCreators.logout()), logout: () => store.dispatch(actionCreators.logout()),
}, },
() => { () => {
(async () => { // (async () => {
(await (getToken() && window.globalConfig && window.globalConfig.token)) && // (await (getToken() && window.globalConfig && window.globalConfig.token)) &&
// eslint-disable-next-line no-use-before-define // // eslint-disable-next-line no-use-before-define
initMicroApps(loader, store); // initMicroApps(loader, store);
})(); // })();
}, },
true, true,
); );
......
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