Commit 6740c852 by zhangleyuan

feat:处理合并代码后的冲突

parents 892ffa31 b0b03903
...@@ -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: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-23 14:14:20 * @LastEditTime: 2021-06-28 15:38:38
* @Description: * @Description:
*/ */
...@@ -21,6 +21,7 @@ import '@/core/function'; ...@@ -21,6 +21,7 @@ import '@/core/function';
import '@/core/xmTD'; import '@/core/xmTD';
import User from '@/common/js/user'; import User from '@/common/js/user';
import Service from "@/common/js/service"; import Service from "@/common/js/service";
import BaseService from '@/domains/basic-domain/baseService';
declare var getParameterByName: any; declare var getParameterByName: any;
declare var window: any; declare var window: any;
...@@ -71,7 +72,28 @@ if (getParameterByName('code') && isWeiXin()) { ...@@ -71,7 +72,28 @@ if (getParameterByName('code') && isWeiXin()) {
window.currentStoreUserInfo.enterpriseId = res.result.enterpriseId; window.currentStoreUserInfo.enterpriseId = res.result.enterpriseId;
mount() mount()
}) })
} else { } else if(getParameterByName('from') === 'customer' && getParameterByName('enterpriseId') && getParameterByName('userId')){
User.setCustomerStoreId(getParameterByName('storeId'));
getWXWorkLoginNoCheck(getParameterByName('enterpriseId'),getParameterByName('userId')); //从C端跳转过来的学院自动执行免登录
}else{
mount() mount()
} }
function getWXWorkLoginNoCheck(enterpriseId:string, userId:string){
const params = {
appTermEnum: 'XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN',
enterpriseId,
userId,
};
BaseService.getWXWorkLoginNoCheck(params).then((res) => {
User.setUserId(res.result.loginInfo.userId);
User.setToken(res.result.loginInfo.xmToken);
User.setEnterpriseId(res.result.enterpriseId);
window.currentStoreUserInfo = {};
window.currentStoreUserInfo.userId = res.result.loginInfo.userId;
window.currentStoreUserInfo.token = res.result.loginInfo.xmToken;
window.currentStoreUserInfo.enterpriseId = res.result.enterpriseId;
User.setIdentifier(res.result.identifier);
mount()
});
}
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:12:45 * @Date: 2020-08-05 10:12:45
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-15 20:01:05 * @LastEditTime: 2021-06-21 11:24:29
* @Description: 视频课-列表模块 * @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
......
...@@ -341,7 +341,7 @@ class ManageCoursewareModal extends React.Component { ...@@ -341,7 +341,7 @@ class ManageCoursewareModal extends React.Component {
const { failObject } = this.state; const { failObject } = this.state;
const uploadFail = failObject[item.id]; const uploadFail = failObject[item.id];
// 上课前45分钟/上课中/已结束的情况下都不可操作 // 上课前30分钟/上课中/已结束的情况下都不可操作
if (this.props.data.startTime < Date.now() + 1800000 || item.progress || uploadFail) { if (this.props.data.startTime < Date.now() + 1800000 || item.progress || uploadFail) {
return <span>-</span> return <span>-</span>
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: * @Description:
* @Author: zangsuyun * @Author: zangsuyun
* @Date: 2021-03-13 09:54:26 * @Date: 2021-03-13 09:54:26
* @LastEditors: yuananting * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-04 10:46:59 * @LastEditTime: 2021-06-28 15:42:48
* @Copyright: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyright: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2019-09-10 18:26:03 * @Date: 2019-09-10 18:26:03
* @LastEditors: Please set LastEditors * @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-24 19:28:14 * @LastEditTime: 2021-06-25 14:33:49
* @Description: * @Description:
*/ */
import React, { useRef, useContext, useEffect, useState } from 'react'; import React, { useRef, useContext, useEffect, useState } from 'react';
...@@ -271,14 +271,14 @@ function Header(props) { ...@@ -271,14 +271,14 @@ function Header(props) {
onChange={(e) => { onChange={(e) => {
setStoreId(e.target.value); setStoreId(e.target.value);
User.setStoreId(e.target.value); User.setStoreId(e.target.value);
list.map((item)=>{ list.map((item) => {
if(item.id === e.target.value){ if (item.id === e.target.value) {
User.setStoreUserId(item.storeUserId); User.setStoreUserId(item.storeUserId);
} }
}) });
User.setUserId(User.getUserId()); User.setUserId(User.getUserId());
User.setToken(User.getToken()); User.setToken(User.getToken());
User.setEnterpriseId(User.getEnterpriseId()) User.setEnterpriseId(User.getEnterpriseId());
window.RCHistory.push('/home'); window.RCHistory.push('/home');
window.location.reload(); window.location.reload();
}} }}
......
...@@ -32,26 +32,29 @@ function Login(props) { ...@@ -32,26 +32,29 @@ function Login(props) {
*/ */
useEffect(() => { useEffect(() => {
const enterpriseId = getParameterByName('enterpriseId'); // const enterpriseId = getParameterByName('enterpriseId');
const userId = getParameterByName('userId'); // const userId = getParameterByName('userId');
const from = getParameterByName('from'); // const from = getParameterByName('from');
const storeId = getParameterByName('storeId'); // const storeId = getParameterByName('storeId');
if (storeId) { // if (storeId) {
User.setCustomerStoreId(storeId); // User.setCustomerStoreId(storeId);
} // }
if (from === 'customer' && enterpriseId && userId) { // if (from === 'customer' && enterpriseId && userId) {
if (!user.getToken() || enterpriseId !== user.getEnterpriseId() || userId !== User.getUserId()) { // if (!user.getToken() || enterpriseId !== user.getEnterpriseId() || userId !== User.getUserId()) {
getWXWorkLoginNoCheck(enterpriseId, userId); // getWXWorkLoginNoCheck(enterpriseId, userId);
} else { // } else {
window.RCHistory.push({ // window.RCHistory.push({
pathname: `/switch-route`, // pathname: `/switch-route`,
}); // });
} // }
} else { // } else {
User.removeUserId(); // User.removeUserId();
User.removeToken(); // User.removeToken();
User.removeEnterpriseId(); // User.removeEnterpriseId();
} // }
User.removeUserId();
User.removeToken();
User.removeEnterpriseId();
storage.set('expiration_tip_login', true); storage.set('expiration_tip_login', true);
}, []); }, []);
function getWXWorkLoginNoCheck(enterpriseId, userId) { function getWXWorkLoginNoCheck(enterpriseId, userId) {
...@@ -61,14 +64,14 @@ function Login(props) { ...@@ -61,14 +64,14 @@ function Login(props) {
userId, userId,
}; };
BaseService.getWXWorkLoginNoCheck(params).then((res) => { BaseService.getWXWorkLoginNoCheck(params).then((res) => {
User.setUserId(res.result.loginInfo.userId) User.setUserId(res.result.loginInfo.userId);
User.setToken(res.result.loginInfo.xmToken) User.setToken(res.result.loginInfo.xmToken);
User.setEnterpriseId(res.result.enterpriseId) User.setEnterpriseId(res.result.enterpriseId);
window.currentStoreUserInfo = {} window.currentStoreUserInfo = {};
window.currentStoreUserInfo.userId = res.result.loginInfo.userId; window.currentStoreUserInfo.userId = res.result.loginInfo.userId;
window.currentStoreUserInfo.token = res.result.loginInfo.xmToken; window.currentStoreUserInfo.token = res.result.loginInfo.xmToken;
window.currentStoreUserInfo.enterpriseId = res.result.enterpriseId; window.currentStoreUserInfo.enterpriseId = res.result.enterpriseId;
User.setIdentifier(res.result.identifier) User.setIdentifier(res.result.identifier);
window.RCHistory.push({ window.RCHistory.push({
pathname: `/switch-route`, pathname: `/switch-route`,
}); });
......
...@@ -74,7 +74,7 @@ export default function WechatLogin(props: any) { ...@@ -74,7 +74,7 @@ export default function WechatLogin(props: any) {
window.currentStoreUserInfo = {} window.currentStoreUserInfo = {}
window.currentStoreUserInfo.userId = _res.result.loginInfo.userId; window.currentStoreUserInfo.userId = _res.result.loginInfo.userId;
window.currentStoreUserInfo.token = _res.result.loginInfo.xmToken; window.currentStoreUserInfo.token = _res.result.loginInfo.xmToken;
window.currentStoreUserInfo.enterpriseId = _res.result.loginInfo.enterpriseId; window.currentStoreUserInfo.enterpriseId = _res.result.enterpriseId;
User.setIdentifier(_res.result.identifier); User.setIdentifier(_res.result.identifier);
window.currentStoreUserInfo = {} window.currentStoreUserInfo = {}
window.currentStoreUserInfo.userId = _res.result.loginInfo.userId; window.currentStoreUserInfo.userId = _res.result.loginInfo.userId;
......
/* /*
* @Author: yuananting * @Author: yuananting
* @Date: 2021-02-23 18:28:50 * @Date: 2021-02-23 18:28:50
* @LastEditors: wufan * @LastEditors: fusanqiasng
* @LastEditTime: 2021-06-24 13:42:31 * @LastEditTime: 2021-06-25 14:35:20
* @Description: 助学工具-课程分类 * @Description: 助学工具-课程分类
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -569,29 +569,25 @@ class CourseCategoryManage extends Component { ...@@ -569,29 +569,25 @@ class CourseCategoryManage extends Component {
<ShowTips message='为方便管理,该分类用于课程、培训计划、题库、知识库等模块,改动将同步各模块更新' /> <ShowTips message='为方便管理,该分类用于课程、培训计划、题库、知识库等模块,改动将同步各模块更新' />
</div> </div>
<div className='course-category-tree'> <div className='course-category-tree'>
{ {
<Choose> <Choose>
<When condition={(treeData.length !== 0)}> <When condition={treeData.length !== 0}>
<DirectoryTree <DirectoryTree
expandedKeys={expandedKeys} expandedKeys={expandedKeys}
autoExpandParent={autoExpandParent} autoExpandParent={autoExpandParent}
onExpand={this.onExpand} onExpand={this.onExpand}
selectedKeys={selectedKeys} selectedKeys={selectedKeys}
onSelect={this.onSelect} onSelect={this.onSelect}
draggable draggable
blockNode blockNode
onDrop={this.onDrop} onDrop={this.onDrop}
treeData={treeData}></DirectoryTree> treeData={treeData}></DirectoryTree>
</When> </When>
<Otherwise> <Otherwise>
<LottieIcon <LottieIcon title={<span className='desc'>搜索无结果</span>} type='search' size={150} />
title={<span className="desc">搜索无结果</span>} </Otherwise>
type="search" </Choose>
size={150} }
/>
</Otherwise>
</Choose>
}
</div> </div>
</div> </div>
{operateCourseCategoryModal} {operateCourseCategoryModal}
......
/* /*
* @Author: yuananting * @Author: yuananting
* @Date: 2021-03-27 16:15:13 * @Date: 2021-03-27 16:15:13
* @LastEditors: fusanqiasng * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-15 14:36:37 * @LastEditTime: 2021-06-28 15:44:38
* @Description: 助学工具-新建/复制/编辑试卷 * @Description: 助学工具-新建/复制/编辑试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -483,7 +483,13 @@ class OperatePaper extends Component { ...@@ -483,7 +483,13 @@ class OperatePaper extends Component {
<span> <span>
分值{' '} 分值{' '}
<Tooltip title='多选题和填空题的漏选/半对得分不能高于题目本身分值'> <Tooltip title='多选题和填空题的漏选/半对得分不能高于题目本身分值'>
<span className='icon iconfont' style={{ color: '#BFBFBF', fontSize: 14, fontWeight: '400' }}> <span
className='icon iconfont'
style={{
color: '#BFBFBF',
fontSize: 14,
fontWeight: '400',
}}>
&#xe7c4; &#xe7c4;
</span> </span>
</Tooltip> </Tooltip>
...@@ -682,7 +688,7 @@ class OperatePaper extends Component { ...@@ -682,7 +688,7 @@ class OperatePaper extends Component {
<div className='show-tips'> <div className='show-tips'>
<ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' /> <ShowTips message='请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企学院保有依据国家规定及平台规则进行处理的权利' />
</div> </div>
<Form ref={this.formRef} style={{ marginTop: 24 }}> <Form ref={this.formRef} style={{ marginTop: 24, marginBottom: '85px' }}>
<Form.Item <Form.Item
name='paperName' name='paperName'
label='试卷名称:' label='试卷名称:'
...@@ -768,7 +774,6 @@ class OperatePaper extends Component { ...@@ -768,7 +774,6 @@ class OperatePaper extends Component {
columns={this.parseColumns()} columns={this.parseColumns()}
dataSource={selectQuestionList} dataSource={selectQuestionList}
pagination={false} pagination={false}
onChange={this.sortByQuestionType}
renderEmpty={{ renderEmpty={{
image: paperEmpty, image: paperEmpty,
description: <span style={{ display: 'block', paddingBottom: 24 }}>请在左上角添加题目</span>, description: <span style={{ display: 'block', paddingBottom: 24 }}>请在左上角添加题目</span>,
......
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