Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
72820481
提交
72820481
authored
5月 30, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
论坛发布登录判断
上级
75dd5070
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
7 行删除
+7
-7
index.tsx
pages/forum/components/publishMessage/index.tsx
+6
-5
index.page.tsx
pages/forum/index.page.tsx
+1
-2
没有找到文件。
pages/forum/components/publishMessage/index.tsx
浏览文件 @
72820481
...
...
@@ -2,11 +2,12 @@ import { PlusOutlined } from "@ant-design/icons";
import
{
Form
,
Input
,
Modal
,
Upload
,
Image
,
Button
,
Row
,
Col
}
from
"antd"
;
import
type
{
RcFile
,
UploadProps
}
from
"antd/es/upload"
;
import
type
{
UploadFile
}
from
"antd/es/upload/interface"
;
import
{
useState
}
from
"react"
;
import
{
use
Context
,
use
State
}
from
"react"
;
import
gApi
from
"~/api"
;
import
NImage
from
"next/image"
;
import
api
from
"./api"
;
import
{
useGeolocation
,
useUser
}
from
"~/lib/hooks"
;
import
{
useGeolocation
}
from
"~/lib/hooks"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
type
Props
=
{
open
:
boolean
;
...
...
@@ -30,7 +31,7 @@ export default function PublishMessage(props: Props) {
const
[
fileList
,
setFileList
]
=
useState
<
UploadFile
[]
>
([]);
const
[
showLoading
,
setShowLoad
]
=
useState
(
false
);
const
[
form
]
=
Form
.
useForm
();
const
user
=
useUser
(
);
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
position
=
useGeolocation
();
//预览关闭
...
...
@@ -88,9 +89,9 @@ export default function PublishMessage(props: Props) {
.
publish
({
lat
:
position
?.
position
?.
lat
,
//纬度
lon
:
position
?.
position
?.
lng
,
//经度
title
:
''
,
//标题
title
:
""
,
//标题
description
:
values
.
description
,
//描述
userId
:
user
!
.
id
,
//用户id
userId
:
user
Info
!
.
id
,
//用户id
mediaVO
:
{
//发布图片
//@ts-ignore
...
...
pages/forum/index.page.tsx
浏览文件 @
72820481
...
...
@@ -16,8 +16,7 @@ import { RightOutlined } from "@ant-design/icons";
import
{
useContext
,
useEffect
,
useState
}
from
"react"
;
import
PublishMessage
from
"./components/publishMessage"
;
import
api
,
{
ByDynamicParams
,
Dynamic
}
from
"./api"
;
import
InfiniteScroll
from
"react-infinite-scroll-component"
;
import
{
useUser
}
from
"~/lib/hooks"
;
import
InfiniteScroll
from
"react-infinite-scroll-component"
import
{
UserContext
}
from
"~/lib/userProvider"
;
interface
Item
extends
Dynamic
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论