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

Merge branch 'master' into 'dev'

# Conflicts: # package.json
parents 9addcd69 cfead008
......@@ -106,17 +106,17 @@
"@babel/polyfill": "7.4.3",
"@babel/runtime": "^7.10.5",
"@esri/calcite-colors": "6.0.3",
"@wisdom-cesium/cesium": "1.1.12",
"@wisdom-cesium/krpano": "1.0.29-28",
"@wisdom-cesium/cesium": "^1.1.12",
"@wisdom-cesium/krpano": "1.0.29-52",
"@wisdom-components/basictable": "^1.5.16",
"@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/basemap": "1.1.0-24",
"@wisdom-map/util": "^1.0.28-0",
"@wisdom-utils/components": "0.1.288",
"@wisdom-utils/runtime": "0.0.38",
"@wisdom-utils/utils": "0.1.330",
"@wisdom-utils/components": "0.1.297",
"@wisdom-utils/runtime": "0.0.46",
"@wisdom-utils/utils": "0.1.337",
"animate.css": "^4.1.1",
"antd": "4.21.2",
"compression": "1.7.4",
......@@ -140,7 +140,7 @@
"pinyin-match": "^1.1.1",
"promise.prototype.finally": "^3.1.2",
"prop-types": "15.7.2",
"qiankun": "^2.4.6",
"qiankun": "2.7.8",
"qrcode.react": "^1.0.0",
"rc-cascader": "^2.3.2",
"rc-queue-anim": "^2.0.0",
......
This diff was suppressed by a .gitattributes entry.
/* eslint-disable global-require */
import React, { useEffect } from 'react';
import { Helmet } from 'react-helmet';
import { connect } from 'react-redux';
import { Router, Switch } from '@wisdom-utils/runtime';
import { helpers, event } from '@wisdom-utils/utils';
import { AliveScope } from 'react-activation';
import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings';
// eslint-disable-next-line import/extensions
import { dyRoutes } from '../../routes/config';
const pkg = require('../../../package.json');
const { renderRoutes } = helpers;
const config = require('../../../config/config');
......@@ -36,16 +35,31 @@ const App = props => {
{props?.global?.title && <meta name="description" content={`${props.global.title}`} />}
</Helmet>
<Router basename={config.base || pkg.name.toLocaleLowerCase() || ''}>
<Switch>
{renderRoutes(
'panda-console-base',
dyRoutes(
props.menu || [],
props.global && props.global.layout,
(props.global && props.global.theme) || 'dark',
).routes,
)}
</Switch>
{window?.qiankunIsCache ? (
<AliveScope>
<Switch>
{renderRoutes(
'panda-console-base',
dyRoutes(
props.menu || [],
props.global && props.global.layout,
(props.global && props.global.theme) || 'dark',
).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>
</>
);
......@@ -54,6 +68,7 @@ const App = props => {
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
menu: state.getIn(['global', 'menu']),
products: state.getIn(['global', 'products']),
flatMenu: state.getIn(['global', 'flatMenu']),
});
export default connect(
......
......@@ -241,7 +241,7 @@ export function logout(data) {
window[products[item]].unmount({ store });
});
}
store.set('event:dropCache');
return {
type: LOGINOUT,
data: {
......
......@@ -9,6 +9,11 @@ body,
}
#app {
background: transparent!important;
.ka-wrapper,
.ka-content{
width: 100%;
height: 100%;
}
}
* {
margin: 0;
......
// @eslint-disable
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 Cookies from 'js-cookie';
import _ from 'lodash';
......@@ -242,6 +242,13 @@ const transformFloatMenu = (routes, homepage) => {
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 currentProduct = `__global__recent_productIndex__micro_${window.location.hostname}_${params.getParams(
'client',
......@@ -254,6 +261,7 @@ const Layout = props => {
const [siteAction, setSiteAction] = useState(() => new Site(props, setSiteLoading));
const [menuLoading, setMenuLoading] = useState(true);
const [subLoading, setSubLoading] = useState(true);
const [initWebContent, setInitWebContent] = useState(false);
// const [settings, setSetting] = useState({});
// const [routeConfig, setRouteConfig] = useState(null);
// const [matchPath, setMatchPath] = useState('');
......@@ -271,6 +279,9 @@ const Layout = props => {
event.on('loading', ret => {
setSubLoading(ret);
});
event.on('initweb', ret => {
setInitWebContent(ret);
});
}, []);
useEffect(() => {
......@@ -280,12 +291,13 @@ const Layout = props => {
if (!isLogin) {
let client = props?.global?.client || sessionStorage.getItem('client') || null;
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;
generateType =
!_.isNull(generateType) && !_.isUndefined(generateType) && generateType !== 'undefined'
? `&generateType=${generateType}`
: '';
history.replace(`/user/login?client=${client}${generateType}`);
history.push(`/user/login?client=${client}${generateType}`, { reload: true });
props.logout();
}
}, [history, props, props.global, siteAction]);
......@@ -477,6 +489,24 @@ const Layout = props => {
<div id="micro-container" className="subapp-container">
{props.children}
</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>
</SecurityLayout>
);
......
......@@ -6,7 +6,9 @@ import PageLoading from '@wisdom-utils/components/lib/AppLayout/components/PageL
import _ from 'lodash';
import { stringify } from 'querystring';
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 {
state = {
isReady: false,
......@@ -22,66 +24,76 @@ class SecurityLayout extends React.Component {
componentWillReceiveProps(nextProps) {
const products = (this.props.global.products || []).map(item => {
if (item.PackageName === 'civweb4') {
return 'web4_console'
return 'web4_console';
}
return `${item.PackageName}-main`;
});
const location = this.props.location;
const pathname = location.pathname;
const { location } = this.props;
const { pathname } = location;
const argv = pathname.split('/');
const nextPathname = nextProps.location.pathname;
const nextArgv = nextPathname.split('/');
if (argv[2] !== nextArgv[2]) {
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) {
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() {
const { isReady } = this.state;
const { children, global, loading } = this.props;
const tk = Cookies.get('token') || global.token;
const isLogin = tk !== null && tk !== 'undefined' && tk !== (void 0);
if (!isLogin && window.location.pathname !== '/civbase/user/login' || (global.hasOwnProperty('size') && global.size === 0)) {
const { query = {}, search, pathname } = history.location;
const { redirect } = query;
// const queryString = stringify({
// redirect: pathname + search,
// });
const isLogin = tk !== null && tk !== 'undefined' && tk !== void 0;
const { pathname } = history.location;
if (
(!isLogin && window.location.pathname !== '/civbase/user/login') ||
// eslint-disable-next-line no-prototype-builtins
(global.hasOwnProperty('size') && global.size === 0)
) {
this.props.updateCurrentIndex && this.props.updateCurrentIndex(0);
let client = global.client || sessionStorage.getItem('client');
client = client !== 'undefined' && !_.isNull(client) && !_.isUndefined(client) ? client : 'city';
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 (
<Redirect
to={{pathname: `/user/login?client=${client}${generateType}`, state:{reload: true}}}
/>
<Redirect to={{ pathname: `/user/login?client=${client}${generateType}`, state: { reload: true } }} exact />
);
};
}
if ((!isLogin && loading) || !isReady) {
return <PageLoading />;
}
return (
<ValidDefaultPWDContainer>
{children}
</ValidDefaultPWDContainer>
);
return <ValidDefaultPWDContainer>{children}</ValidDefaultPWDContainer>;
}
}
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
location: state.getIn(['router', 'location']).toJS()
location: state.getIn(['router', 'location']).toJS(),
});
export default connect(
mapStateToProps,
......
This diff is collapsed.
import React from 'react';
import classnames from 'classnames';
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';
const assetPath = `${window.location.origin}/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles`;
......@@ -31,10 +31,15 @@ const Card = ({ onCardClick, ...props }) => {
{config && config['系统描述'] ? <div className={styles.back}>{config && config['系统描述']}</div> : null}
</div>
<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['副标题'].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 className={classnames(styles['card-tags'])}>
<div className={classnames(styles['card-list'])}>
......@@ -43,12 +48,10 @@ const Card = ({ onCardClick, ...props }) => {
<div key={index} className={classnames(styles['card-list-content'])}>
{item.map(child => (
<div
className={classnames(styles['card-tag'])}
style={{
height: config['系统特点'].split(',').length <= 6 ? 44 : 40,
lineHeight: config['系统特点'].split(',').length <= 6 ? '44px' : '40px',
marginTop: config['系统特点'].split(',').length <= 8 ? 10 : 0,
}}
className={classnames(
styles['card-tag'],
config['系统特点'].split(',').length <= 6 ? '' : styles['card-tag-mini'],
)}
key={child}
>
<i className={classnames(styles['card-tag-icon'])} />
......
......@@ -12,7 +12,7 @@ import { actionCreators } from '@/containers/App/store';
import { defaultApp } from '@/micro';
import Cookies from 'js-cookie';
import { encode } from 'js-base64';
import icon from './images/退出.png';
import icon from '@/assets/images/cloud/newProducts/退出.png';
import Panel from './Panel';
import LoginAction from '../../../user/login/login';
import styles from './index.less';
......
......@@ -2,11 +2,11 @@
@font-face {
font-family: zihun;
src: url('./images/字魂143号-正酷超级黑(1).ttf')
src: url('@/assets/images/cloud/newProducts/字魂143号-正酷超级黑(1).ttf')
}
@font-face {
font-family: pingfang;
src: url('./images/PingFang Bold_0.ttf')
src: url('@/assets/images/cloud/newProducts/PingFang Bold_0.ttf')
}
......@@ -25,15 +25,11 @@
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-image: url('./images/bg.png');
background-image: url('@/assets/images/cloud/newProducts/bg.png');
font-size: 20px;
.page {
position: relative;
//display: flex;
//flex-direction: column;
//align-items: center;
//justify-content: space-evenly;
height: 100%;
.pageTitle {
......@@ -45,7 +41,7 @@
line-height: 4rem;
text-shadow: 0 11px 15px rgba(0, 18, 44, 0.48);
text-align: center;
background-image: url('./images/标题.png');
background-image: url('@/assets/images/cloud/newProducts/标题.png');
background-size: 100% 100%;
background-repeat: no-repeat;
font-family: "zihun";
......@@ -56,7 +52,6 @@
top: 6px;
right: 20px;
font-size: .5rem;
font-family: Microsoft YaHei;
font-weight: 400;
color: #FFFFFF;
......@@ -121,12 +116,12 @@
&.cus-arrow-prev {
left: 2em;
background-image: url('./images/arrow_left.png');
background-image: url('@/assets/images/cloud/newProducts/arrow_left.png');
}
&.cus-arrow-next {
right: 2em;
background-image: url('./images/arrow_right.png');
background-image: url('@/assets/images/cloud/newProducts/arrow_right.png');
}
}
}
......@@ -134,7 +129,6 @@
.panel {
font-size: 20px;
height: 100%;
// padding: 0 200px;
display: flex;
align-items: center;
justify-content: flex-start;
......@@ -168,13 +162,13 @@
cursor: pointer;
width: 49%;
height: 24rem;
background-image: url('./images/框.png');
background-image: url('@/assets/images/cloud/newProducts/框.png');
background-position: center;
.card-title {
position: relative;
padding: 0 4%;
margin-top: 0.5rem;
left: 4%;
font-size: 1.5rem;
font-weight: 400;
color: #262626;
......@@ -194,7 +188,6 @@
transition: all 0.5s;
transition-delay: 0.2s;
font-size: 8px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #000000;
}
......@@ -202,31 +195,34 @@
.card-desc{
padding: 1rem;
text-align: center;
//display: flex;
font-size: 1rem;
background-position-x: -.5rem;
//align-items: center;
//justify-content: center;
height: 5rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
background-image: url(./images/副标题.png);
background-image: url(@/assets/images/cloud/newProducts/副标题.png);
font-family: pingfang;
font-weight: bold;
color: #FFFFFF;
background-size: cover;
}
.card-desc-2 {
div {
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
white-space: nowrap;
}
}
&:hover {
background-image: url('./images/框_active.png');
// transform: scale(1.05);
background-image: url('@/assets/images/cloud/newProducts/框_active.png');
.back {
opacity: 1;
transform: translateY(0);
}
.card-desc {
background-image: url(./images/副标题_active.png);
background-image: url('@/assets/images/cloud/newProducts/副标题_active.png');
color: #000000;
}
......@@ -236,7 +232,7 @@
}
.card-content{
padding: 1rem 1rem 1rem 2.2rem;
padding: 1rem 4%;
&::after{
......@@ -248,15 +244,17 @@
.card-img {
position: relative;
float: left;
width: 65%;
img{
height: 17.9rem;
width: 100%;
}
}
.card-info {
float: left;
width: 33%;
width: 35%;
}
.card-tags {
......@@ -282,13 +280,19 @@
.card-tag{
float: left;
width: 50%;
height: 35px;
line-height: 35px;
height: 44px;
margin-top: 10px;
line-height: 44px;
font-size: 0.88rem;
font-family: Microsoft YaHei;
font-weight: 400;
color: #FFFFFF;
&.card-tag-mini {
margin-top: 5px;
height: 40px;
line-height: 40px;
}
.card-tag-icon {
display: inline-block;
margin-right: .5rem;
......@@ -326,15 +330,21 @@
}
}
.card-title {
font-size: 1.2rem !important;
}
.card {
background-size: 100% 100%;
height: 21rem;
height: 17.6rem;
}
.card-content{
.card-img {
width: 48% !important;
img{
height: 9rem !important;
height: 12.6rem !important;
}
}
}
......@@ -343,6 +353,18 @@
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 {
font-size: 14px;
}
......@@ -367,5 +389,159 @@
.panel {
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 = {
export default (props) => {
const {location} = props.history;
useEffect(() => {
if(location.state && location.state.reload) {
if(location.state && location.state.reload && !window.qiankunIsCache) {
AppInitState();
}
}, []);
......
......@@ -4,7 +4,6 @@ import { message } from 'antd';
import { decode, encode } from 'js-base64';
import Cookies from 'js-cookie';
import sha1 from 'sha1';
import { SlideVerify } from '@wisdom-utils/components';
import { appService, noticeService } from '@/api';
import { getUserInfo, getWebSiteConfig } from '@/api/service/base';
......@@ -368,20 +367,16 @@ class Login {
const homeType = config.productType || 'civweb4';
// 产品类型和首页路径同时有才行
// eslint-disable-next-line prettier/prettier
const homepage = params.getParams('homepage')
? params.getParams('homepage')
: homeType && config.homepage
? `${homeType}/${params.getParams('homepage') || config.homepage}`
: '';
const homepage = params.getParams('homepage') ? params.getParams('homepage') : homeType && config.homepage ? `${homeType}/${params.getParams('homepage') || config.homepage}` : '';
window.qiankunIsCache = config.isCache || false;
self.globalConfig = Object.assign(self.globalConfig, config, {
theme: self.globalConfig.theme,
menu: self.globalConfig.menu,
style: self.globalConfig.style,
homepage: homepage || '',
products: self.globalConfig.products,
// mapsettings: config.mapsettings
});
self.updateConfig && self.updateConfig(self.globalConfig);
self.getProjectItems().then(res => {
window.subSysCfg = {};
......@@ -458,17 +453,31 @@ class Login {
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;
self.callback && self.callback();
// console.log("===loginSuccess===")
getIndustry ? self.events.emit('toggleIndustry') : self.events.emit('loginSuccess', self.history);
});
} else {
// loginSuccess
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);
window.share.event = self.events;
self.callback && self.callback();
......
......@@ -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 = ''
class HuaNongLogin extends Component {
constructor(props) {
super(props);
......@@ -36,17 +38,23 @@ 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]
}
if(item[0]=='bigNew'){
bigNew=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] == 'slogan') {
slogan = item[1]
}
if (item[0] == 'hasOnline') {
hasOnline = item[1] == "true"
}
}
})
})
}
handleSubmit = values => {
const { action, type, autoLogin } = this.state;
......@@ -54,33 +62,37 @@ class HuaNongLogin extends Component {
(type === 'Account'
? action.loginHandler(values.userName, values.password, null, autoLogin, this.sliVerify)
: type === 'Mobile'
? action.phoneLoginFormHandler(values.mobile, values.captcha)
: null);
? action.phoneLoginFormHandler(values.mobile, values.captcha)
: null);
this.setSubmitting(true);
this.props.updateCurrentIndex(-1);
//没取到0id 要给定时器
if( window.gzTime){
clearInterval( window.gzTime)
if (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 => {
......@@ -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,18 +219,20 @@ _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(
"/PandaEnergy/GZshuiwuju"
) + '/GuangZhou/InOnLine', {
query: {
UserID: _config.userInfo.OID,
SatrtDate: SatrtDate,
Port: location.port,
Oid,
}
}) */
/* request(urlUtils.getUrl(
"/PandaEnergy/GZshuiwuju"
) + '/GuangZhou/InOnLine', {
query: {
UserID: _config.userInfo.OID,
SatrtDate: SatrtDate,
Port: location.port,
Oid,
}
}) */
......@@ -230,13 +244,13 @@ _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="" />
{/* <img src={require('@/assets/images/login/能源-定额/华农logo.png')} alt="" /> */}
<span>{this.props.global.title || this.state.title}</span>
</div>
<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 src={require('@/assets/images/login/能源-定额/华农logo.png')} alt="" /> */}
<span>{this.props.global.title || this.state.title}</span>
</div>
<div className={styles.time_and_date}>
<div className={styles.time}>{this.state.time}</div>
<div className={styles.date}>
......@@ -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( ${!slogan ? require("@/assets/images/login/节水/建桥宣传语.png") : this.props.global.transformDevAssetsBaseURL(slogan)}) center no-repeat` }} />
</div>
<div className={styles.login}>{this.renderPlatform()}</div>
</div>
......
const pkg = require('../package.json');
window.arcgisAssetsPath = `${ window.location.origin}/${pkg.name.toLocaleLowerCase()}`;
\ No newline at end of file
window.arcgisAssetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}`;
......@@ -167,7 +167,6 @@ export const AppInitState = () => {
window[products[item]].unmount &&
window[products[item]].unmount({ store });
});
initMicroApps();
}
// eslint-disable-next-line no-new
// 增加免登判定
......@@ -189,11 +188,11 @@ export const AppInitState = () => {
logout: () => store.dispatch(actionCreators.logout()),
},
() => {
(async () => {
(await (getToken() && window.globalConfig && window.globalConfig.token)) &&
// eslint-disable-next-line no-use-before-define
initMicroApps(loader, store);
})();
// (async () => {
// (await (getToken() && window.globalConfig && window.globalConfig.token)) &&
// // eslint-disable-next-line no-use-before-define
// initMicroApps(loader, store);
// })();
},
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