Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web2022
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Website
web2022
Commits
738b691f
Commit
738b691f
authored
Aug 04, 2022
by
mxm-web-develop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
321
parent
2133a8a8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
158 additions
and
69 deletions
+158
-69
contactWhite.png
src/assets/img/contactWhite.png
+0
-0
index.tsx
src/components/Navbar/index.tsx
+140
-59
ScrollView.tsx
src/components/ScrollView.tsx
+2
-2
AppContianer.tsx
src/layouts/AppContianer.tsx
+1
-1
BallAnime.tsx
src/layouts/BallAnime.tsx
+1
-1
GradientLay.tsx
src/layouts/GradientLay.tsx
+1
-1
AppProvider.tsx
src/store/AppProvider.tsx
+9
-4
index.tsx
src/views/About/JoinUs/index.tsx
+4
-1
No files found.
src/assets/img/contactWhite.png
0 → 100644
View file @
738b691f
15.9 KB
src/components/Navbar/index.tsx
View file @
738b691f
import
{
IProps
}
from
"@/common/Iprops.interface"
;
import
{
IProps
}
from
"@/common/Iprops.interface"
;
import
*
as
React
from
'react'
;
import
*
as
React
from
"react"
;
import
{
use
State
}
from
'react'
;
import
{
use
Callback
,
useState
}
from
"react"
;
import
Logo
from
'@/assets/img/logo.png'
;
import
Logo
from
"@/assets/img/logo.png"
;
import
LogoWhite
from
'@/assets/img/logo_white.png'
import
LogoWhite
from
"@/assets/img/logo_white.png"
;
import
{
Link
,
useLocation
}
from
'react-router-dom'
;
import
{
Link
,
useLocation
,
useNavigate
}
from
"react-router-dom"
;
import
{
AppContext
}
from
"@/store/AppProvider"
;
import
{
AppContext
}
from
"@/store/AppProvider"
;
export
interface
IAppProps
extends
IProps
{
export
interface
IAppProps
extends
IProps
{}
}
const
HoverLink
=
()
=>
{
const
[
onHover
,
setOnHover
]
=
useState
(
false
);
const
slgurl
=
import
.
meta
.
env
.
VITE_SLG
const
slcurl
=
import
.
meta
.
env
.
VITE_SLC
const
lzburl
=
import
.
meta
.
env
.
VITE_LZB
const
goLink
=
(
name
:
string
)
=>
{
interface
HoverLinkType
extends
IProps
{
switch
(
name
){
theme
:
string
;
case
'slc'
:
}
window
.
open
(
slcurl
,
'_blank'
)
const
HoverLink
=
(
props
:
HoverLinkType
)
=>
{
const
[
onHover
,
setOnHover
]
=
useState
(
false
);
const
slgurl
=
import
.
meta
.
env
.
VITE_SLG
;
const
slcurl
=
import
.
meta
.
env
.
VITE_SLC
;
const
lzburl
=
import
.
meta
.
env
.
VITE_LZB
;
const
goLink
=
(
name
:
string
)
=>
{
switch
(
name
)
{
case
"slc"
:
window
.
open
(
slcurl
,
"_blank"
);
break
;
break
;
case
'slg'
:
case
"slg"
:
window
.
open
(
slgurl
,
'_blank'
)
window
.
open
(
slgurl
,
"_blank"
);
break
;
break
;
case
'lzb'
:
case
"lzb"
:
window
.
open
(
lzburl
,
'_blank'
)
window
.
open
(
lzburl
,
"_blank"
);
break
;
break
;
}
}
}
}
;
return
(
return
(
<
div
<
div
className=
'relative content-1-cn text-[#061E3B] font-normal'
className=
{
`relative content-1-cn font-normal ${
onPointerEnter=
{
()
=>
setOnHover
(
true
)
}
props.theme === "light" ? "text-[#061E3B]" : "text-white opacity-70"
onPointerLeave=
{
()
=>
setOnHover
(
false
)
}
}`
}
onPointerEnter=
{
()
=>
setOnHover
(
true
)
}
onPointerLeave=
{
()
=>
setOnHover
(
false
)
}
>
>
<
div
className=
'cursor-pointer'
<
div
className=
"cursor-pointer"
>
合作生态
</
div
>
>
合作生态
</
div
>
{
onHover
?
(
{
<
div
className=
"py-3"
>
onHover
?
<
div
<
div
className=
'py-3'
>
className=
{
`hover-toggle-box w-[180%]
<
div
className=
'hover-toggle-box w-[180%]
flex-cols
flex-cols
absolute
absolute
animate-fadeIn
animate-fadeIn
animate-alternate
animate-alternate
animate-fill-both
animate-fill-both
bg-opacity-25
bg-opacity-30
-translate-x-[18%] text-theme-dark rounded-lg flex-col
duration-75
items-center justify-center text-center py-3 px-2 bg-[#EAF0F4]'
>
-translate-x-[18%] rounded-lg flex-col
<
div
className=
'my-[8px] cursor-pointer hover:text-theme-blue'
onClick=
{
()
=>
goLink
(
'slc'
)
}
>
上链查
</
div
>
text-[#061E3B]
<
div
className=
'my-[8px] cursor-pointer hover:text-theme-blue'
onClick=
{
()
=>
goLink
(
'slg'
)
}
>
items-center justify-center text-center py-3 px-2 bg-[#EAF0F4]
`
}
>
<
div
className=
{
`my-[8px] cursor-pointer ${
props.theme === "light"
? "hover:text-theme-blue"
: "hover:text-white"
} `
}
onClick=
{
()
=>
goLink
(
"slc"
)
}
>
上链查
</
div
>
<
div
className=
{
`my-[8px] cursor-pointer ${
props.theme === "light"
? "hover:text-theme-blue"
: "hover:text-white"
} `
}
onClick=
{
()
=>
goLink
(
"slg"
)
}
>
上链购
上链购
</
div
>
</
div
>
<
div
className=
'my-[8px] cursor-pointer hover:text-theme-blue'
onClick=
{
()
=>
goLink
(
'lzb'
)
}
>
<
div
className=
{
`my-[8px] cursor-pointer ${
props.theme === "light"
? "hover:text-theme-blue"
: "hover:text-white"
}`
}
onClick=
{
()
=>
goLink
(
"lzb"
)
}
>
链证宝
链证宝
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
:
''
)
:
(
}
""
)
}
</
div
>
</
div
>
)
);
}
};
export
default
function
Navbar
(
props
:
IAppProps
)
{
export
default
function
Navbar
(
props
:
IAppProps
)
{
const
{
pathname
}
=
useLocation
()
const
{
pathname
}
=
useLocation
();
const
{
data
}
=
React
.
useContext
(
AppContext
)
const
{
data
}
=
React
.
useContext
(
AppContext
);
const
navigate
=
useNavigate
()
// console.log('nav',data)
// console.log('nav',data)
const
themeStyle
=
useCallback
(
(
theme
:
string
,
active
:
boolean
)
=>
{
if
(
theme
===
"light"
)
{
if
(
active
)
{
return
"text-theme-dark content-sub2-title-cn py-0"
;
}
return
"text-[#061E3B] font-normal"
;
}
else
{
if
(
active
)
{
return
"content-sub2-title-cn py-0 text-white"
;
}
return
"font-normal py-0 text-white opacity-70 "
;
}
},
[
data
]
);
return
(
return
(
<
nav
className=
'flex min-w-[1440px] justify-between absolute px-[120px] w-full top-0 z-[99999] py-6 text-sm text-[#061E3B] font-normal '
>
<>
<
div
className=
'left '
>
<
nav
className=
"invisible moblie:visible flex min-w-[1440px] justify-between absolute px-[120px] w-full top-0 z-[99999] py-6 text-sm text-[#061E3B] font-normal "
>
<
img
src=
{
Logo
}
/>
<
div
className=
"left "
>
<
img
src=
{
data
.
theme
===
"light"
?
Logo
:
LogoWhite
}
onClick=
{
()
=>
navigate
(
'/'
)
}
className=
" cursor-pointer"
/>
</
div
>
</
div
>
<
div
className=
'right content-1-cn items-start flex gap-x-12'
>
<
div
className=
"right content-1-cn items-start flex gap-x-12"
>
<
Link
to=
'/'
className=
{
`hover:text-theme-blue ${pathname ==='/'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
Baas33
</
Link
>
<
Link
<
Link
to=
'chain33'
className=
{
`hover:text-theme-blue ${pathname ==='/chain33'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
Chain33
</
Link
>
to=
"/"
<
HoverLink
/>
className=
{
`hover:text-theme-blue ${
<
Link
to=
'news'
className=
{
`hover:text-theme-blue ${pathname ==='/news'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
新闻动态
</
Link
>
pathname === "/"
? themeStyle(data.theme, true)
: themeStyle(data.theme, false)
}`
}
>
Baas33
</
Link
>
<
Link
to=
"chain33"
className=
{
`hover:text-theme-blue ${
pathname === "/chain33"
? themeStyle(data.theme, true)
: themeStyle(data.theme, false)
}`
}
>
Chain33
</
Link
>
<
HoverLink
theme=
{
data
.
theme
}
/>
<
Link
to=
"news"
className=
{
`hover:text-theme-blue ${
pathname === "/news"
? themeStyle(data.theme, true)
: themeStyle(data.theme, false)
}`
}
>
新闻动态
</
Link
>
{
/* <Link to='classes' className={`hover: text-theme-dark ${pathname ==='/classes'?' text-theme-dark':'text-[#061E3B] font-normal'}`}>公开课</Link> */
}
{
/* <Link to='classes' className={`hover: text-theme-dark ${pathname ==='/classes'?' text-theme-dark':'text-[#061E3B] font-normal'}`}>公开课</Link> */
}
<
Link
to=
'about'
className=
{
`hover:text-theme-blue ${pathname ==='/about'?' text-theme-dark content-sub2-title-cn py-0' :'text-[#061E3B] font-normal'}`
}
>
关于我们
</
Link
>
<
Link
to=
"about"
className=
{
`hover:text-theme-blue ${
pathname === "/about"
? themeStyle(data.theme, true)
: themeStyle(data.theme, false)
}`
}
>
关于我们
</
Link
>
</
div
>
</
div
>
{
/* <div className='right flex-grow-0'>
toolbar
</div> */
}
</
nav
>
</
nav
>
</>
);
);
}
}
src/components/ScrollView.tsx
View file @
738b691f
...
@@ -8,6 +8,7 @@ import ScrollBar from "@better-scroll/scroll-bar";
...
@@ -8,6 +8,7 @@ import ScrollBar from "@better-scroll/scroll-bar";
import
Slide
from
"@better-scroll/slide"
;
import
Slide
from
"@better-scroll/slide"
;
import
NestedScroll
from
'@better-scroll/nested-scroll'
import
NestedScroll
from
'@better-scroll/nested-scroll'
import
ContactImg
from
'@/assets/img/contact.png'
import
ContactImg
from
'@/assets/img/contact.png'
import
ContactImgWhite
from
'@/assets/img/contactWhite.png'
import
{
debounce
as
_debounce
}
from
'lodash'
import
{
debounce
as
_debounce
}
from
'lodash'
import
{
useCallback
,
useContext
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
"react"
;
import
{
useCallback
,
useContext
,
useEffect
,
useMemo
,
useRef
,
useState
}
from
"react"
;
import
{
LazyImg
}
from
"./LazyImg"
;
import
{
LazyImg
}
from
"./LazyImg"
;
...
@@ -113,7 +114,6 @@ export const ScrollView = (props: ScrollViewType) => {
...
@@ -113,7 +114,6 @@ export const ScrollView = (props: ScrollViewType) => {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
dispatch
({
type
:
'slideOnChange'
,
payload
:{
pageIndex
:
page
.
pageY
}})
dispatch
({
type
:
'slideOnChange'
,
payload
:{
pageIndex
:
page
.
pageY
}})
},
0
)
},
0
)
return
page
.
pageY
return
page
.
pageY
}
}
return
prevState
return
prevState
...
@@ -138,7 +138,7 @@ export const ScrollView = (props: ScrollViewType) => {
...
@@ -138,7 +138,7 @@ export const ScrollView = (props: ScrollViewType) => {
</
div
>
</
div
>
<
Dots
dotNumber=
{
dots
}
currentPage=
{
currentPage
}
pageMove=
{
pageMoving
}
/>
<
Dots
dotNumber=
{
dots
}
currentPage=
{
currentPage
}
pageMove=
{
pageMoving
}
/>
<
LazyImg
<
LazyImg
img=
{
ContactImg
}
img=
{
data
.
theme
===
'light'
?
ContactImg
:
ContactImgWhite
}
animate=
'contact'
animate=
'contact'
className=
'absolute bottom-[20px] right-[100px] w-[234px]'
className=
'absolute bottom-[20px] right-[100px] w-[234px]'
></
LazyImg
>
></
LazyImg
>
...
...
src/layouts/AppContianer.tsx
View file @
738b691f
...
@@ -10,7 +10,7 @@ interface AppContianerType extends IProps{
...
@@ -10,7 +10,7 @@ interface AppContianerType extends IProps{
export
const
AppContianer
=
(
props
:
AppContianerType
)
=>
{
export
const
AppContianer
=
(
props
:
AppContianerType
)
=>
{
const
{
children
,
bgColor
,
className
}
=
props
const
{
children
,
bgColor
,
className
}
=
props
return
(
return
(
<
div
className=
{
`
px-[120px]
min-w-[1440px] labtop:px-[16rem] relative w-full ${className?className:''}`
}
>
<
div
className=
{
`
moblie:px-[120px] moblie:
min-w-[1440px] labtop:px-[16rem] relative w-full ${className?className:''}`
}
>
{
children
}
{
children
}
</
div
>
</
div
>
)
)
...
...
src/layouts/BallAnime.tsx
View file @
738b691f
...
@@ -62,7 +62,7 @@ export const BallAnime = (props: BallAnimeType) => {
...
@@ -62,7 +62,7 @@ export const BallAnime = (props: BallAnimeType) => {
const
animation
=
props
.
animation
?
props
.
animation
:
"move-in"
;
const
animation
=
props
.
animation
?
props
.
animation
:
"move-in"
;
return
(
return
(
<
div
className=
"w-full h-full min-w-[1440px] relative"
>
<
div
className=
"w-full h-full m
oblie:m
in-w-[1440px] relative"
>
{
props
.
config
&&
props
.
config
.
length
>
0
{
props
.
config
&&
props
.
config
.
length
>
0
?
props
.
config
.
map
((
i
,
index
)
=>
{
?
props
.
config
.
map
((
i
,
index
)
=>
{
return
<
BallHolder
key=
{
index
}
config=
{
i
}
></
BallHolder
>;
return
<
BallHolder
key=
{
index
}
config=
{
i
}
></
BallHolder
>;
...
...
src/layouts/GradientLay.tsx
View file @
738b691f
...
@@ -69,7 +69,7 @@ const BgImgHodler = (props:BgElement)=>{
...
@@ -69,7 +69,7 @@ const BgImgHodler = (props:BgElement)=>{
export
const
GradientLay
=
(
props
:
BgAnimeType
)
=>
{
export
const
GradientLay
=
(
props
:
BgAnimeType
)
=>
{
const
{
children
}
=
props
;
const
{
children
}
=
props
;
return
(
return
(
<
div
className=
" relative h-full w-full min-w-[1440px] overflow-hidden"
>
<
div
className=
" relative h-full w-full m
oblie:m
in-w-[1440px] overflow-hidden"
>
<
div
className=
"w-full h-full absolute top-0 left-0 z-[-999] "
>
<
div
className=
"w-full h-full absolute top-0 left-0 z-[-999] "
>
{
props
&&
props
.
config
&&
props
.
config
.
length
>
0
{
props
&&
props
.
config
&&
props
.
config
.
length
>
0
?
props
.
config
.
map
((
i
,
index
)
=>
{
?
props
.
config
.
map
((
i
,
index
)
=>
{
...
...
src/store/AppProvider.tsx
View file @
738b691f
import
{
createContext
,
useEffect
,
useReducer
}
from
"react"
import
{
createContext
,
useEffect
,
useReducer
}
from
"react"
import
{
useLocation
}
from
'react-router-dom'
import
{
useLocation
}
from
'react-router-dom'
import
{
fromEvent
}
from
"rxjs"
const
data
=
{
const
data
=
{
device
:
''
,
device
:
''
,
...
@@ -26,15 +27,11 @@ const AppReducer = (state:typeof data,action:Actions)=>{
...
@@ -26,15 +27,11 @@ const AppReducer = (state:typeof data,action:Actions)=>{
}
else
{
}
else
{
state
.
theme
=
'light'
state
.
theme
=
'light'
}
}
break
;
break
;
case
'routerOnChange'
:
case
'routerOnChange'
:
state
.
currentPage
=
payload
.
currentPage
state
.
currentPage
=
payload
.
currentPage
break
;
break
;
}
}
// console.log(state);
return
{...
state
}
return
{...
state
}
}
}
...
@@ -43,7 +40,15 @@ export const AppProvider = (props: any)=>{
...
@@ -43,7 +40,15 @@ export const AppProvider = (props: any)=>{
const
location
=
useLocation
()
const
location
=
useLocation
()
useEffect
(()
=>
{
useEffect
(()
=>
{
dispatch
({
type
:
'routerOnChange'
,
payload
:{
currentPage
:
location
.
pathname
}})
dispatch
({
type
:
'routerOnChange'
,
payload
:{
currentPage
:
location
.
pathname
}})
dispatch
({
type
:
'slideOnChange'
,
payload
:{
pageIndex
:
0
}})
},[
location
])
},[
location
])
useEffect
(()
=>
{
const
ob
=
fromEvent
(
window
,
'resize'
)
ob
.
subscribe
(
v
=>
{
console
.
log
(
v
,
1111
);
})
})
return
(
return
(
<
AppContext
.
Provider
value=
{
{
data
:
state
,
dispatch
}
}
>
<
AppContext
.
Provider
value=
{
{
data
:
state
,
dispatch
}
}
>
{
props
.
children
}
{
props
.
children
}
...
...
src/views/About/JoinUs/index.tsx
View file @
738b691f
...
@@ -45,6 +45,7 @@ const DataGrid = (props: DataGridType) => {
...
@@ -45,6 +45,7 @@ const DataGrid = (props: DataGridType) => {
};
};
const
DtailContainer
=
(
props
:
DtailContainerType
)
=>
{
const
DtailContainer
=
(
props
:
DtailContainerType
)
=>
{
const
{
doCancelSelecteItem
,
data
,
className
}
=
props
;
const
{
doCancelSelecteItem
,
data
,
className
}
=
props
;
return
(
return
(
<
div
className=
{
className
+
" -translate-y-[8px]"
}
>
<
div
className=
{
className
+
" -translate-y-[8px]"
}
>
<
div
className=
{
`flex hover:text-theme-blue items-center `
}
>
<
div
className=
{
`flex hover:text-theme-blue items-center `
}
>
...
@@ -60,7 +61,8 @@ const DtailContainer = (props: DtailContainerType) => {
...
@@ -60,7 +61,8 @@ const DtailContainer = (props: DtailContainerType) => {
<
div
className=
'py-[5px]'
>
<
div
className=
'py-[5px]'
>
<
div
className=
'flex justify-between'
>
<
div
className=
'flex justify-between'
>
<
div
className=
'sub-title-cn'
>
{
data
.
title
}
</
div
>
<
div
className=
'sub-title-cn'
>
{
data
.
title
}
</
div
>
<
StyledButton
text=
'我要应聘'
color=
"black"
></
StyledButton
>
{
/* <a href="mailto: hr@33.cn" className='normal-text block h-[40px] leading-[40px] tracking-widest cursor-pointer rounded-full px-8 bg-black text-white'> 我要应聘</a> */
}
{
/* <StyledButton text='我要应聘' color="black" onClick={() =>sendEmail}></StyledButton> */
}
</
div
>
</
div
>
<
div
className=
'normal-text'
>
{
data
.
diploma
}
</
div
>
<
div
className=
'normal-text'
>
{
data
.
diploma
}
</
div
>
<
div
className=
'normal-text'
>
{
data
.
location
}
</
div
>
<
div
className=
'normal-text'
>
{
data
.
location
}
</
div
>
...
@@ -81,6 +83,7 @@ const DtailContainer = (props: DtailContainerType) => {
...
@@ -81,6 +83,7 @@ const DtailContainer = (props: DtailContainerType) => {
))
}
))
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'content-sub2-title-cn'
>
有意向者请投简历到该邮箱:
<
a
href=
"mailto: hr@33.cn"
>
hr@33.cn
</
a
>
</
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