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
a40a38c4
Commit
a40a38c4
authored
Jun 24, 2021
by
guomingpang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/pangguoming/20210622/login_page_modify
parents
f4df368a
92b8a8c8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
265 additions
and
246 deletions
+265
-246
src/common/less/icon-font.less
+8
-11
src/index.html
+99
-87
src/modules/root/Header.jsx
+111
-109
src/modules/root/Header.less
+47
-39
No files found.
src/common/less/icon-font.less
View file @
a40a38c4
@font-face {
font-family: 'iconfont'; /* project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_boiin24pch6.eot');
src: url('//at.alicdn.com/t/font_2223403_boiin24pch6.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.woff') format('woff'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2223403_boiin24pch6.svg#iconfont') format('svg');
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_oe5p510553.woff2?t=1624259078391') format('woff2'),
url('//at.alicdn.com/t/font_2223403_oe5p510553.woff?t=1624259078391') format('woff'),
url('//at.alicdn.com/t/font_2223403_oe5p510553.ttf?t=1624259078391') format('truetype');
}
.iconfont{
font-family:
"iconfont"
!important;
font-size:16px;
font-style:normal;
.iconfont
{
font-family:
'iconfont'
!important;
font-size:
16px;
font-style:
normal;
}
src/index.html
View file @
a40a38c4
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors:
wufan
* @LastEditTime: 2021-0
5-27 10:24:06
* @LastEditors:
fusanqiasng
* @LastEditTime: 2021-0
6-21 15:06:27
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
...
...
@@ -13,17 +13,23 @@
<link
rel=
"icon"
href=
""
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
name=
"theme-color"
content=
"#000000"
/>
<meta
name=
"description"
content=
"小麦企学院,一站式企业培训数字化服务商,通过“工具+内容”,帮助企业快速从0到1搭建数字化培训体系,并让整个培训过程可视化,降低培训成本,提升培训效率。"
>
<meta
name=
"keywords"
content=
"小麦企学院,企业培训,员工培训,企业大学,企业内训,企业外训,培训计划,培训素材,企培,企训,资料云盘,培训课程,培训任务,直播课,视频课,图文课,线下课,知识库,作业,考试,排行榜,培训类别管理,定制培训计划,管理数据,学习数据,企学院,资料共享,培训数字化,数字化培训,培训工具,在线培训,线上培训,培训saas,培训管理,企业微信培训,对客培训,客户培训,直播培训,互联网培训,新员工培训,管理培训,管理者培训,工人培训,制造业培训,餐饮培训,服务业培训,零售培训,门店培训,工厂培训,车间培训,培训补贴,人事培训,财务培训,职场培训,企业学院平台,教育企业学院,教育企业平台,教育平台学院,企业学习,酷学院,小鹅通,企业学院,云学堂,时代光华,云课堂,魔学院,云大学,米知云,授课学堂"
>
<meta
name=
"description"
content=
"小麦企学院,一站式企业培训数字化服务商,通过“工具+内容”,帮助企业快速从0到1搭建数字化培训体系,并让整个培训过程可视化,降低培训成本,提升培训效率。"
/>
<meta
name=
"keywords"
content=
"小麦企学院,企业培训,员工培训,企业大学,企业内训,企业外训,培训计划,培训素材,企培,企训,资料云盘,培训课程,培训任务,直播课,视频课,图文课,线下课,知识库,作业,考试,排行榜,培训类别管理,定制培训计划,管理数据,学习数据,企学院,资料共享,培训数字化,数字化培训,培训工具,在线培训,线上培训,培训saas,培训管理,企业微信培训,对客培训,客户培训,直播培训,互联网培训,新员工培训,管理培训,管理者培训,工人培训,制造业培训,餐饮培训,服务业培训,零售培训,门店培训,工厂培训,车间培训,培训补贴,人事培训,财务培训,职场培训,企业学院平台,教育企业学院,教育企业平台,教育平台学院,企业学习,酷学院,小鹅通,企业学院,云学堂,时代光华,云课堂,魔学院,云大学,米知云,授课学堂"
/>
<!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> -->
<link
rel=
"shortcut icon"
href=
"https://image.xiaomaiketang.com/xm/c4KiP2epBP.png"
>
<link
rel=
"shortcut icon"
href=
"https://image.xiaomaiketang.com/xm/c4KiP2epBP.png"
/
>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link
rel=
"manifest"
href=
"%PUBLIC_URL%/manifest.json"
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_o
qqm4z9s35j.css"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_o
e5p510553.css"
/
>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
...
...
@@ -69,146 +75,152 @@
// Browser globals (root is window)
root
.
download
=
factory
();
}
}(
this
,
function
()
{
})(
this
,
function
()
{
return
function
download
(
data
,
strFileName
,
strMimeType
)
{
var
self
=
window
,
// this script is only for browsers anyway...
defaultMime
=
"application/octet-stream"
,
// this default mime also triggers iframe downloads
defaultMime
=
'application/octet-stream'
,
// this default mime also triggers iframe downloads
mimeType
=
strMimeType
||
defaultMime
,
payload
=
data
,
url
=
!
strFileName
&&
!
strMimeType
&&
payload
,
anchor
=
document
.
createElement
(
"a"
),
toString
=
function
(
a
){
return
String
(
a
);},
myBlob
=
(
self
.
Blob
||
self
.
MozBlob
||
self
.
WebKitBlob
||
toString
),
fileName
=
strFileName
||
"download"
,
anchor
=
document
.
createElement
(
'a'
),
toString
=
function
(
a
)
{
return
String
(
a
);
},
myBlob
=
self
.
Blob
||
self
.
MozBlob
||
self
.
WebKitBlob
||
toString
,
fileName
=
strFileName
||
'download'
,
blob
,
reader
;
myBlob
=
myBlob
.
call
?
myBlob
.
bind
(
self
)
:
Blob
;
myBlob
=
myBlob
.
call
?
myBlob
.
bind
(
self
)
:
Blob
;
if
(
String
(
this
)
===
"true"
){
//reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
payload
=
[
payload
,
mimeType
];
mimeType
=
payload
[
0
];
payload
=
payload
[
1
];
if
(
String
(
this
)
===
'true'
)
{
//reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback
payload
=
[
payload
,
mimeType
];
mimeType
=
payload
[
0
];
payload
=
payload
[
1
];
}
if
(
url
&&
url
.
length
<
2048
){
// if no filename and no mime, assume a url was passed as the only argument
fileName
=
url
.
split
(
"/"
).
pop
().
split
(
"?"
)[
0
];
if
(
url
&&
url
.
length
<
2048
)
{
// if no filename and no mime, assume a url was passed as the only argument
fileName
=
url
.
split
(
'/'
).
pop
().
split
(
'?'
)[
0
];
anchor
.
href
=
url
;
// assign href prop to temp anchor
if
(
anchor
.
href
.
indexOf
(
url
)
!==
-
1
){
// if the browser determines that it's a potentially valid url path:
var
ajax
=
new
XMLHttpRequest
();
ajax
.
open
(
"GET"
,
url
,
true
);
if
(
anchor
.
href
.
indexOf
(
url
)
!==
-
1
)
{
// if the browser determines that it's a potentially valid url path:
var
ajax
=
new
XMLHttpRequest
();
ajax
.
open
(
'GET'
,
url
,
true
);
ajax
.
responseType
=
'blob'
;
ajax
.
onload
=
function
(
e
){
ajax
.
onload
=
function
(
e
)
{
download
(
e
.
target
.
response
,
fileName
,
defaultMime
);
};
setTimeout
(
function
(){
ajax
.
send
();},
0
);
// allows setting custom ajax headers using the return:
setTimeout
(
function
()
{
ajax
.
send
();
},
0
);
// allows setting custom ajax headers using the return:
return
ajax
;
}
// end if valid url?
}
// end if url?
//go ahead and download dataURLs right away
if
(
/^data
\:[\w
+
\-]
+
\/[\w
+
\-]
+
[
,;
]
/
.
test
(
payload
)){
if
(
payload
.
length
>
(
1024
*
1024
*
1.999
)
&&
myBlob
!==
toString
){
payload
=
dataUrlToBlob
(
payload
);
mimeType
=
payload
.
type
||
defaultMime
;
}
else
{
return
navigator
.
msSaveBlob
?
// IE10 can't do a[download], only Blobs:
navigator
.
msSaveBlob
(
dataUrlToBlob
(
payload
),
fileName
)
:
saver
(
payload
)
;
// everyone else can save dataURLs un-processed
if
(
/^data
\:[\w
+
\-]
+
\/[\w
+
\-]
+
[
,;
]
/
.
test
(
payload
))
{
if
(
payload
.
length
>
1024
*
1024
*
1.999
&&
myBlob
!==
toString
)
{
payload
=
dataUrlToBlob
(
payload
);
mimeType
=
payload
.
type
||
defaultMime
;
}
else
{
return
navigator
.
msSaveBlob
// IE10 can't do a[download], only Blobs:
?
navigator
.
msSaveBlob
(
dataUrlToBlob
(
payload
),
fileName
)
:
saver
(
payload
);
// everyone else can save dataURLs un-processed
}
}
//end if dataURL passed?
}
//end if dataURL passed?
blob
=
payload
instanceof
myBlob
?
payload
:
new
myBlob
([
payload
],
{
type
:
mimeType
})
;
blob
=
payload
instanceof
myBlob
?
payload
:
new
myBlob
([
payload
],
{
type
:
mimeType
});
function
dataUrlToBlob
(
strUrl
)
{
var
parts
=
strUrl
.
split
(
/
[
:;,
]
/
),
type
=
parts
[
1
],
decoder
=
parts
[
2
]
==
"base64"
?
atob
:
decodeURIComponent
,
binData
=
decoder
(
parts
.
pop
()
),
mx
=
binData
.
length
,
i
=
0
,
uiArr
=
new
Uint8Array
(
mx
);
var
parts
=
strUrl
.
split
(
/
[
:;,
]
/
),
type
=
parts
[
1
],
decoder
=
parts
[
2
]
==
'base64'
?
atob
:
decodeURIComponent
,
binData
=
decoder
(
parts
.
pop
()
),
mx
=
binData
.
length
,
i
=
0
,
uiArr
=
new
Uint8Array
(
mx
);
for
(
i
;
i
<
mx
;
++
i
)
uiArr
[
i
]
=
binData
.
charCodeAt
(
i
);
for
(
i
;
i
<
mx
;
++
i
)
uiArr
[
i
]
=
binData
.
charCodeAt
(
i
);
return
new
myBlob
([
uiArr
],
{
type
:
type
});
return
new
myBlob
([
uiArr
],
{
type
:
type
});
}
function
saver
(
url
,
winMode
){
if
(
'download'
in
anchor
)
{
//html5 A[download]
function
saver
(
url
,
winMode
)
{
if
(
'download'
in
anchor
)
{
//html5 A[download]
anchor
.
href
=
url
;
anchor
.
setAttribute
(
"download"
,
fileName
);
anchor
.
className
=
"download-js-link"
;
anchor
.
innerHTML
=
"downloading..."
;
anchor
.
style
.
display
=
"none"
;
anchor
.
setAttribute
(
'download'
,
fileName
);
anchor
.
className
=
'download-js-link'
;
anchor
.
innerHTML
=
'downloading...'
;
anchor
.
style
.
display
=
'none'
;
document
.
body
.
appendChild
(
anchor
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
anchor
.
click
();
document
.
body
.
removeChild
(
anchor
);
if
(
winMode
===
true
){
setTimeout
(
function
(){
self
.
URL
.
revokeObjectURL
(
anchor
.
href
);},
250
);}
if
(
winMode
===
true
)
{
setTimeout
(
function
()
{
self
.
URL
.
revokeObjectURL
(
anchor
.
href
);
},
250
);
}
},
66
);
return
true
;
}
// handle non-a[download] safari as best we can:
if
(
/
(
Version
)\/(\d
+
)\.(\d
+
)(?:\.(\d
+
))?
.*Safari
\/
/
.
test
(
navigator
.
userAgent
))
{
url
=
url
.
replace
(
/^data:
([\w\/\-\+]
+
)
/
,
defaultMime
);
if
(
!
window
.
open
(
url
)){
// popup blocked, offer direct download:
if
(
confirm
(
"Displaying New Document
\
n
\
nUse Save As... to download, then click back to return to this page."
)){
location
.
href
=
url
;
}
if
(
/
(
Version
)\/(\d
+
)\.(\d
+
)(?:\.(\d
+
))?
.*Safari
\/
/
.
test
(
navigator
.
userAgent
))
{
url
=
url
.
replace
(
/^data:
([\w\/\-\+]
+
)
/
,
defaultMime
);
if
(
!
window
.
open
(
url
))
{
// popup blocked, offer direct download:
if
(
confirm
(
'Displaying New Document
\
n
\
nUse Save As... to download, then click back to return to this page.'
))
{
location
.
href
=
url
;
}
}
return
true
;
}
//do iframe dataURL download (old ch+FF):
var
f
=
document
.
createElement
(
"iframe"
);
var
f
=
document
.
createElement
(
'iframe'
);
document
.
body
.
appendChild
(
f
);
if
(
!
winMode
){
// force a mime that will download:
url
=
"data:"
+
url
.
replace
(
/^data:
([\w\/\-\+]
+
)
/
,
defaultMime
);
if
(
!
winMode
)
{
// force a mime that will download:
url
=
'data:'
+
url
.
replace
(
/^data:
([\w\/\-\+]
+
)
/
,
defaultMime
);
}
f
.
src
=
url
;
setTimeout
(
function
(){
document
.
body
.
removeChild
(
f
);
},
333
);
}
//end saver
if
(
navigator
.
msSaveBlob
)
{
// IE10+ : (has Blob, but not a[download] or URL)
f
.
src
=
url
;
setTimeout
(
function
()
{
document
.
body
.
removeChild
(
f
);
},
333
);
}
//end saver
if
(
navigator
.
msSaveBlob
)
{
// IE10+ : (has Blob, but not a[download] or URL)
return
navigator
.
msSaveBlob
(
blob
,
fileName
);
}
if
(
self
.
URL
){
// simple fast and modern way using Blob and URL:
if
(
self
.
URL
)
{
// simple fast and modern way using Blob and URL:
saver
(
self
.
URL
.
createObjectURL
(
blob
),
true
);
}
else
{
}
else
{
// handle non-Blob()+non-URL browsers:
if
(
typeof
blob
===
"string"
||
blob
.
constructor
===
toString
)
{
try
{
return
saver
(
"data:"
+
mimeType
+
";base64,"
+
self
.
btoa
(
blob
)
);
}
catch
(
y
)
{
return
saver
(
"data:"
+
mimeType
+
","
+
encodeURIComponent
(
blob
)
);
if
(
typeof
blob
===
'string'
||
blob
.
constructor
===
toString
)
{
try
{
return
saver
(
'data:'
+
mimeType
+
';base64,'
+
self
.
btoa
(
blob
)
);
}
catch
(
y
)
{
return
saver
(
'data:'
+
mimeType
+
','
+
encodeURIComponent
(
blob
)
);
}
}
// Blob but not URL support:
reader
=
new
FileReader
();
reader
.
onload
=
function
(
e
)
{
reader
=
new
FileReader
();
reader
.
onload
=
function
(
e
)
{
saver
(
this
.
result
);
};
reader
.
readAsDataURL
(
blob
);
}
return
true
;
};
/* end download() */
})
)
})
;
</script>
</body>
</html>
src/modules/root/Header.jsx
View file @
a40a38c4
/*
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-0
5-27 19:44:42
* @LastEditors:
fusanqiasng
* @LastEditTime: 2021-0
6-22 15:00:53
* @Description:
*/
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
"react"
;
import
"./Header.less"
;
import
{
Radio
,
Button
,
Dropdown
,
Modal
,
Tooltip
,
message
}
from
"antd"
;
import
{
LIVE_SHARE
}
from
"@/domains/course-domain/constants"
;
import
User
from
"@/common/js/user"
;
import
Service
from
"@/common/js/service"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
BaseService
from
"@/domains/basic-domain/baseService"
;
import
{
XMContext
}
from
"@/store/context"
;
import
logoImg
from
"@/common/images/logo.png"
;
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
qrcode
from
"@/libs/qrcode/qrcode.js"
;
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
'react'
;
import
'./Header.less'
;
import
{
Radio
,
Button
,
Dropdown
,
Modal
,
Tooltip
,
message
}
from
'antd'
;
import
{
LIVE_SHARE
}
from
'@/domains/course-domain/constants'
;
import
User
from
'@/common/js/user'
;
import
Service
from
'@/common/js/service'
;
import
StoreService
from
'@/domains/store-domain/storeService'
;
import
BaseService
from
'@/domains/basic-domain/baseService'
;
import
{
XMContext
}
from
'@/store/context'
;
import
logoImg
from
'@/common/images/logo.png'
;
import
CourseService
from
'@/domains/course-domain/CourseService'
;
import
qrcode
from
'@/libs/qrcode/qrcode.js'
;
import
Bus
from
'@/core/tbus'
;
import
ClickOutside
from
'../../components/ClickOutside'
;
import
_
from
"underscore"
;
import
_
from
'underscore'
;
const
baseImg
=
"https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png"
;
const
baseImg
=
'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png'
;
const
{
confirm
}
=
Modal
;
const
RadioGroup
=
Radio
.
Group
;
function
Header
(
props
)
{
const
{
menuType
,
handleMenuType
}
=
props
;
const
[
storeId
,
setStoreId
]
=
useState
(
User
.
getStoreId
());
const
[
storeName
,
setStoreName
]
=
useState
(
User
.
getStoreName
())
const
[
storeName
,
setStoreName
]
=
useState
(
User
.
getStoreName
())
;
const
[
avatar
,
setAvatar
]
=
useState
(
''
);
const
[
nickName
,
setNickName
]
=
useState
(
''
);
const
[
phone
,
setPhone
]
=
useState
(
''
);
...
...
@@ -37,10 +37,11 @@ function Header(props) {
const
[
instScroll
,
setInstScroll
]
=
useState
(
false
);
const
ctx
=
useContext
(
XMContext
);
const
htmlUrl
=
`
${
LIVE_SHARE
}
store/index?id=
${
User
.
getStoreId
()}
&userId=
${
User
.
getUserId
()}
&from=work_weixin`
;
const
helpCenterUrl
=
'https://www.yuque.com/wangzhong-zkqw0/qixue'
;
// 帮助中心
const
storeUserId
=
User
.
getStoreUserId
();
const
enterpriseId
=
User
.
getEnterpriseId
();
const
messageHelpRef
=
useRef
(
null
)
const
messageHelpRef
=
useRef
(
null
)
;
const
domRef
=
useRef
(
null
);
const
listRef
=
useRef
(
list
);
...
...
@@ -58,16 +59,16 @@ function Header(props) {
enterpriseId
?
getEnterpriseUser
()
:
User
.
setIsAdmin
(
false
);
},
[
storeUserId
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
messageHelpRef
.
current
)
{
return
return
;
}
if
(
menuType
)
{
messageHelpRef
.
current
.
style
.
marginLeft
=
"194px"
messageHelpRef
.
current
.
style
.
marginLeft
=
'194px'
;
}
else
{
messageHelpRef
.
current
.
style
.
marginLeft
=
"76px"
messageHelpRef
.
current
.
style
.
marginLeft
=
'76px'
;
}
},
[
menuType
])
},
[
menuType
]);
function
getUserInfo
()
{
const
param
=
{
...
...
@@ -85,7 +86,7 @@ function Header(props) {
const
params
=
{
enterpriseId
,
userId
:
User
.
getUserId
(),
}
}
;
BaseService
.
getEnterpriseUser
(
params
).
then
((
res
)
=>
{
const
{
isAdmin
}
=
res
.
result
;
User
.
setIsAdmin
(
isAdmin
);
...
...
@@ -99,7 +100,7 @@ function Header(props) {
userId
:
User
.
getUserId
(),
};
Service
.
Hades
(
'public/customerHades/getStoreListUser'
,
params
).
then
((
res
)
=>
{
const
newList
=
_
.
filter
(
res
.
result
,
item
=>
item
.
state
===
'VALID'
);
const
newList
=
_
.
filter
(
res
.
result
,
(
item
)
=>
item
.
state
===
'VALID'
);
setList
(
newList
);
listRef
.
current
=
newList
;
});
...
...
@@ -124,48 +125,47 @@ function Header(props) {
}
else
{
setInstScroll
(
true
);
}
}
;
}
function
userMenu
()
{
return
(
<
div
className=
"user-center-dropdown"
>
<
div
className=
"user-detail"
>
<
div
className=
"box"
>
<
div
className=
'user-center-dropdown'
>
<
div
className=
'user-detail'
>
<
div
className=
'box'
>
<
Tooltip
title=
{
nickName
}
>
<
div
className=
"name"
>
{
nickName
}
</
div
>
<
div
className=
'name'
>
{
nickName
}
</
div
>
</
Tooltip
>
<
span
className=
"phone"
>
{
phone
}
</
span
>
<
span
className=
'phone'
>
{
phone
}
</
span
>
</
div
>
<
span
className=
"setting"
onClick=
{
()
=>
toPersonalInfoPage
()
}
>
个人设置
<
span
className=
"iconfont icon"
>

</
span
>
<
span
className=
'setting'
onClick=
{
()
=>
toPersonalInfoPage
()
}
>
个人设置
<
span
className=
'iconfont icon'
>

</
span
>
</
span
>
</
div
>
<
div
className=
"menu"
>
{
User
.
getEnterpriseId
()
&&
<
div
className=
'menu'
>
{
User
.
getEnterpriseId
()
&&
(
<
div
className=
"menu-item"
key=
"1"
className=
'menu-item'
key=
'1'
onClick=
{
()
=>
{
window
.
RCHistory
.
push
({
pathname
:
'/college-manage'
,
});
}
}
>
<
span
className=
"menu-before iconfont icon"
>

</
span
>
}
}
>
<
span
className=
'menu-before iconfont icon'
>

</
span
>
<
span
>
进入管理后台
</
span
>
<
span
className=
"menu-after iconfont icon"
>

</
span
>
<
span
className=
'menu-after iconfont icon'
>

</
span
>
</
div
>
}
)
}
<
div
className=
"menu-item"
key=
"2"
className=
'menu-item'
key=
'2'
onClick=
{
(
e
)
=>
{
handleLogoutConfirm
();
}
}
>
<
span
className=
"menu-before iconfont icon"
>

</
span
>
}
}
>
<
span
className=
'menu-before iconfont icon'
>

</
span
>
<
span
>
退出登录
</
span
>
<
span
className=
"menu-after iconfont icon"
>

</
span
>
<
span
className=
'menu-after iconfont icon'
>

</
span
>
</
div
>
</
div
>
</
div
>
...
...
@@ -184,13 +184,11 @@ function Header(props) {
function
handleLogoutConfirm
()
{
return
confirm
({
title
:
"你确定要退出登录吗?"
,
content
:
"退出后,需重新登录"
,
icon
:
(
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>
),
okText
:
"退出登录"
,
cancelText
:
"点错了"
,
title
:
'你确定要退出登录吗?'
,
content
:
'退出后,需重新登录'
,
icon
:
<
span
className=
'icon iconfont default-confirm-icon'
>

</
span
>,
okText
:
'退出登录'
,
cancelText
:
'点错了'
,
onOk
:
()
=>
{
handleLogout
();
},
...
...
@@ -198,14 +196,13 @@ function Header(props) {
}
function
handleLogout
()
{
BaseService
.
logout
({
identifier
:
User
.
getIdentifier
()
}).
then
((
res
)
=>
{
BaseService
.
logout
({
identifier
:
User
.
getIdentifier
()
}).
then
((
res
)
=>
{
User
.
removeUserId
();
User
.
removeToken
();
User
.
removeEnterpriseId
();
User
.
clearUserInfo
();
const
url
=
`
${
LIVE_SHARE
}
store/index?id=
${
User
.
getCustomerStoreId
()
||
User
.
getStoreId
()}
&userId=
${
User
.
getUserId
()}
&from=work_weixin`
;
const
url
=
`
${
LIVE_SHARE
}
store/index?id=
${
User
.
getCustomerStoreId
()
||
User
.
getStoreId
()}
&userId=
${
User
.
getUserId
()}
&from=work_weixin`
;
window
.
location
.
href
=
url
;
});
}
...
...
@@ -214,7 +211,7 @@ function Header(props) {
urls
:
[
htmlUrl
],
}).
then
((
res
)
=>
{
const
{
result
=
[]
}
=
res
;
const
qrcodeWrapDom
=
document
.
querySelector
(
"#h5-qrcode"
);
const
qrcodeWrapDom
=
document
.
querySelector
(
'#h5-qrcode'
);
const
qrcodeNode
=
new
qrcode
({
text
:
result
[
0
].
shortUrl
,
size
:
110
,
...
...
@@ -231,12 +228,12 @@ function Header(props) {
}
return
(
<
div
id=
"top-container"
className=
"top-container"
>
<
div
className=
"top top-nav"
>
<
div
id=
'top-container'
className=
'top-container'
>
<
div
className=
'top top-nav'
>
{
/* <div>
<img src={topLeftLogo} className="logo" alt="" />
</div> */
}
<
div
className=
"message-help"
ref=
{
messageHelpRef
}
>
<
div
className=
'message-help'
ref=
{
messageHelpRef
}
>
{
list
.
length
?
(
<
ClickOutside
onClickOutside=
{
()
=>
{
...
...
@@ -244,46 +241,48 @@ function Header(props) {
setOpenDropdown
(
false
);
}
}
}
className=
"college-container"
>
className=
'college-container'
>
<
div
style=
{
{
width
:
'100%'
,
height
:
'100%'
}
}
>
<
div
className=
"college"
onClick=
{
()
=>
setOpenDropdown
(
false
)
}
>
<
div
className=
'college'
onClick=
{
()
=>
setOpenDropdown
(
false
)
}
>
<
span
className=
"college-name"
className=
'college-name'
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
setOpenDropdown
(
!
openDropdown
);
addShadow
();
}
}
>
{
storeName
}
</
span
>
{
list
.
length
>
1
&&
<
span
}
}
>
{
storeName
}
</
span
>
{
list
.
length
>
1
&&
(
<
span
className=
{
`icon iconfont ${list.length > 1 ? 'select' : ''}`
}
onClick=
{
(
e
)
=>
{
e
.
stopPropagation
();
setOpenDropdown
(
!
openDropdown
);
addShadow
();
}
}
>

</
span
>
}
}
}
>

</
span
>
)
}
</
div
>
<
div
className=
{
`select-college ${openDropdown ? 'active' : ''}`
}
>
<
h2
>
切换学院
</
h2
>
<
RadioGroup
onChange=
{
(
e
)
=>
{
setStoreId
(
e
.
target
.
value
)
setStoreId
(
e
.
target
.
value
)
;
User
.
setStoreId
(
e
.
target
.
value
);
window
.
RCHistory
.
push
(
'/home'
);
window
.
location
.
reload
();
}
}
value=
{
storeId
}
id=
"college-radio-group"
>
id=
'college-radio-group'
>
{
_
.
map
(
list
,
(
item
)
=>
(
<
Radio
value=
{
item
.
id
}
key=
{
item
.
id
}
>
<
span
className=
"name"
>
{
item
.
storeName
}
</
span
>
<
span
className=
'name'
>
{
item
.
storeName
}
</
span
>
</
Radio
>
))
}
</
RadioGroup
>
{
instScroll
&&
<
div
className=
"scroll-shadow"
></
div
>
}
{
instScroll
&&
<
div
className=
'scroll-shadow'
></
div
>
}
{
/* <div className="control">
<Button
size="small"
...
...
@@ -308,61 +307,64 @@ function Header(props) {
</
div
>
</
ClickOutside
>
)
:
(
<
div
className=
"store-related"
>
<
div
className=
"store-name"
>
{
storeName
}
</
div
>
<
div
className=
'store-related'
>
<
div
className=
'store-name'
>
{
storeName
}
</
div
>
</
div
>
)
}
<
div
className=
"right-box"
>
<
div
className=
"right-bg-img"
>
<
img
src=
"https://image.xiaomaiketang.com/xm/WCwjyyXYda.png"
></
img
>
<
div
className=
'right-box'
>
<
div
className=
'right-bg-img'
>
<
img
src=
'https://image.xiaomaiketang.com/xm/WCwjyyXYda.png'
></
img
>
</
div
>
<
div
className=
"link-to-store"
>
<
div
className=
"link"
>
<
span
className=
"link-btn"
>
<
span
className=
"icon iconfont tool-tip-right"
>

</
span
>
<
span
className=
"text"
>
前往学院
</
span
>
<
div
className=
'link-to-store'
>
<
div
className=
'link'
>
<
span
className=
'link-btn'
>
<
span
className=
'icon iconfont tool-tip-right'
>

</
span
>
<
span
className=
'text'
>
前往学院
</
span
>
</
span
>
<
div
className=
"store-popover"
>
<
div
className=
"pc-url"
>
<
div
className=
"name"
>
网页端学院
</
div
>
<
div
className=
'store-popover'
>
<
div
className=
'pc-url'
>
<
div
className=
'name'
>
网页端学院
</
div
>
<
div
className=
"url-link"
className=
'url-link'
onClick=
{
()
=>
{
window
.
open
(
htmlUrl
);
}
}
>
{
"立即前往 >"
}
}
}
>
{
'立即前往 >'
}
</
div
>
</
div
>
<
div
className=
"h5-url"
>
<
div
className=
"name"
>
手机端学院
</
div
>
<
div
id=
"h5-qrcode"
></
div
>
<
div
className=
"tip"
>
微信扫码,打开学院
</
div
>
<
div
className=
'h5-url'
>
<
div
className=
'name'
>
手机端学院
</
div
>
<
div
id=
'h5-qrcode'
></
div
>
<
div
className=
'tip'
>
微信扫码,打开学院
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"share"
onClick=
{
handleCopy
}
>
<
span
className=
"share-btn"
>
<
span
className=
"icon iconfont tool-tip-right"
>

</
span
>
<
span
className=
"text"
>
分享学院
</
span
>
<
div
className=
'share'
onClick=
{
handleCopy
}
>
<
span
className=
'share-btn'
>
<
span
className=
'icon iconfont tool-tip-right'
>

</
span
>
<
span
className=
'text'
>
分享学院
</
span
>
</
span
>
</
div
>
<
div
className=
'help'
>
<
a
href=
{
helpCenterUrl
}
target=
'_blank'
className=
'help-btn'
>
<
span
className=
'icon iconfont tool-tip-right'
>

</
span
>
<
span
className=
'text'
>
帮助中心
</
span
>
</
a
>
</
div
>
</
div
>
<
Dropdown
overlay=
{
userMenu
()
}
arrow
>
<
div
className=
"user"
>
<
div
className=
'user'
>
<
img
style=
{
{
width
:
32
+
"px"
,
height
:
32
+
"px"
,
borderRadius
:
"50%"
,
overflow
:
"hidden"
,
width
:
32
+
'px'
,
height
:
32
+
'px'
,
borderRadius
:
'50%'
,
overflow
:
'hidden'
,
flexShrink
:
0
,
}
}
src=
{
avatar
||
baseImg
}
/>
<
span
className=
"name"
>
{
nickName
}
</
span
>
<
span
className=
'name'
>
{
nickName
}
</
span
>
</
div
>
</
Dropdown
>
</
div
>
...
...
src/modules/root/Header.less
View file @
a40a38c4
@import
"../../core/variables.less"
;
@import
'../../core/variables.less'
;
@top-height: 60px;
@icon-color: #939393;
.top-container {
...
...
@@ -7,16 +7,23 @@
left: 0;
right: 0;
height: @top-height;
background-color: #2966
FF
;
background-color: #2966
ff
;
// z-index:2;
&::after{
content:'';
width:100%;
height:60px;
background: linear-gradient(180deg, #2966FF 0%, rgba(41, 102, 255, 0.82) 29%, rgba(41, 102, 255, 0.58) 55%, rgba(41, 102, 255, 0.27) 77%, rgba(7, 78, 255, 0) 100%);
position:absolute;
z-index:2;
top:59px;
&::after {
content: '';
width: 100%;
height: 60px;
background: linear-gradient(
180deg,
#2966ff 0%,
rgba(41, 102, 255, 0.82) 29%,
rgba(41, 102, 255, 0.58) 55%,
rgba(41, 102, 255, 0.27) 77%,
rgba(7, 78, 255, 0) 100%
);
position: absolute;
z-index: 2;
top: 59px;
}
.logo {
display: inline-block;
...
...
@@ -26,7 +33,7 @@
.logo-name {
font-size: 14px;
font-weight: 500;
color: #2966
FF
;
color: #2966
ff
;
line-height: 20px;
vertical-align: middle;
font-weight: bold;
...
...
@@ -204,7 +211,7 @@
cursor: pointer;
}
.college-name {
color:
#FFFFFF
;
color:
#ffffff
;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
...
...
@@ -213,9 +220,9 @@
.icon {
font-size: 14px;
margin-left: 8px;
color: #
FFF
;
color: #
fff
;
&:hover {
color:
#FFF
;
color:
#fff
;
}
}
}
...
...
@@ -283,7 +290,7 @@
align-items: center;
.store-name {
font-size: 14px;
color: #
FFF
;
color: #
fff
;
line-height: 49px;
margin-left: 8px;
white-space: nowrap;
...
...
@@ -296,17 +303,17 @@
width: 1px;
height: 16px;
background-color: #f4f4f4;
margin-right:16px;
margin-right:
16px;
}
}
.right-box {
display: flex;
align-items: center;
}
.right-bg-img{
img{
width:277px;
height:60px;
.right-bg-img
{
img
{
width:
277px;
height:
60px;
}
}
.link-to-store {
...
...
@@ -315,31 +322,27 @@
line-height: 49px;
.text {
font-size: 14px;
color: #
FFF
;
color: #
fff
;
line-height: 49px;
margin-left: 7px;
}
.iconfont {
color: #
FFF
;
color: #
fff
;
}
.link {
cursor: pointer;
position: relative;
.link-btn{
padding:3px 12px;
.link-btn
{
padding:
3px 12px;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
&:hover{
&:hover
{
border: 1px solid rgba(255, 255, 255, 1);
}
}
.store-popover {
display: none;
}
&:hover {
.store-popover {
position: absolute;
display: flex
;
display: none
;
width: 216px;
height: 260px;
top: 49px;
...
...
@@ -362,7 +365,7 @@
line-height: 20px;
}
.url-link {
color: #2966FF
;
color: #2966ff
;
font-size: 14px;
line-height: 20px;
}
...
...
@@ -386,19 +389,24 @@
line-height: 41px;
width: 130px;
}
}
}
&:hover {
.store-popover {
display: flex;
}
}
}
.share {
.share,
.help {
cursor: pointer;
margin-left: 16px;
.share-btn{
padding:3px 12px;
.share-btn,
.help-btn {
padding: 3px 12px;
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 4px;
&:hover{
&:hover
{
border: 1px solid rgba(255, 255, 255, 1);
}
}
...
...
@@ -529,7 +537,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color:
#FFF
;
color:
#fff
;
}
}
}
...
...
@@ -588,7 +596,7 @@
.user-detail {
position: relative;
padding-bottom: 16px;
border-bottom: 1px solid #
E8E8E
8;
border-bottom: 1px solid #
e8e8e
8;
display: flex;
align-items: center;
justify-content: space-between;
...
...
@@ -625,7 +633,7 @@
cursor: pointer;
color: #333;
.menu-before {
color: #
BFBFBF
;
color: #
bfbfbf
;
margin-right: 8px;
font-size: 14px;
}
...
...
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