Commit a531419c authored by 周宏民's avatar 周宏民

fix:修改扫码登录

parent 5dde7052
Pipeline #89850 passed with stages
......@@ -25,8 +25,7 @@ export const WECOM_APPID = 'wxec56ca668e7f9155'; // 企业微信APPID
export const AGENTID_CLOUD = '1000102'; // 云平台 agentid
export const AGENTID_CRM = '1000083'; // CRM agentid
export const WX_REDIRECT_URI = 'https://panda-water.com/civbase/user/login';
export const WX_REDIRECT_URI = `${window.location?.host}/civbase/user/login`;
export const SERVICE_INTERFACE_SUCCESS_CODE = 0;
......
......@@ -924,7 +924,7 @@ class Login {
if (response && response.getMe && response.getMe.length) {
const tk = response.getMe[0].Token;
self.globalConfig.token = tk;
Cookies.set('token', tk);
// Cookies.set('token', tk);
let url = window.location.href; // 获取当前页面的url
if (url.indexOf('&code') !== -1) {
// 判断是否存在参数
......
......@@ -43,6 +43,12 @@ const Login = forwardRef((props, _ref) => {
let { ddCode } = props.global;
const loginMode = Cookies.get('loginMode') || null;
if (loginMode && loginMode === 'iotWechat') ddCode = null;
if (type === LOGIN_DISPLAY.WeCom) {
Cookies.set('loginMode', isRQcodeFunc(type) ? LOGIN_WAY[LOGIN_DISPLAY.Account] : LOGIN_WAY[LOGIN_DISPLAY.WeCom], {
expires: 5 * 60 * 1000,
path: '/',
});
}
const handleSubmit = values => {
/* eslint-disable */
action &&
......
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