Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
1d1f62dc
Commit
1d1f62dc
authored
Mar 24, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改新产品跳转可按site
parent
81b90a4e
Pipeline
#86366
passed with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
31 deletions
+41
-31
index.js
src/pages/bootpage/demonstration/components/Right/index.js
+1
-1
index.js
src/pages/bootpage/demonstration/index.js
+7
-3
login.js
src/pages/user/login/login.js
+33
-27
No files found.
src/pages/bootpage/demonstration/components/Right/index.js
View file @
1d1f62dc
...
...
@@ -9,7 +9,7 @@ import classNames from 'classnames';
import
DataCarousel
from
'../DataCarousel'
;
import
styles
from
'./index.less'
;
const
RightItem
=
props
=>
{
const
{
listData
,
handToPage
,
handToProduct
}
=
props
;
const
{
listData
,
handToPage
,
hand
lePage
,
hand
ToProduct
}
=
props
;
const
toPage
=
row
=>
{
if
(
row
.
site
)
{
handToProduct
(
row
);
...
...
src/pages/bootpage/demonstration/index.js
View file @
1d1f62dc
...
...
@@ -114,10 +114,9 @@ const Demonstration = props => {
loginAction
&&
loginAction
.
getUserInfoAndConfig
(
failCallback
,
true
,
type
);
};
const
updateConfig
=
(
config
,
data
)
=>
{
// props.instance && props.instance.updateConfig(config);
props
.
updateConfig
&&
props
.
updateConfig
(
config
);
const
newLoginAction
=
new
LoginAction
({
...
props
,
global
:
config
});
newLoginAction
&&
newLoginAction
.
getUserInfoAndConfig
(
failCallback
,
true
,
data
.
industry
);
newLoginAction
&&
newLoginAction
.
getUserInfoAndConfig
(
failCallback
,
true
,
data
.
industry
,
data
.
site
);
};
// 新产品跳转
...
...
@@ -452,7 +451,12 @@ const Demonstration = props => {
<
VideoItem
ref
=
{
videoRef
}
selectKey
=
{
selectKey
}
setSelectKey
=
{
setSelectKey
}
/
>
<
/div
>
<
div
className
=
{
styles
.
row_r
}
>
<
RightItem
listData
=
{
productData
}
handToPage
=
{
handToPage
}
handToProduct
=
{
handToProduct
}
/
>
<
RightItem
listData
=
{
productData
}
handlePage
=
{
handlePage
}
handToPage
=
{
handToPage
}
handToProduct
=
{
handToProduct
}
/
>
<
/div
>
<
/div
>
<
div
className
=
{
classNames
(
styles
.
center_wrap
,
'animate__fadeIn'
,
'animate__animated'
,
'duration-500ms'
)}
>
...
...
src/pages/user/login/login.js
View file @
1d1f62dc
/* eslint-disable no-underscore-dangle */
import
'kit_logger'
;
import
{
log
,
params
}
from
'@wisdom-utils/utils/lib/helpers'
;
import
{
log
,
params
,
encipher
}
from
'@wisdom-utils/utils/lib/helpers'
;
import
{
message
}
from
'antd'
;
import
{
decode
,
encode
}
from
'js-base64'
;
import
Cookies
from
'js-cookie'
;
import
{
encipher
}
from
'@wisdom-utils/utils/lib/helpers'
;
import
{
SlideVerify
}
from
'@wisdom-utils/components'
;
import
{
appService
,
noticeService
}
from
'@/api'
;
import
{
getUserInfo
,
getWebSiteConfig
}
from
'@/api/service/base'
;
...
...
@@ -31,10 +30,14 @@ class Login {
this
.
globalConfig
=
getGlobalConfig
();
};
//单点登录_xule_20231214
let
queryString
=
window
.
location
.
search
.
substring
(
1
);
let
params
=
queryString
.
split
(
"&"
);
let
paramsFind
=
params
&&
params
.
find
(
function
(
a
)
{
return
a
.
split
(
'='
)[
0
]
==
'uniwater_utoken'
});
// 单点登录_xule_20231214
const
queryString
=
window
.
location
.
search
.
substring
(
1
);
const
params
=
queryString
.
split
(
'&'
);
const
paramsFind
=
params
&&
params
.
find
(
function
(
a
)
{
return
a
.
split
(
'='
)[
0
]
==
'uniwater_utoken'
;
});
this
.
uniwater_utoken
=
paramsFind
?.
split
(
'='
)[
1
]
??
''
;
if
(
this
.
uniwater_utoken
)
{
...
...
@@ -52,9 +55,9 @@ class Login {
}
}
//单点登录接口_xule_20231214
//
单点登录接口_xule_20231214
getTokenForThird
()
{
le
t
self
=
this
;
cons
t
self
=
this
;
appService
.
HDAuthLogin
({
token
:
self
.
uniwater_utoken
,
...
...
@@ -64,7 +67,7 @@ class Login {
if
(
res
.
success
===
'OK'
)
{
const
tk
=
res
.
token
;
self
.
globalConfig
.
token
=
tk
;
le
t
param
=
{
cons
t
param
=
{
subOID
:
'subOID'
,
site
:
this
.
getLocalSiteBytoken
(
tk
),
ignoreSite
:
true
,
...
...
@@ -119,7 +122,7 @@ class Login {
Logger
.
log
(
'获取用户配置失败'
);
});
}
})
})
;
}
gzlogin
(
userPhone
)
{
...
...
@@ -254,7 +257,7 @@ class Login {
this
.
globalConfig
.
token
=
token
;
const
self
=
this
;
// eslint-disable-next-line no-undef
le
t
param
=
{
cons
t
param
=
{
subOID
:
'subOID'
,
site
:
noTokenSite
??
this
.
getLocalSiteBytoken
(
token
),
'request.preventCache'
:
Date
.
now
(),
...
...
@@ -309,7 +312,7 @@ class Login {
?
this
.
globalConfig
.
userInfo
.
fullName
:
''
,
})
.
catch
(
error
=>
{
});
.
catch
(
error
=>
{});
}
if
(
window
.
location
.
host
===
'panda-water.com'
)
{
...
...
@@ -323,7 +326,7 @@ class Login {
?
this
.
globalConfig
.
userInfo
.
fullName
:
''
,
})
.
catch
(
error
=>
{
});
.
catch
(
error
=>
{});
}
}
...
...
@@ -431,7 +434,7 @@ class Login {
// eslint-disable-next-line no-undef
// 获取网站配置的同时,预先获取到mqtt配置,注册进子应用
// 兼容云平台子站不更新的情况
le
t
param
=
{
cons
t
param
=
{
client
:
self
.
globalConfig
.
client
,
'request.preventCache'
:
Date
.
now
(),
};
...
...
@@ -440,10 +443,7 @@ class Login {
}
else
{
param
.
identity
=
token
;
}
Promise
.
allSettled
([
noticeService
.
getMqttSiteCode
({
'request.preventCache'
:
Date
.
now
()
}),
getWebSiteConfig
(
param
),
])
Promise
.
allSettled
([
noticeService
.
getMqttSiteCode
({
'request.preventCache'
:
Date
.
now
()
}),
getWebSiteConfig
(
param
)])
.
then
(
results
=>
{
const
promise
=
results
[
0
];
const
site
=
results
[
1
];
...
...
@@ -495,7 +495,8 @@ class Login {
mqttConfig
.
mqtt_mess
.
TcpPort
=
DEFAULT_TCP_PORT
;
mqttConfig
.
mqtt_IsSSL
=
`
${
mqttConfig
.
mqtt_mess
.
TcpIP
}
:
${
mqttConfig
.
mqtt_mess
.
TcpPort
}
`
;
}
mqttConfig
.
mqtt_iotIP
=
`
${
mqttConfig
.
mqtt_mess
.
TcpIP
}
:
${
mqttConfig
.
mqtt_mess
.
TcpPort
?
mqttConfig
.
mqtt_mess
.
TcpPort
:
'443'
mqttConfig
.
mqtt_iotIP
=
`
${
mqttConfig
.
mqtt_mess
.
TcpIP
}
:
${
mqttConfig
.
mqtt_mess
.
TcpPort
?
mqttConfig
.
mqtt_mess
.
TcpPort
:
'443'
}
`
;
self
.
globalConfig
=
Object
.
assign
(
self
.
globalConfig
,
{
...
mqttConfig
,
...
...
@@ -566,7 +567,7 @@ class Login {
self.updateConfig && self.updateConfig(self.globalConfig);
}
self.getProjectItems().then(
(res)
=> {
self.getProjectItems().then(
res
=> {
window.subSysCfg = {};
self.globalConfig = Object.assign(self.globalConfig, {
mapsettings: res,
...
...
@@ -755,7 +756,7 @@ class Login {
});
}
}
this
.
globalConfig
.
mapsettings
.
initareasettings
=
{
...
this
.
globalConfig
.
mapsettings
.
areasettings
}
this
.
globalConfig
.
mapsettings
.
initareasettings
=
{
...
this
.
globalConfig
.
mapsettings
.
areasettings
};
if
(
layer
.
areaName
)
{
this
.
globalConfig
.
mapsettings
.
areasettings
.
areaName
=
layer
.
areaName
;
}
...
...
@@ -887,7 +888,7 @@ class Login {
height
:
'400'
,
});
const
handleMessage
=
function
(
event
)
{
const
handleMessage
=
function
(
event
)
{
const
{
origin
}
=
event
;
// Logger.log('origin', event.origin);
if
(
origin
===
'https://login.dingtalk.com'
)
{
...
...
@@ -1005,7 +1006,7 @@ class Login {
const
tk
=
response
.
token
;
self
.
globalConfig
.
token
=
tk
;
// eslint-disable-next-line no-undef,no-debugger
le
t
param
=
{
cons
t
param
=
{
subOID
:
'subOID'
,
site
:
this
.
getLocalSiteBytoken
(
tk
),
ignoreSite
:
true
,
...
...
@@ -1080,20 +1081,25 @@ class Login {
});
}
getUserInfoAndConfig
(
failCallback
,
flag
,
industry
)
{
getUserInfoAndConfig
(
failCallback
,
flag
,
industry
,
toSite
)
{
const
{
token
:
tk
}
=
this
.
globalConfig
;
const
token
=
tk
||
Cookies
.
get
(
'token'
);
const
site
=
Cookies
.
get
(
'site'
);
const
self
=
this
;
/* eslint-disable */
let
_industrySite
=
null
;
if
(
industry
)
{
cons
t
userInfo
=
le
t
userInfo
=
self
.
globalConfig
.
userInfo
&&
self
.
globalConfig
.
userInfo
.
Groups
&&
self
.
globalConfig
.
userInfo
.
Groups
instanceof
Array
?
self
.
globalConfig
.
userInfo
.
Groups
.
find
(
enter
=>
enter
.
industry
===
industry
)
?
self
.
globalConfig
.
userInfo
.
Groups
.
find
(
enter
=>
{
if
(
toSite
){
return
enter
.
site
===
toSite
}
else
{
return
enter
.
industry
===
industry
}
})
:
null
;
if
(
industry
===
'熊猫新产品'
&&
site
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment