Commit 807785dd by zhangleyuan

feat:解决合并代码后的冲突

parents 8a8d5d07 e89731f4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zhangleyuan * @Author: zhangleyuan
* @Date: 2021-01-05 10:55:02 * @Date: 2021-01-05 10:55:02
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-05 11:02:06 * @LastEditTime: 2021-01-18 21:18:52
* @Description: 描述一下 * @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
const APP_ID_MAP = { const APP_ID_MAP = {
dev: 'wx3ea60e78ddfa277e', dev: 'wx3ea60e78ddfa277e',
rc:'wx5c5a1fb71ecab7bc', rc:'wx5c5a1fb71ecab7bc',
gray:'wxe9f022ccb4d24a51', gray:'wx3dda02036493ada6',
prod:'wx5098ed9a6e115469' prod:'wx3dda02036493ada6'
} }
// 调试环境,默认dev // 调试环境,默认dev
const ENV = 'dev'; const ENV = 'prod';
export const AppId = APP_ID_MAP[ENV]; export const AppId = APP_ID_MAP[ENV];
/* /*
* @Author: 陈剑宇 * @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01 * @Date: 2020-05-07 14:43:01
* @LastEditTime: 2020-11-09 09:52:03 * @LastEditTime: 2021-01-21 11:29:39
* @LastEditors: 吴文洁 * @LastEditors: zhangleyuan
* @Description: * @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts * @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
*/ */
import { MapInterface } from '@/domains/basic-domain/interface' import { MapInterface } from '@/domains/basic-domain/interface'
// 默认是 dev 环境 // 默认是 dev 环境
const ENV: string = process.env.DEPLOY_ENV || 'dev'; const ENV: string = process.env.DEPLOY_ENV || 'prod';
const BASIC_HOST_MAP: MapInterface = { const BASIC_HOST_MAP: MapInterface = {
dev: 'https://dev-heimdall.xiaomai5.com/', dev: 'https://dev-heimdall.xiaomai5.com/',
dev1: 'https://dev1-heimdall.xiaomai5.com/', dev1: 'https://dev1-heimdall.xiaomai5.com/',
rc: 'https://rc-heimdall.xiaomai5.com/', rc: 'https://rc-heimdall.xiaomai5.com/',
gray: 'https://gray-heimdall.xiaomai5.com/', gray: 'https://gray-heimdall.xiaomai5.com/',
prod: 'https://gateway-heimdall.xiaomai5.com/' prod: 'https://heimdall.xiaomai5.com/'
}; };
// axios headers config // axios headers config
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-10-27 18:53:43 * @Date: 2020-10-27 18:53:43
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-05 14:17:13 * @LastEditTime: 2021-01-14 10:45:21
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-04-27 20:35:34 * @Date: 2020-04-27 20:35:34
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-05 17:37:20 * @LastEditTime: 2021-04-06 11:23:12
* @Description: * @Description:
*/ */
......
...@@ -15,6 +15,9 @@ class Authorize extends React.Component { ...@@ -15,6 +15,9 @@ class Authorize extends React.Component {
} }
} }
componentDidMount() { componentDidMount() {
// console.log("ticket",window.getParameterByName('ticket'))
// const searchParams = this.props.location.search;
// const {code,ticket} = queryString.parse(searchParams);
const code = window.getParameterByName('code'); const code = window.getParameterByName('code');
const ticket = window.getParameterByName('ticket'); const ticket = window.getParameterByName('ticket');
this.setState({ this.setState({
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
.avatar-img{ .avatar-img{
width:16vw; width:16vw;
height:16vw; height:16vw;
border-radius:50%;
} }
.login-btn{ .login-btn{
width: 91.2vw; width: 91.2vw;
......
import React from 'react';
import Service from '@/common/js/service';
import './index.less';
class WorkWxAuthorize extends React.Component {
constructor(props) {
super(props);
this.state = {
scanState:'',
messageText:''
}
}
componentDidMount() {
const code = window.getParameterByName('code');
if(!code){
this.workWechatAuthorize();
}else{
this.workWechatLogin();
}
}
workWechatLogin= ()=>{
const code = window.getParameterByName('code');
const ticket = window.getParameterByName('ticket');
const storeId = window.getParameterByName('storeId');
Service.hades("/anon/hades/wXWorkUserTicketLogin", {
appTermEnum: 'XIAOMAI_CLOUD_CLASS_PC_WEB_CUSTOMER',
code,
ticket,
storeId
}, (res) => {
if (res.code == 200) {
this.setState({
scanState:'success'
})
} else {
let message = res.message.split(',').join('<br />')
this.setState({
scanState:'error',
messageText:message
})
}
})
}
workWechatAuthorize = () => {
const params = {}
Service.hades('/anon/hades/getCorpTrainSuiteId',params).then((res)=>{
let path = window.location.href;
const htmlUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${res.result}&redirect_uri=${encodeURIComponent(path)}&response_type=code&scope=snsapi_privateinfo&state=STATE#wechat_redirect`
window.location.href = htmlUrl;
})
}
render() {
const { scanState,messageText} = this.state;
return (
<div className="work-authorize-page">
<div className="box">
{ scanState === 'success' &&
<div className="success">
<img src="https://image.xiaomaiketang.com/xm/iRkcMHPHba.png" alt=""/>
<p>
扫码成功
</p>
</div>
}
{ scanState === 'error' &&
<div className="error">
<img src="https://image.xiaomaiketang.com/xm/6kSAYFMm2r.png
" alt="" />
<p className='message'>
{ messageText }
</p>
</div>
}
</div>
</div>
)
}
}
export default WorkWxAuthorize;
.work-authorize-page{
.box {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: rgba(244, 246, 250, 1);
}
img{
width:60px;
}
p {
font-size: 17px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 24px;
margin-top: 12px;
}
.hide {
display: none;
text-align: center;
}
}
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-04-29 10:26:32 * @Date: 2020-04-29 10:26:32
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-05 10:23:51 * @LastEditTime: 2021-03-31 16:31:55
* @Description: 内容线路由配置 * @Description: 内容线路由配置
*/ */
import { MenuConfig } from '@/routes/interface'; import { MenuConfig } from '@/routes/interface';
import Authorize from '@/modules/authorize'; import Authorize from '@/modules/authorize';
import WorkWxAuthorize from '@/modules/workWxAuthorize';
const CloudClassConfig: MenuConfig = { const CloudClassConfig: MenuConfig = {
key: 'cloudClass', key: 'cloudClass',
name: '云课堂', name: '云课堂',
...@@ -19,7 +19,13 @@ const CloudClassConfig: MenuConfig = { ...@@ -19,7 +19,13 @@ const CloudClassConfig: MenuConfig = {
name: '授权登录', name: '授权登录',
path: '/wechat-authorize', path: '/wechat-authorize',
component: Authorize, component: Authorize,
} },
{
key: 'authorize',
name: '授权登录',
path: '/work-wechat-authorize',
component: WorkWxAuthorize,
},
] ]
}; };
export default CloudClassConfig; export default CloudClassConfig;
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