Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
6740c852
Commit
6740c852
authored
Jun 28, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Plain Diff
feat:处理合并代码后的冲突
parents
892ffa31
b0b03903
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
95 additions
and
68 deletions
+95
-68
src/index.tsx
+25
-2
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
+1
-1
src/modules/course-manage/modal/ManageCoursewareModal.jsx
+1
-1
src/modules/knowledge-base/modal/AddCourse.jsx
+2
-2
src/modules/root/Header.jsx
+6
-6
src/modules/root/Login.jsx
+28
-25
src/modules/root/WechatLogin.tsx
+1
-1
src/modules/teach-tool/components/CourseCategoryManage.jsx
+21
-25
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+10
-5
No files found.
src/index.tsx
View file @
6740c852
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-04-27 20:35:34
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-2
3 14:14:20
* @LastEditTime: 2021-06-2
8 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
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
View file @
6740c852
...
...
@@ -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: 杭州杰竞科技有限公司 版权所有
*/
...
...
src/modules/course-manage/modal/ManageCoursewareModal.jsx
View file @
6740c852
...
...
@@ -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
>
}
...
...
src/modules/knowledge-base/modal/AddCourse.jsx
View file @
6740c852
...
...
@@ -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 杭州杰竞科技有限公司 版权所有
*/
...
...
src/modules/root/Header.jsx
View file @
6740c852
/*
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-06-2
4 19:28:14
* @LastEditors:
fusanqiasng
* @LastEditTime: 2021-06-2
5 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
();
}
}
...
...
src/modules/root/Login.jsx
View file @
6740c852
...
...
@@ -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`
,
});
...
...
src/modules/root/WechatLogin.tsx
View file @
6740c852
...
...
@@ -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
;
...
...
src/modules/teach-tool/components/CourseCategoryManage.jsx
View file @
6740c852
/*
* @Author: yuananting
* @Date: 2021-02-23 18:28:50
* @LastEditors:
wufan
* @LastEditTime: 2021-06-2
4 13:42:31
* @LastEditors:
fusanqiasng
* @LastEditTime: 2021-06-2
5 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
}
...
...
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
6740c852
/*
* @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'
,
}
}
>

</
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
>,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment