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
f807a1d3
Commit
f807a1d3
authored
3 years ago
by
尚顺利
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style文件
parent
1e08111f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
16 deletions
+51
-16
base.js
src/api/service/base.js
+6
-1
login.js
src/pages/user/login/login.js
+41
-1
infoLogin.js
src/pages/user/login/template/infoLogin.js
+4
-14
infoLogin.less
src/pages/user/login/template/style/infoLogin.less
+0
-0
No files found.
src/api/service/base.js
View file @
f807a1d3
...
...
@@ -35,6 +35,7 @@ export const API = {
AVATAR_FILE_URL
:
'/cityinterface/rest/services/filedownload.svc/download'
,
GET_SENSOR_TYPE
:
'/PandaCore/GCK/Sensor/GetSensorType'
,
// 获取传感器类型
GET_SYSTEM_CONFIGURATION
:
'/PandaCore/OMS/SysConfiguration'
,
// 获取系统配置
GET_INFO_QYWX
:
'/CityInterface/rest/services/OA.svc/WeChatScanQRCode'
,
};
const
services
=
{
...
...
@@ -81,7 +82,11 @@ const services = {
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
getInfo
:
{
url
:
API
.
GET_INFO_QYWX
,
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
writeLogs
:
{
url
:
API
.
GET_LOGS
,
method
:
constants
.
REQUEST_METHOD_POST
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/login.js
View file @
f807a1d3
...
...
@@ -48,7 +48,7 @@ class Login {
self
.
getToweb
(
token
);
// eslint-disable-next-line no-empty
}
else
if
(
ddCode
)
{
self
.
ddLoginIn
(
ddCode
)
self
.
ddLoginIn
(
ddCode
)
;
}
else
if
(
!!
loginName
&&
!!
password
)
{
self
.
otherLoginIn
(
loginName
,
password
);
}
else
if
(
...
...
@@ -390,6 +390,46 @@ class Login {
}
return
s
;
}
// 企业微信登录
loginByWx
()
{
window
.
WwLogin
({
id
:
'wxlogin_container'
,
appid
:
'wxec56ca668e7f9155'
,
agentid
:
'1000083'
,
redirect_uri
:
encodeURIComponent
(
'https://mis.panda-water.cn'
),
href
:
'https://mis.panda-water.cn/web4/styles/wx.css'
,
});
}
qywxLoginIn
(
code
)
{
// eslint-disable-next-line no-undef
Http
.
getInfo
({
query
:
{
code
,
},
cacheBust
:
true
,
}).
then
(
response
=>
{
if
(
response
&&
response
.
data
&&
response
.
data
.
getMe
)
{
const
tk
=
response
.
data
.
getMe
[
0
].
Token
;
this
.
globalConfig
.
token
=
tk
;
let
url
=
window
.
location
.
href
;
// 获取当前页面的url
if
(
url
.
indexOf
(
'&code'
)
!==
-
1
)
{
// 判断是否存在参数
// eslint-disable-next-line no-useless-escape
url
=
url
.
replace
(
/
(\&
code|#
)[^
'"
]
*/
,
''
);
// 去除参数
window
.
history
.
pushState
({},
0
,
url
);
}
this
.
isSignIn
=
true
;
this
.
getUserInfoAndConfig
();
}
else
{
this
.
handleLoginError
();
// msgUtils.fault("登录失败,请检查用户名或密码");
// msgUtils.fault("登录失败," + error.message);
this
.
hasTry
=
true
;
// 已经输错过密码
}
});
}
loginByDD
()
{
const
gotoUrl
=
`https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoakne99srqra6hldv2&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=
${
encodeURIComponent
(
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/template/infoLogin.js
View file @
f807a1d3
...
...
@@ -2,12 +2,12 @@
/*
* @Author: shangshunli;
* @Date: 2021-08-02 09:39:46;
* @LastEditTime: 2021-08-
19 14:36:03
* @LastEditTime: 2021-08-
23 10:31:31
* @LastEditors: shangshunli
* @Description:信息化登录页;
*/
import
React
from
'react'
;
import
styles
from
'./infoLogin.less'
import
styles
from
'./
style/
infoLogin.less'
import
{
connect
}
from
'react-redux'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
Logo
from
'@/assets/oa/login/信息化logo.png'
...
...
@@ -47,24 +47,14 @@ changeQrCode=(item)=>{
this
.
setState
({
ddOrWeixin
:
item
},()
=>
{
let
action
=
new
LoginAction
(
this
.
props
,
false
,
true
)
if
(
item
==
'dingding'
){
let
action
=
new
LoginAction
(
this
.
props
,
false
,
true
)
action
.
loginByDD
()
}
else
if
(
item
==
'weixin'
){
this
.
loginByWeiXin
()
action
.
loginByWx
()
}
})
}
// 企业微信登录
loginByWeiXin
=
()
=>
{
window
.
WwLogin
({
"id"
:
"wxlogin_container"
,
"appid"
:
"wxec56ca668e7f9155"
,
"agentid"
:
"1000083"
,
"redirect_uri"
:
encodeURIComponent
(
'http://172.16.30.77:8085'
),
"href"
:
"https://mis.panda-water.cn/web4/styles/wx.css"
})
}
// 查看密码
seePassWord
=
(
e
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/template/infoLogin.less
→
src/pages/user/login/template/
style/
infoLogin.less
View file @
f807a1d3
File moved
This diff is collapsed.
Click to expand it.
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