Commit 6740c852 by zhangleyuan

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

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