Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
b906ce6c
提交
b906ce6c
authored
5月 25, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
加盟入驻模态框开发
上级
171c9a5f
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
122 行增加
和
5 行删除
+122
-5
index.tsx
components/NavHeader/index.tsx
+23
-5
index.ts
components/NavHeader/joinModal/api/index.ts
+17
-0
img.png
components/NavHeader/joinModal/assets/img.png
+0
-0
index.module.scss
components/NavHeader/joinModal/index.module.scss
+31
-0
index.tsx
components/NavHeader/joinModal/index.tsx
+51
-0
没有找到文件。
components/NavHeader/index.tsx
浏览文件 @
b906ce6c
...
...
@@ -6,6 +6,7 @@ import { useRouter } from "next/router";
import
LoginModal
from
"~/components/loginModal"
;
import
{
useUser
}
from
"~/lib/hooks"
;
import
PublishModal
from
"./publishModal"
;
import
JoinModal
from
"./joinModal"
;
const
items
:
TabsProps
[
"items"
]
=
[
{
...
...
@@ -40,7 +41,7 @@ const items: TabsProps["items"] = [
export
default
function
NavHeader
()
{
const
router
=
useRouter
();
const
[
currentPath
,
setCurrentPath
]
=
useState
(
''
);
const
[
currentPath
,
setCurrentPath
]
=
useState
(
""
);
const
user
=
useUser
();
useEffect
(()
=>
{
...
...
@@ -48,7 +49,6 @@ export default function NavHeader() {
console
.
log
(
"currentHash"
,
currentPath
);
},
[
router
.
route
]);
const
onChange
=
(
key
:
string
)
=>
{
router
.
push
(
key
);
};
...
...
@@ -64,6 +64,8 @@ export default function NavHeader() {
setPpenLoginModal
(
false
);
};
const
[
openJoinModal
,
setOpenJoinModal
]
=
useState
(
false
);
//加盟modal
return
(
<
div
className=
{
styles
.
navHeader
}
>
<
div
className=
{
styles
.
nav
}
>
...
...
@@ -82,11 +84,16 @@ export default function NavHeader() {
>
+ 发布需求
</
Button
>
<
Button
className=
{
styles
.
btn2
}
>
加盟入驻
</
Button
>
<
Button
className=
{
styles
.
btn2
}
onClick=
{
()
=>
setOpenJoinModal
(
true
)
}
>
加盟入驻
</
Button
>
</
Space
>
{
user
?
(
<
div
className=
{
styles
.
haedImg
}
>
<
Avatar
size=
{
48
}
style=
{
{
background
:
"#fff
"
}
}
></
Avatar
>
<
Avatar
size=
{
36
}
style=
{
{
background
:
"#bdbdbd
"
}
}
></
Avatar
>
</
div
>
)
:
(
<
Button
...
...
@@ -99,7 +106,18 @@ export default function NavHeader() {
)
}
</
div
>
<
LoginModal
open=
{
openLoginModal
}
onCancel=
{
handleCancel
}
></
LoginModal
>
<
PublishModal
open=
{
openPublishModal
}
onCancel=
{
()
=>
{
setOpenPublishModal
(
false
)}
}
></
PublishModal
>
<
PublishModal
open=
{
openPublishModal
}
onCancel=
{
()
=>
{
setOpenPublishModal
(
false
);
}
}
></
PublishModal
>
<
JoinModal
open=
{
openJoinModal
}
onCancel=
{
()
=>
{
setOpenJoinModal
(
false
);
}
}
></
JoinModal
>
</
div
>
);
}
components/NavHeader/joinModal/api/index.ts
0 → 100644
浏览文件 @
b906ce6c
import
request
,
{
Response
}
from
"~/api/request"
export
interface
ListTagResp
{
id
:
number
;
tagName
:
string
;
tagImg
?:
string
;
tagDescription
:
string
;
createTime
:
string
;
}
export
default
{
//加盟标签列表
listTag
:
():
Promise
<
Response
<
Array
<
ListTagResp
>>>
=>
{
return
request
(
'/userapp/cooperation/listTag'
)
}
}
\ No newline at end of file
components/NavHeader/joinModal/assets/img.png
0 → 100644
浏览文件 @
b906ce6c
15.5 KB
components/NavHeader/joinModal/index.module.scss
0 → 100644
浏览文件 @
b906ce6c
.identityBtn
{
box-sizing
:
border-box
;
padding
:
0
5px
;
position
:
absolute
;
bottom
:
0
;
left
:
50%
;
transform
:translate
(
-50
%
,
0
)
;
min-width
:
100%
;
height
:
24px
;
background
:
#e26329
;
border-radius
:
6px
;
opacity
:
0
.95
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
12px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#fff
;
white-space
:
nowrap
;
}
.modal
{
:global
.ant-modal-content
{
border-radius
:
6px
;
.ant-modal-title
{
text-align
:
center
;
}
}
}
components/NavHeader/joinModal/index.tsx
0 → 100644
浏览文件 @
b906ce6c
import
{
Col
,
Modal
,
Row
}
from
"antd"
;
import
Image
from
"next/image"
;
import
styles
from
"./index.module.scss"
;
import
img
from
"./assets/img.png"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
api
,
{
ListTagResp
}
from
"./api"
;
type
Props
=
{
open
?:
boolean
;
onOk
?:
()
=>
void
;
onCancel
?:
()
=>
void
;
};
export
default
function
JoinModal
(
props
:
Props
)
{
const
test
=
[
{
name
:
'飞手培训机构'
,
id
:
0
}
];
const
[
tagList
,
setTagList
]
=
useState
<
ListTagResp
[]
>
([]);
useEffect
(()
=>
{
api
.
listTag
().
then
(
res
=>
{
setTagList
(
res
.
result
||
[]);
})
},
[])
return
(
<
Modal
title=
"申请合作加盟"
open=
{
props
.
open
}
onOk=
{
props
.
onOk
}
onCancel=
{
props
.
onCancel
}
className=
{
styles
.
modal
}
width=
{
460
}
footer=
{
null
}
>
<
Row
style=
{
{
padding
:
"22px 16px 20px 16px"
,
gap
:
"16px 40px"
}
}
>
{
tagList
.
map
((
item
)
=>
{
return
(
<
Col
style=
{
{
cursor
:
"pointer"
,
height
:
100
,
padding
:
0
}
}
>
<
Image
src=
{
img
}
width=
{
100
}
height=
{
100
}
alt=
""
></
Image
>
<
div
className=
{
styles
.
identityBtn
}
>
{
item
.
tagName
}{
">"
}
</
div
>
</
Col
>
);
})
}
</
Row
>
</
Modal
>
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论