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
be20a535
Commit
be20a535
authored
Aug 03, 2022
by
mxm-web-develop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
321
parent
c3062bc9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
52 deletions
+122
-52
.env.development
.env.development
+3
-1
constants.ts
src/config/constants.ts
+21
-1
index.tsx
src/views/Baas33/index.tsx
+2
-2
index.tsx
src/views/Chain33/index.tsx
+95
-48
vite-env.d.ts
src/vite-env.d.ts
+1
-0
No files found.
.env.development
View file @
be20a535
...
...
@@ -2,7 +2,7 @@ NODE_ENV=dev
VITE_FETCH_URL = http://192.168.23.80:3333/
VITE_CHAIN33_DOC = "http://192.168.23.80:3335"
VITE_BAAS33_DOC = "http://192.168.23.80:3336"
VITE_BAAS_ONECLIKE = "https://baasadmin.33.cn/login"
VITE_NEWS_API = "'https://33.cn/api/"
...
...
@@ -10,5 +10,6 @@ VITE_SLC = "https://zhpt.8n.cn"
VITE_SLG = "https://zhpt.8n.cn/mall"
VITE_LZB = "https://lianzb.cn/home/index"
VITE_CHAIN33_GIT = "https://github.com/33cn/chain33"
VITE_CHAIN33_DOWNLOAD = "https://chain.33.cn/resource"
\ No newline at end of file
src/config/constants.ts
View file @
be20a535
...
...
@@ -31,7 +31,7 @@ export const detailInstances = [
},
{
title
:
"快速上链"
,
context
:
"支持用户快速构建区块链网络,实现业务快速上链"
},
],
fee
:
'适用版本的联盟链加平行链总数限制在3
跳
,联盟链节点最多支持5个,免费试用一个月。如果要增加链的条数以及使用时间,可以联系我们获取license文件,对链条目进行扩容。'
fee
:
'适用版本的联盟链加平行链总数限制在3
条
,联盟链节点最多支持5个,免费试用一个月。如果要增加链的条数以及使用时间,可以联系我们获取license文件,对链条目进行扩容。'
},
{
...
...
@@ -53,3 +53,22 @@ export const detailInstances = [
fee
:
'开发版本的联盟链加平行链总数限制在6条,联盟链节点最多支持7个,一年费用7998。如果要增加链的条数,可以联系我们获取license文件,对链条目进行扩容。'
},
];
export
const
chain33Features
=
[
{
title
:
'高效'
,
context
:
'Chain33区块链中,交易在主链上共识并存储。多条平行链同时处理交易效率大大提升。'
},
{
title
:
'稳定'
,
context
:
'复杂的功能放在平行链上开发,主链不受影响。Chain33主链只运行核心功能,简单稳定。'
},
{
title
:
'安全'
,
context
:
'平行链使用Chain33主链安全的共识,安全性主链来提供。平行链损坏或被攻击,数据可以快速从主链同步,保证数据安全。'
},
{
title
:
'高扩展性'
,
context
:
'平行链支持部署自己的微共识和生态,支持主链和平行链跨链,平行链之间跨链交易。'
},
{
title
:
'简单'
,
context
:
'部署快捷简单,一个可执行文件,几个配置参数,一行启动命令便可以快速部署一个区块链主链网络及平行链网络。'
}
]
\ No newline at end of file
src/views/Baas33/index.tsx
View file @
be20a535
...
...
@@ -21,6 +21,7 @@ export interface IAppProps {
export
default
function
Baas33
()
{
const
navigate
=
useNavigate
()
const
b
=
[
'#sdfiw2'
,
'#fud8fu'
,
'#sdif822'
]
const
appstart
=
import
.
meta
.
env
.
VITE_BAAS_ONECLIKE
return
(
<
ScrollView
>
...
...
@@ -33,9 +34,8 @@ export default function Baas33 () {
<
div
>
<
div
className=
"title-1-cn"
>
复杂美区块链开放服务平台
</
div
>
<
div
className=
"flex gap-x-5 mt-5 "
>
<
StyledButton
text=
'开发者实验室'
color=
"black"
></
StyledButton
>
<
StyledButton
text=
'开发者文档'
color=
"black"
onClick=
{
()
=>
navigate
(
'/docs/1'
)
}
></
StyledButton
>
<
StyledButton
text=
'一键搭建'
color=
"red"
></
StyledButton
>
<
StyledButton
text=
'一键搭建'
color=
"red"
onClick=
{
()
=>
window
.
open
(
appstart
,
'_blank'
)
}
></
StyledButton
>
</
div
>
</
div
>
</
AppContianer
>
...
...
src/views/Chain33/index.tsx
View file @
be20a535
...
...
@@ -4,36 +4,39 @@ import { PageLayout } from "@/layouts/PageLayout";
import
chain33Bg
from
"@/assets/img/chain33.png"
;
import
StyledButton
from
"@/components/StyledButton"
;
import
{
IProps
}
from
"@/common/Iprops.interface"
;
import
{
Suspense
,
useMemo
}
from
"react"
;
import
{
Suspense
,
use
Callback
,
use
Memo
}
from
"react"
;
import
{
AppContianer
}
from
"@/layouts/AppContianer"
;
import
{
GradientLay
}
from
"@/layouts/GradientLay"
;
import
Gao
from
'@/assets/img/gao.png'
import
Jian
from
'@/assets/img/jian.png'
import
Kuo
from
'@/assets/img/kuo.png'
import
Weng
from
'@/assets/img/weng.png'
import
An
from
'@/assets/img/an.png'
import
Gao
from
"@/assets/img/gao.png"
;
import
Jian
from
"@/assets/img/jian.png"
;
import
Kuo
from
"@/assets/img/kuo.png"
;
import
Weng
from
"@/assets/img/weng.png"
;
import
An
from
"@/assets/img/an.png"
;
import
{
useNavigate
}
from
"react-router"
;
import
{
LazyImg
}
from
"@/components/LazyImg"
;
interface
HeroItemType
extends
IProps
{
heroTitle
:
string
;
subtitle
:
string
;
content
:
string
;
order
?:
number
;
img
?:
any
import
{
chain33Features
}
from
"@/config/constants"
;
interface
HeroItemType
extends
IProps
{
heroTitle
:
string
;
subtitle
:
string
;
content
:
string
;
order
?:
number
;
img
?:
any
;
}
const
HeroItem
=
(
props
:
HeroItemType
)
=>
{
const
{
heroTitle
,
subtitle
,
content
,
order
,
img
}
=
props
;
const
itemPosition
=
useMemo
(()
=>
{
if
(
order
&&
order
%
2
===
0
)
{
const
HeroItem
=
(
props
:
HeroItemType
)
=>
{
const
{
heroTitle
,
subtitle
,
content
,
order
,
img
}
=
props
;
const
itemPosition
=
useMemo
(()
=>
{
if
(
order
&&
order
%
2
===
0
)
{
return
false
;
}
else
{
return
true
}
else
{
return
true
;
}
},[
order
])
return
(
<
div
className=
{
`flex min-h-[750px] h-[85vh] w-[148px] py-16 text-white justify-center
${itemPosition?'items-start':' items-end'}
`
}
>
},
[
order
]);
return
(
<
div
className=
{
`flex min-h-[750px] h-[85vh] w-[148px] py-16 text-white justify-center
${itemPosition ? "items-start" : " items-end"}
`
}
>
<
div
>
<
div
className=
"hero font-sans font-extrabold text-9xl"
>
<
img
src=
{
img
}
/>
...
...
@@ -41,19 +44,28 @@ const HeroItem =(props: HeroItemType)=>{
<
div
className=
"content-title-cn border-b-2 text-white w-[130px] my-3"
>
{
subtitle
}
</
div
>
<
div
className=
' normal-text text-white'
>
{
content
}
</
div
>
<
div
className=
" normal-text text-white"
>
{
content
}
</
div
>
</
div
>
</
div
>
)
}
</
div
>
)
;
}
;
export
default
function
Chain33
()
{
const
navigate
=
useNavigate
()
const
imgOnload
=
(
e
:
any
)
=>
{
console
.
log
(
e
);
const
navigate
=
useNavigate
();
const
getItemData
=
useCallback
((
name
:
string
)
=>
{
return
chain33Features
.
find
((
k
)
=>
k
.
title
===
name
);
},
[]);
const
resource
=
import
.
meta
.
env
.
VITE_CHAIN33_DOWNLOAD
const
github
=
import
.
meta
.
env
.
VITE_CHAIN33_GIT
const
goLink
=
(
name
:
string
)
=>
{
switch
(
name
){
case
'resource'
:
window
.
open
(
resource
,
'_blank'
)
break
;
case
'github'
:
window
.
open
(
github
,
'_blank'
)
break
;
}
}
return
(
<
ScrollView
>
...
...
@@ -61,7 +73,6 @@ export default function Chain33() {
<
PageLayout
>
<
div
className=
"w-full h-full flex justify-center items-baseline overflow-hidden"
>
<
div
className=
"img-holder mx-auto w-[1440px] relative "
>
<
div
className=
"absolute z-[999] w-full h-full flex items-center -translate-x-[5%] -translate-y-[15%] justify-center text-white"
>
<
div
>
<
div
className=
"p-[42px] border-white border-[4px] rounded "
>
...
...
@@ -72,33 +83,69 @@ export default function Chain33() {
复杂美区块链开发者平台
</
div
>
</
div
>
<
div
className=
'pt-16 flex justify-center items-center gap-x-3'
>
<
StyledButton
text=
'开源社区'
></
StyledButton
>
<
StyledButton
text=
'资源下载'
></
StyledButton
>
<
StyledButton
text=
'立即上手'
color=
"black"
onClick=
{
()
=>
navigate
(
'/docs/2'
)
}
></
StyledButton
>
<
div
className=
"pt-16 flex justify-center items-center gap-x-3"
>
<
StyledButton
text=
"开源社区"
onClick=
{
()
=>
goLink
(
'github'
)
}
></
StyledButton
>
<
StyledButton
text=
"资源下载"
onClick=
{
()
=>
goLink
(
'resource'
)
}
></
StyledButton
>
<
StyledButton
text=
"立即上手"
color=
"black"
onClick=
{
()
=>
navigate
(
"/docs/2"
)
}
></
StyledButton
>
</
div
>
</
div
>
</
div
>
<
LazyImg
img=
{
chain33Bg
}
className=
'object-scale-down object-bottom z-[9]'
className=
"object-scale-down object-bottom z-[9]"
></
LazyImg
>
</
div
>
</
div
>
</
PageLayout
>
<
PageLayout
className=
" bg-[#084DFF] flex items-center justify-center"
>
<
AppContianer
className=
''
>
<
AppContianer
className=
""
>
<
div
className=
"flex justify-between items-center gap-x-5 min-h-[750px]"
>
<
HeroItem
heroTitle=
"高"
img=
{
Gao
}
order=
{
1
}
subtitle=
"高效"
content=
"Chain33区块链中,交易在主链上共识并存储。多条平行链同时处理交易效率大大提升。"
></
HeroItem
>
<
HeroItem
heroTitle=
"安"
img=
{
An
}
order=
{
2
}
subtitle=
"安全"
content=
"Chain33区块链中,交易在主链上共识并存储。多条平行链同时处理交易效率大大提升。"
></
HeroItem
>
<
HeroItem
heroTitle=
"简"
img=
{
Jian
}
order=
{
3
}
subtitle=
"简单"
content=
"Chain33区块链中,交易在主链上共识并存储。多条平行链同时处理交易效率大大提升。"
></
HeroItem
>
<
HeroItem
heroTitle=
"稳"
img=
{
Weng
}
order=
{
4
}
subtitle=
"稳定"
content=
"Chain33区块链中,交易在主链上共识并存储。多条平行链同时处理交易效率大大提升。"
></
HeroItem
>
<
HeroItem
heroTitle=
"扩"
img=
{
Kuo
}
order=
{
5
}
subtitle=
"高扩展性"
content=
"Chain33区块链中,交易在主链上共识并存储。多条平行链同时处理交易效率大大提升。"
></
HeroItem
>
<
HeroItem
heroTitle=
"高"
img=
{
Gao
}
order=
{
1
}
subtitle=
{
getItemData
(
"高效"
)
!
.
title
}
content=
{
getItemData
(
"高效"
)
!
.
context
}
></
HeroItem
>
<
HeroItem
heroTitle=
"安"
img=
{
An
}
order=
{
2
}
subtitle=
{
getItemData
(
"安全"
)
!
.
title
}
content=
{
getItemData
(
"安全"
)
!
.
context
}
></
HeroItem
>
<
HeroItem
heroTitle=
"简"
img=
{
Jian
}
order=
{
3
}
subtitle=
{
getItemData
(
"简单"
)
!
.
title
}
content=
{
getItemData
(
"简单"
)
!
.
context
}
></
HeroItem
>
<
HeroItem
heroTitle=
"稳"
img=
{
Weng
}
order=
{
4
}
subtitle=
{
getItemData
(
"稳定"
)
!
.
title
}
content=
{
getItemData
(
"稳定"
)
!
.
context
}
></
HeroItem
>
<
HeroItem
heroTitle=
"扩"
img=
{
Kuo
}
order=
{
5
}
subtitle=
{
getItemData
(
"高扩展性"
)
!
.
title
}
content=
{
getItemData
(
"高扩展性"
)
!
.
context
}
></
HeroItem
>
</
div
>
</
AppContianer
>
</
AppContianer
>
</
PageLayout
>
</
div
>
</
ScrollView
>
);
...
...
src/vite-env.d.ts
View file @
be20a535
...
...
@@ -11,6 +11,7 @@ interface ImportMetaEnv {
readonly
VITE_CHAIN33_GIT
:
string
readonly
VITE_CHAIN33_DOWNLOAD
:
string
readonly
VITE_BAAS_ONECLIKE
:
string
}
interface
ImportMeta
{
...
...
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