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
20c677e2
Commit
20c677e2
authored
Apr 27, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gray' of
https://xmgit.ixm5.cn/xiaomai-cloud-class/xiaomai-cloud-class-web
into gray
parents
b32d90aa
950b4079
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
31 deletions
+30
-31
src/common/js/axios.ts
+1
-2
src/domains/basic-domain/constants.ts
+4
-4
src/modules/college-manage/EmployeeManage.tsx
+0
-5
src/modules/college-manage/modal/ChooseMembersModal.jsx
+8
-1
src/modules/root/CollegeManagePage.jsx
+2
-1
src/modules/root/Login.jsx
+1
-1
src/modules/root/WechatLogin.tsx
+9
-7
src/modules/store-manage/EmployeesManagePage.tsx
+0
-5
src/modules/teach-tool/examination-manager/ExamData.tsx
+5
-5
No files found.
src/common/js/axios.ts
View file @
20c677e2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-31 09:34:31
* @Date: 2020-08-31 09:34:31
* @LastEditors: zhangleyuan
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-0
1-09 14:39:46
* @LastEditTime: 2021-0
4-27 16:59:07
* @Description:
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -96,7 +96,6 @@ class Axios {
...
@@ -96,7 +96,6 @@ class Axios {
case
401
:
case
401
:
User
.
removeUserId
();
User
.
removeUserId
();
User
.
removeToken
();
User
.
removeToken
();
message
.
error
(
'请登录'
);
window
.
RCHistory
.
replace
(
'/login'
);
window
.
RCHistory
.
replace
(
'/login'
);
break
;
break
;
case
403
:
case
403
:
...
...
src/domains/basic-domain/constants.ts
View file @
20c677e2
/*
/*
* @Author: 陈剑宇
* @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01
* @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-04-1
5 21:42:47
* @LastEditTime: 2021-04-1
9 16:42:24
* @LastEditors:
yuananting
* @LastEditors:
zhangleyuan
* @Description:
* @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
*/
*/
...
@@ -22,8 +22,8 @@ const PATH_MAP: MapInterface = {
...
@@ -22,8 +22,8 @@ const PATH_MAP: MapInterface = {
dev
:
'https://dev.xiaomai5.com/xiaomai-cloud-class-web/h5.html'
,
dev
:
'https://dev.xiaomai5.com/xiaomai-cloud-class-web/h5.html'
,
dev1
:
'https://dev.xiaomai5.com/xiaomai-cloud-class-web/h5.html'
,
dev1
:
'https://dev.xiaomai5.com/xiaomai-cloud-class-web/h5.html'
,
rc
:
'https://rc.xiaomai5.com/xiaomai-cloud-class-web/h5.html'
,
rc
:
'https://rc.xiaomai5.com/xiaomai-cloud-class-web/h5.html'
,
gray
:
'https://
gray.xiaomai5.com/xiaomai-cloud-class-web
/h5.html'
,
gray
:
'https://
res.xiaomai0.com/xiaomai-cloud-class-web/gray
/h5.html'
,
prod
:
'https://
b.xiaomai5
.com/xiaomai-cloud-class-web/h5.html'
prod
:
'https://
res.xiaomai0
.com/xiaomai-cloud-class-web/h5.html'
};
};
// axios headers config
// axios headers config
...
...
src/modules/college-manage/EmployeeManage.tsx
View file @
20c677e2
...
@@ -78,11 +78,6 @@ function EmployeeManage() {
...
@@ -78,11 +78,6 @@ function EmployeeManage() {
avatar
:
""
,
avatar
:
""
,
});
});
const
[
roleIds
,
setRoleIds
]
=
useState
<
Array
<
RoleItemType
>>
([]);
const
[
roleIds
,
setRoleIds
]
=
useState
<
Array
<
RoleItemType
>>
([]);
const
roleMap
=
{
CloudManager
:
"管理员"
,
CloudLecturer
:
"讲师"
,
StoreManager
:
"学院管理员"
,
};
const
storeId
=
User
.
getStoreId
();
const
storeId
=
User
.
getStoreId
();
const
StoreType
=
User
.
getStoreType
();
const
StoreType
=
User
.
getStoreType
();
const
isWorkWechat
=
!!
(
StoreType
===
"WE_CHAT_STORE"
);
const
isWorkWechat
=
!!
(
StoreType
===
"WE_CHAT_STORE"
);
...
...
src/modules/college-manage/modal/ChooseMembersModal.jsx
View file @
20c677e2
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Modal
,
Input
,
Table
,
message
,
Tooltip
}
from
'antd'
;
import
{
Modal
,
Input
,
Table
,
message
,
Tooltip
,
Empty
}
from
'antd'
;
import
Service
from
'@/common/js/service'
;
import
Service
from
'@/common/js/service'
;
import
User
from
'@/common/js/user'
import
User
from
'@/common/js/user'
import
SetEmployeeModal
from
"./SetEmployeeModal"
;
import
SetEmployeeModal
from
"./SetEmployeeModal"
;
...
@@ -318,6 +318,13 @@ class ChooseMembersModal extends React.Component {
...
@@ -318,6 +318,13 @@ class ChooseMembersModal extends React.Component {
pagination=
{
false
}
pagination=
{
false
}
scroll=
{
{
y
:
290
}
}
scroll=
{
{
y
:
290
}
}
// bordered={true}
// bordered={true}
locale=
{
{
emptyText
:
<
div
>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
{
false
}
/>
<
div
style=
{
{
color
:
'#333'
,
marginTop
:
-
70
}
}
>
暂无数据
</
div
>
<
div
style=
{
{
color
:
'#666'
,
padding
:
'0 32px'
,
fontSize
:
'12px'
}
}
>
需要先将员工添加到企微可见范围后,员工才会出现在这里
</
div
>
</
div
>,
}
}
size=
{
'small'
}
size=
{
'small'
}
rowSelection=
{
{
rowSelection=
{
{
columnWidth
:
24
,
columnWidth
:
24
,
...
...
src/modules/root/CollegeManagePage.jsx
View file @
20c677e2
...
@@ -11,6 +11,7 @@ const roleMap = {
...
@@ -11,6 +11,7 @@ const roleMap = {
CloudManager
:
"管理员"
,
CloudManager
:
"管理员"
,
CloudLecturer
:
"讲师"
,
CloudLecturer
:
"讲师"
,
StoreManager
:
"学院管理员"
,
StoreManager
:
"学院管理员"
,
CloudOperator
:
'运营师'
,
};
};
export
default
class
CollegeManagePage
extends
React
.
Component
{
export
default
class
CollegeManagePage
extends
React
.
Component
{
...
@@ -79,7 +80,7 @@ export default class CollegeManagePage extends React.Component {
...
@@ -79,7 +80,7 @@ export default class CollegeManagePage extends React.Component {
User
.
removeToken
();
User
.
removeToken
();
User
.
removeEnterpriseId
();
User
.
removeEnterpriseId
();
User
.
clearUserInfo
();
User
.
clearUserInfo
();
const
htmlUrl
=
`
${
LIVE_SHARE
}
store/index?id=
${
User
.
getStoreId
()}
&userId=
${
User
.
getUserId
()}
&from=work_weixin`
;
const
htmlUrl
=
`
${
LIVE_SHARE
}
store/index?id=
${
User
.
get
CustomerStoreId
()
||
User
.
get
StoreId
()}
&userId=
${
User
.
getUserId
()}
&from=work_weixin`
;
window
.
location
.
href
=
htmlUrl
;
window
.
location
.
href
=
htmlUrl
;
});
});
}
}
...
...
src/modules/root/Login.jsx
View file @
20c677e2
...
@@ -34,7 +34,7 @@ function Login(props) {
...
@@ -34,7 +34,7 @@ function Login(props) {
User
.
setCustomerStoreId
(
storeId
);
User
.
setCustomerStoreId
(
storeId
);
}
}
if
(
from
===
'customer'
&&
enterpriseId
&&
userId
)
{
if
(
from
===
'customer'
&&
enterpriseId
&&
userId
)
{
if
(
!
user
.
getToken
()
||
enterpriseId
!==
user
.
getEnterpriseId
())
{
if
(
!
user
.
getToken
()
||
enterpriseId
!==
user
.
getEnterpriseId
()
||
userId
!==
User
.
getUserId
()
)
{
getWXWorkLoginNoCheck
(
enterpriseId
,
userId
);
getWXWorkLoginNoCheck
(
enterpriseId
,
userId
);
}
else
{
}
else
{
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
...
...
src/modules/root/WechatLogin.tsx
View file @
20c677e2
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
qrcode
from
'@/core/qrcode/qrcode.js'
import
qrcode
from
"@/libs/qrcode/qrcode.js"
;
import
Service
from
"@/common/js/service"
;
import
Service
from
"@/common/js/service"
;
import
User
from
'@/common/js/user'
;
import
User
from
'@/common/js/user'
;
import
{
PATH
}
from
'@/domains/basic-domain/constants'
;
import
{
PATH
}
from
'@/domains/basic-domain/constants'
;
...
@@ -7,6 +7,7 @@ import './WechatLogin.less'
...
@@ -7,6 +7,7 @@ import './WechatLogin.less'
const
Logo
=
require
(
"@/common/images/logo.png"
)
const
Logo
=
require
(
"@/common/images/logo.png"
)
declare
var
location
:
any
;
declare
var
location
:
any
;
export
default
function
WechatLogin
(
props
:
any
)
{
export
default
function
WechatLogin
(
props
:
any
)
{
const
freshTime
=
60
;
const
freshTime
=
60
;
const
init
:
any
=
null
;
const
init
:
any
=
null
;
...
@@ -31,15 +32,18 @@ export default function WechatLogin(props: any) {
...
@@ -31,15 +32,18 @@ export default function WechatLogin(props: any) {
// console.log(redirect)
// console.log(redirect)
// const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(redirect)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
// const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(redirect)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
// console.log(url)
// console.log(url)
const
qrcodeWrapDom
:
any
=
document
.
querySelector
(
'#qrcode'
);
let
qrnode
=
new
qrcode
({
let
qrnode
=
new
qrcode
({
text
:
redirect
,
text
:
redirect
,
correctLevel
:
2
,
correctLevel
:
2
,
size
:
160
,
size
:
160
,
image
:
Logo
,
image
:
Logo
,
imageSize
:
50
imageSize
:
50
});
});
QRCode
.
current
.
innerHTML
=
''
qrcodeWrapDom
.
innerHTML
=
''
;
QRCode
.
current
.
prepend
(
qrnode
);
qrcodeWrapDom
&&
qrcodeWrapDom
.
appendChild
(
qrnode
);
// QRCode.current.innerHTML = ''
// QRCode.current.prepend(qrnode);
setLeftTime
(
freshTime
);
setLeftTime
(
freshTime
);
timer
.
current
=
setInterval
(()
=>
{
timer
.
current
=
setInterval
(()
=>
{
if
(
leftTimeRef
.
current
==
0
)
{
if
(
leftTimeRef
.
current
==
0
)
{
...
@@ -85,9 +89,7 @@ export default function WechatLogin(props: any) {
...
@@ -85,9 +89,7 @@ export default function WechatLogin(props: any) {
return
<
div
className=
'wechatLoginBox'
>
return
<
div
className=
'wechatLoginBox'
>
<
div
className=
"rwm"
>
<
div
className=
"rwm"
>
<
div
id=
"qrcode"
ref=
{
(
dom
)
=>
{
<
div
id=
"qrcode"
></
div
>
QRCode
.
current
=
dom
}
}
></
div
>
{
{
status
===
1
&&
<
div
className=
"error"
>
status
===
1
&&
<
div
className=
"error"
>
...
...
src/modules/store-manage/EmployeesManagePage.tsx
View file @
20c677e2
...
@@ -80,11 +80,6 @@ function EmployeesManagePage() {
...
@@ -80,11 +80,6 @@ function EmployeesManagePage() {
avatar
:
""
,
avatar
:
""
,
});
});
const
[
roleIds
,
setRoleIds
]
=
useState
<
Array
<
RoleItemType
>>
([]);
const
[
roleIds
,
setRoleIds
]
=
useState
<
Array
<
RoleItemType
>>
([]);
const
roleMap
=
{
CloudManager
:
"管理员"
,
CloudLecturer
:
"讲师"
,
StoreManager
:
"学院管理员"
,
};
const
storeId
=
User
.
getStoreId
();
const
storeId
=
User
.
getStoreId
();
const
StoreType
=
User
.
getStoreType
();
const
StoreType
=
User
.
getStoreType
();
const
isWorkWechat
=
!!
(
StoreType
===
"WE_CHAT_STORE"
);
const
isWorkWechat
=
!!
(
StoreType
===
"WE_CHAT_STORE"
);
...
...
src/modules/teach-tool/examination-manager/ExamData.tsx
View file @
20c677e2
...
@@ -215,7 +215,7 @@ function ExamData(props: any) {
...
@@ -215,7 +215,7 @@ function ExamData(props: any) {
<
div
className=
"dataPanal"
>
<
div
className=
"dataPanal"
>
{
{
!!
examData
.
singleChoiceCnt
&&
<
div
className=
"item"
>
!!
examData
.
singleChoiceCnt
&&
<
div
className=
"item"
>
<
div
className=
"num"
>
{
(
examData
.
singleChoiceAccuracy
||
0
)
*
100
}
%
</
div
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
singleChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
单选题
<
span
>
(共
{
examData
.
singleChoiceCnt
}
题)
</
span
></
div
></
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
单选题
<
span
>
(共
{
examData
.
singleChoiceCnt
}
题)
</
span
></
div
></
div
>
</
div
>
</
div
>
...
@@ -223,7 +223,7 @@ function ExamData(props: any) {
...
@@ -223,7 +223,7 @@ function ExamData(props: any) {
{
{
!!
examData
.
multiChoiceCnt
&&
<
div
className=
"item"
>
!!
examData
.
multiChoiceCnt
&&
<
div
className=
"item"
>
<
div
className=
"num"
>
{
(
examData
.
multiChoiceAccuracy
||
0
)
*
100
}
%
</
div
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
multiChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
多选题
<
span
>
(共
{
examData
.
multiChoiceCnt
}
题)
</
span
></
div
></
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
多选题
<
span
>
(共
{
examData
.
multiChoiceCnt
}
题)
</
span
></
div
></
div
>
</
div
>
</
div
>
...
@@ -231,7 +231,7 @@ function ExamData(props: any) {
...
@@ -231,7 +231,7 @@ function ExamData(props: any) {
{
{
!!
examData
.
judgeCnt
&&
<
div
className=
"item"
>
!!
examData
.
judgeCnt
&&
<
div
className=
"item"
>
<
div
className=
"num"
>
{
(
examData
.
judgeAccuracy
||
0
)
*
100
}
%
</
div
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
judgeAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
判断题
<
span
>
(共
{
examData
.
judgeCnt
}
题)
</
span
></
div
></
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
判断题
<
span
>
(共
{
examData
.
judgeCnt
}
题)
</
span
></
div
></
div
>
</
div
>
</
div
>
...
@@ -240,14 +240,14 @@ function ExamData(props: any) {
...
@@ -240,14 +240,14 @@ function ExamData(props: any) {
{
{
!!
examData
.
gapFillingCnt
&&
<
div
className=
"item"
>
!!
examData
.
gapFillingCnt
&&
<
div
className=
"item"
>
<
div
className=
"num"
>
{
(
examData
.
gapFillingAccuracy
||
0
)
*
100
}
%
</
div
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
gapFillingAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
填空题
<
span
>
(共
{
examData
.
gapFillingCnt
}
题)
</
span
></
div
></
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
填空题
<
span
>
(共
{
examData
.
gapFillingCnt
}
题)
</
span
></
div
></
div
>
</
div
>
</
div
>
}
}
{
{
!!
examData
.
indefiniteChoiceCnt
&&
<
div
className=
"item"
>
!!
examData
.
indefiniteChoiceCnt
&&
<
div
className=
"item"
>
<
div
className=
"num"
>
{
(
examData
.
indefiniteChoiceAccuracy
||
0
)
*
100
}
%
</
div
>
<
div
className=
"num"
>
{
Math
.
round
((
examData
.
indefiniteChoiceAccuracy
||
0
)
*
100
)
}
%
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"percent"
>
正确率
</
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
不定项选择题
<
span
>
(共
{
examData
.
indefiniteChoiceCnt
}
题)
</
span
></
div
></
div
>
<
div
className=
"subTitle"
><
div
className=
"type"
><
span
className=
"icon iconfont"
>

</
span
>
不定项选择题
<
span
>
(共
{
examData
.
indefiniteChoiceCnt
}
题)
</
span
></
div
></
div
>
</
div
>
</
div
>
...
...
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