Commit f807a1d3 authored by 尚顺利's avatar 尚顺利

style文件

parent 1e08111f
......@@ -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,
......
......@@ -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(
......
......@@ -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
},()=>{
if(item=='dingding'){
let action=new LoginAction(this.props,false,true)
if(item=='dingding'){
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)=>{
......
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