Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
0a6d70fb
提交
0a6d70fb
authored
7月 06, 2023
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:eslint-disable
上级
f2ce8723
显示空白字符变更
内嵌
并排
正在显示
53 个修改的文件
包含
210 行增加
和
124 行删除
+210
-124
.eslintrc.json
.eslintrc.json
+7
-3
index.tsx
components/NavHeader/index.tsx
+16
-13
index.ts
components/NavHeader/joinModal/api/index.ts
+2
-1
index.tsx
components/NavHeader/joinModal/index.tsx
+8
-4
index.ts
components/NavHeader/publishModal/api/index.ts
+5
-5
index.tsx
components/NavHeader/publishModal/index.tsx
+8
-3
index.tsx
components/brandSelectSearch/index.tsx
+8
-4
index.tsx
components/contentBox/index.tsx
+4
-2
interface.ts
components/contentBox/interface.ts
+2
-0
index.tsx
components/contentBox/left/index.tsx
+3
-1
styled.tsx
components/contentBox/left/styled.tsx
+1
-0
index.tsx
components/contentBox/right/index.tsx
+2
-0
index.tsx
components/filter/compoents/regionItem/index.tsx
+4
-2
index.tsx
components/filter/compoents/resultItem/index.tsx
+6
-1
index.tsx
components/filter/compoents/typeInfo/index.tsx
+7
-5
index.tsx
components/filter/index.tsx
+26
-26
index.tsx
components/footer/index.tsx
+4
-2
index.tsx
components/layout/index.tsx
+7
-6
index.tsx
components/loginModal/index.tsx
+8
-6
index.ts
components/uploader/api/index.ts
+1
-1
index.tsx
components/uploader/index.tsx
+3
-1
index.tsx
components/wxCodeModal/index.tsx
+7
-4
commonProvider.tsx
lib/commonProvider.tsx
+1
-1
hooks.ts
lib/hooks.ts
+12
-9
userProvider.tsx
lib/userProvider.tsx
+7
-8
validateUtils.ts
lib/validateUtils.ts
+3
-0
index.ts
pages/certification/api/index.ts
+1
-0
index.page.tsx
pages/certification/index.page.tsx
+1
-1
index.tsx
...quipmentLeasing/detail/components/orderForGoods/index.tsx
+2
-0
index.tsx
...ipmentLeasing/detail/components/picture-preview/index.tsx
+2
-0
index.page.tsx
pages/equipmentLeasing/index.page.tsx
+1
-0
[id].page.tsx
pages/flyingHandService/detail/[id].page.tsx
+1
-0
index.tsx
...ervice/examination/components/brushQuestionZone/index.tsx
+6
-6
index.page.tsx
pages/flyingHandService/index.page.tsx
+1
-0
index.tsx
pages/forum/api/index.tsx
+2
-0
index.tsx
pages/forum/components/publishMessage/index.tsx
+1
-0
index.page.tsx
pages/forum/index.page.tsx
+1
-0
index.tsx
pages/home/waterfallFlowBody/components/map/index.tsx
+1
-0
index.page.tsx
...lFlowBody/components/map/moreServicePoints/index.page.tsx
+1
-0
index.tsx
pages/home/waterfallFlowBody/index.tsx
+1
-0
[id].page.tsx
pages/jobServices/detail/[id].page.tsx
+3
-2
index.tsx
pages/jobServices/detail/components/evaluate/index.tsx
+1
-0
index.tsx
pages/jobServices/detail/components/map/index.tsx
+1
-0
index.page.tsx
pages/jobServices/index.page.tsx
+1
-0
[id].page.tsx
pages/mall/detail/[id].page.tsx
+2
-0
index.tsx
pages/mall/detail/components/intentionModal/index.tsx
+1
-0
index.tsx
pages/mall/detail/components/orderForGoods/index.tsx
+1
-0
index.page.tsx
pages/mall/index.page.tsx
+2
-1
index.tsx
...ersonalCenter/leasingOrders/components/payModal/index.tsx
+2
-0
index.tsx
...onalCenter/leasingOrders/components/refundModal/index.tsx
+2
-0
index.page.tsx
pages/personalCenter/leasingOrders/index.page.tsx
+8
-4
index.tsx
pages/projectInfo/components/news/index.tsx
+1
-2
index.page.tsx
pages/projectInfo/index.page.tsx
+1
-0
没有找到文件。
.eslintrc.json
浏览文件 @
0a6d70fb
...
@@ -64,17 +64,21 @@
...
@@ -64,17 +64,21 @@
}
}
}
}
],
],
"@typescript-eslint/no-use-before-define"
:
"warn"
,
"@typescript-eslint/comma-dangle"
:
"off"
,
//
Avoid
conflict
rule
between
Eslint
and
Prettier
"@typescript-eslint/comma-dangle"
:
"off"
,
//
Avoid
conflict
rule
between
Eslint
and
Prettier
"import/prefer-default-export"
:
"off"
,
//
Named
export
is
easier
to
refactor
automatically
"import/prefer-default-export"
:
"off"
,
//
Named
export
is
easier
to
refactor
automatically
"class-methods-use-this"
:
"off"
,
//
_document.tsx
use
render
method
without
`this`
keyword
"class-methods-use-this"
:
"off"
,
//
_document.tsx
use
render
method
without
`this`
keyword
"@typescript-eslint/no-unused-vars"
:
"off"
,
"@typescript-eslint/no-unused-vars"
:
"off"
,
"unused-imports/no-unused-imports"
:
"
error
"
,
"unused-imports/no-unused-imports"
:
"
warn
"
,
"unused-imports/no-unused-vars"
:
[
"unused-imports/no-unused-vars"
:
[
"
error
"
,
"
warn
"
,
{
"argsIgnorePattern"
:
"^_"
}
{
"argsIgnorePattern"
:
"^_"
}
],
],
"jsx-a11y/click-events-have-key-events"
:
"off"
,
"jsx-a11y/click-events-have-key-events"
:
"off"
,
"jsx-a11y/no-static-element-interactions"
:
"off"
"jsx-a11y/no-static-element-interactions"
:
"off"
,
"eqeqeq"
:
"warn"
,
"no-unsafe-optional-chaining"
:
"warn"
,
"no-param-reassign"
:
"warn"
}
}
}
}
]
]
...
...
components/NavHeader/index.tsx
浏览文件 @
0a6d70fb
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
Avatar
,
Button
,
Dropdown
,
Space
,
Tabs
}
from
'antd'
;
import
{
Avatar
,
Button
,
Dropdown
,
Space
,
Tabs
}
from
'antd'
;
import
type
{
TabsProps
}
from
'antd'
;
import
type
{
TabsProps
}
from
'antd'
;
import
styles
from
'./index.module.scss'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
LoginModal
from
'~/components/loginModal'
;
import
LoginModal
from
'~/components/loginModal'
;
import
PublishModal
from
'./publishModal'
;
import
JoinModal
from
'./joinModal'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
styles
from
'./index.module.scss'
;
import
JoinModal
from
'./joinModal'
;
import
PublishModal
from
'./publishModal'
;
const
items
:
TabsProps
[
'items'
]
=
[
const
items
:
TabsProps
[
'items'
]
=
[
{
{
key
:
'/home'
,
key
:
'/home'
,
...
@@ -57,23 +60,23 @@ export default function NavHeader(props: Props) {
...
@@ -57,23 +60,23 @@ export default function NavHeader(props: Props) {
}
}
},
[
router
.
route
]);
},
[
router
.
route
]);
//导航更改
//
导航更改
const
onChange
=
(
key
:
string
)
=>
{
const
onChange
=
(
key
:
string
)
=>
{
router
.
push
(
key
);
router
.
push
(
key
);
};
};
//退出登录
//
退出登录
const
onLogout
=
()
=>
{
const
onLogout
=
()
=>
{
logout
();
logout
();
};
};
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//登录modal
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//
登录modal
const
[
openPublishModal
,
setOpenPublishModal
]
=
useState
(
false
);
//发布modal
const
[
openPublishModal
,
setOpenPublishModal
]
=
useState
(
false
);
//
发布modal
const
[
openJoinModal
,
setOpenJoinModal
]
=
useState
(
false
);
//加盟modal
const
[
openJoinModal
,
setOpenJoinModal
]
=
useState
(
false
);
//
加盟modal
//发布按钮事件
//
发布按钮事件
function
onPublish
()
{
function
onPublish
()
{
//登录判断
//
登录判断
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
setOpenLoginModal
(
true
);
setOpenLoginModal
(
true
);
}
else
{
}
else
{
...
@@ -81,9 +84,9 @@ export default function NavHeader(props: Props) {
...
@@ -81,9 +84,9 @@ export default function NavHeader(props: Props) {
}
}
}
}
//加盟按钮事件
//
加盟按钮事件
function
onJoin
()
{
function
onJoin
()
{
//登录判断
//
登录判断
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
setOpenLoginModal
(
true
);
setOpenLoginModal
(
true
);
}
else
{
}
else
{
...
@@ -91,7 +94,7 @@ export default function NavHeader(props: Props) {
...
@@ -91,7 +94,7 @@ export default function NavHeader(props: Props) {
}
}
}
}
//从其它组件通知需要登录
//
从其它组件通知需要登录
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
needLogin
)
{
if
(
needLogin
)
{
setOpenLoginModal
(
true
);
setOpenLoginModal
(
true
);
...
...
components/NavHeader/joinModal/api/index.ts
浏览文件 @
0a6d70fb
...
@@ -8,8 +8,9 @@ export interface ListTagResp {
...
@@ -8,8 +8,9 @@ export interface ListTagResp {
createTime
:
string
;
createTime
:
string
;
}
}
// eslint-disable-next-line import/no-anonymous-default-export
export
default
{
export
default
{
//加盟标签列表
//
加盟标签列表
listTag
:
():
Promise
<
Response
<
Array
<
ListTagResp
>>>
=>
{
listTag
:
():
Promise
<
Response
<
Array
<
ListTagResp
>>>
=>
{
return
request
(
'/userapp/cooperation/listTag'
);
return
request
(
'/userapp/cooperation/listTag'
);
},
},
...
...
components/NavHeader/joinModal/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
Col
,
Modal
,
Row
}
from
'antd'
;
import
{
Col
,
Modal
,
Row
}
from
'antd'
;
import
Image
from
'next/image'
;
import
Image
from
'next/image'
;
import
styles
from
'./index.module.scss'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
api
,
{
ListTagResp
}
from
'./api'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
commonApi
from
'~/api'
;
import
commonApi
from
'~/api'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
api
,
{
ListTagResp
}
from
'./api'
;
import
styles
from
'./index.module.scss'
;
const
imgs
=
[
const
imgs
=
[
require
(
'./assets/生产制造商.png'
),
require
(
'./assets/生产制造商.png'
),
...
...
components/NavHeader/publishModal/api/index.ts
浏览文件 @
0a6d70fb
...
@@ -6,11 +6,11 @@ export interface TypeResp {
...
@@ -6,11 +6,11 @@ export interface TypeResp {
}
}
export
interface
PublishParams
{
export
interface
PublishParams
{
publishPhone
:
number
;
//手机号
publishPhone
:
number
;
//
手机号
publishName
:
string
;
//发布名称
publishName
:
string
;
//
发布名称
requirementTypeId
:
number
;
//需求类型
requirementTypeId
:
number
;
//
需求类型
requireDescription
:
string
;
//需求描述
requireDescription
:
string
;
//
需求描述
provinceCode
?:
string
;
//省编码
provinceCode
?:
string
;
//
省编码
}
}
export
default
{
export
default
{
...
...
components/NavHeader/publishModal/index.tsx
浏览文件 @
0a6d70fb
import
{
Button
,
Form
,
Input
,
Modal
,
Select
}
from
'antd'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Form
,
Input
,
Modal
,
Select
}
from
'antd'
;
import
{
CommonContext
}
from
'~/lib/commonProvider'
;
import
{
CommonContext
}
from
'~/lib/commonProvider'
;
import
{
useGeolocation
}
from
'~/lib/hooks'
;
import
{
useGeolocation
}
from
'~/lib/hooks'
;
import
{
phoneNumber
}
from
'~/lib/validateUtils'
;
import
api
,
{
PublishParams
,
TypeResp
}
from
'./api'
;
import
api
,
{
PublishParams
,
TypeResp
}
from
'./api'
;
import
styles
from
'./index.module.scss'
;
import
styles
from
'./index.module.scss'
;
import
{
phoneNumber
}
from
'~/lib/validateUtils'
;
type
Props
=
{
type
Props
=
{
open
?:
boolean
;
open
?:
boolean
;
...
@@ -12,7 +15,7 @@ type Props = {
...
@@ -12,7 +15,7 @@ type Props = {
onCancel
?:
()
=>
void
;
onCancel
?:
()
=>
void
;
};
};
export
default
function
PublishModal
(
props
:
Props
)
{
export
default
function
PublishModal
(
props
:
Props
)
{
const
[
types
,
setTypes
]
=
useState
<
Array
<
TypeResp
>>
([]);
//需求类型
const
[
types
,
setTypes
]
=
useState
<
Array
<
TypeResp
>>
([]);
//
需求类型
const
[
params
,
setParams
]
=
useState
<
PublishParams
>
({
const
[
params
,
setParams
]
=
useState
<
PublishParams
>
({
publishName
:
''
,
publishName
:
''
,
publishPhone
:
-
1
,
publishPhone
:
-
1
,
...
@@ -31,6 +34,7 @@ export default function PublishModal(props: Props) {
...
@@ -31,6 +34,7 @@ export default function PublishModal(props: Props) {
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
'Success:'
,
values
);
console
.
log
(
'Success:'
,
values
);
// eslint-disable-next-line no-param-reassign
values
.
publishPhone
=
Number
(
values
.
publishPhone
);
values
.
publishPhone
=
Number
(
values
.
publishPhone
);
api
api
.
publish
({
.
publish
({
...
@@ -40,6 +44,7 @@ export default function PublishModal(props: Props) {
...
@@ -40,6 +44,7 @@ export default function PublishModal(props: Props) {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
'200'
)
{
if
(
res
.
code
===
'200'
)
{
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
props
.
onCancel
&&
props
.
onCancel
();
props
.
onCancel
&&
props
.
onCancel
();
window
.
messageApi
.
success
(
'发布成功'
);
window
.
messageApi
.
success
(
'发布成功'
);
setReloadRequirements
(
!
reloadRequirements
);
setReloadRequirements
(
!
reloadRequirements
);
...
...
components/brandSelectSearch/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
'./index.scss'
;
import
'./index.scss'
;
import
{
pinyin
}
from
'pinyin-pro'
;
import
{
Select
}
from
'antd'
;
import
{
Select
}
from
'antd'
;
import
{
pinyin
}
from
'pinyin-pro'
;
// 搜索列表的类型
// 搜索列表的类型
interface
searchColumns
{
interface
searchColumns
{
...
@@ -49,12 +51,14 @@ const BrandSelectSearch: React.FC<propType> = (props) => {
...
@@ -49,12 +51,14 @@ const BrandSelectSearch: React.FC<propType> = (props) => {
if
(
!
columns
.
some
((
i
)
=>
i
.
type
===
'Alphabet'
))
return
;
if
(
!
columns
.
some
((
i
)
=>
i
.
type
===
'Alphabet'
))
return
;
// 获取字母列表
// 获取字母列表
const
options
=
columns
.
find
((
i
)
=>
i
.
type
===
'Alphabet'
)?.
options
;
const
options
=
columns
.
find
((
i
)
=>
i
.
type
===
'Alphabet'
)?.
options
;
var
_options
;
let
_options
;
var
temp
=
new
Set
(
const
temp
=
new
Set
(
(
_options
=
options
)
===
null
||
_options
===
void
0
(
_options
=
options
)
===
null
||
_options
===
void
0
?
void
0
?
void
0
:
_options
.
map
(
function
(
i
)
{
:
_options
.
map
(
function
(
i
)
{
var
_pinyin
,
_pinyin$at
,
_pinyin$at$at
;
let
_pinyin
;
let
_pinyin$at
;
let
_pinyin$at$at
;
return
(
_pinyin
=
pinyin
(
i
.
label
,
{
return
(
_pinyin
=
pinyin
(
i
.
label
,
{
toneType
:
'none'
,
toneType
:
'none'
,
type
:
'array'
,
type
:
'array'
,
...
...
components/contentBox/index.tsx
浏览文件 @
0a6d70fb
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Box
}
from
'./styled'
;
import
{
BoxProps
}
from
'./interface'
;
import
Left
from
'./left'
;
import
Left
from
'./left'
;
import
Right
from
'./right'
;
import
Right
from
'./right'
;
import
{
BoxProps
}
from
'./interface'
;
import
{
Box
}
from
'./styled'
;
export
default
function
ContentBox
(
props
:
BoxProps
)
{
export
default
function
ContentBox
(
props
:
BoxProps
)
{
return
(
return
(
<
Box
>
<
Box
>
...
...
components/contentBox/interface.ts
浏览文件 @
0a6d70fb
...
@@ -13,6 +13,7 @@ export interface WaterfallType {
...
@@ -13,6 +13,7 @@ export interface WaterfallType {
}[];
}[];
pagination
?:
JSX
.
Element
;
pagination
?:
JSX
.
Element
;
}
}
// eslint-disable-next-line @typescript-eslint/naming-convention
export
interface
leftBoxProps
{
export
interface
leftBoxProps
{
boxIndex
:
number
;
boxIndex
:
number
;
leftRenderDom
?:
DomType
;
leftRenderDom
?:
DomType
;
...
@@ -27,6 +28,7 @@ export interface leftBoxProps {
...
@@ -27,6 +28,7 @@ export interface leftBoxProps {
};
};
};
};
}
}
// eslint-disable-next-line @typescript-eslint/naming-convention
export
interface
rightBoxProps
{
export
interface
rightBoxProps
{
rightRenderDom
:
DomType
;
rightRenderDom
:
DomType
;
}
}
...
...
components/contentBox/left/index.tsx
浏览文件 @
0a6d70fb
import
React
,
{
useEffect
}
from
'react'
;
import
React
from
'react'
;
import
{
Empty
}
from
'antd'
;
import
{
Empty
}
from
'antd'
;
import
{
LeftBox
,
Box
,
WaterfallBox
}
from
'./styled'
;
import
{
LeftBox
,
Box
,
WaterfallBox
}
from
'./styled'
;
import
{
leftBoxProps
}
from
'../interface'
;
import
{
leftBoxProps
}
from
'../interface'
;
...
...
components/contentBox/left/styled.tsx
浏览文件 @
0a6d70fb
import
styled
from
'styled-components'
;
import
styled
from
'styled-components'
;
export
interface
BoxProps
{
export
interface
BoxProps
{
index
:
number
;
index
:
number
;
leftcontentstyle
?:
{
leftcontentstyle
?:
{
...
...
components/contentBox/right/index.tsx
浏览文件 @
0a6d70fb
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Box
}
from
'./styled'
;
import
{
Box
}
from
'./styled'
;
import
{
rightBoxProps
}
from
'../interface'
;
import
{
rightBoxProps
}
from
'../interface'
;
export
default
function
Right
(
props
:
rightBoxProps
)
{
export
default
function
Right
(
props
:
rightBoxProps
)
{
const
{
rightRenderDom
}
=
props
;
const
{
rightRenderDom
}
=
props
;
return
<
Box
>
{
rightRenderDom
.
columns
.
map
((
item
)
=>
item
.
element
)
}
</
Box
>;
return
<
Box
>
{
rightRenderDom
.
columns
.
map
((
item
)
=>
item
.
element
)
}
</
Box
>;
...
...
components/filter/compoents/regionItem/index.tsx
浏览文件 @
0a6d70fb
import
{
Space
,
Select
}
from
'antd'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
styles
from
'../../index.module.scss'
;
import
{
Space
,
Select
}
from
'antd'
;
import
api
,
{
RegionResp
}
from
'../../api'
;
import
api
,
{
RegionResp
}
from
'../../api'
;
import
styles
from
'../../index.module.scss'
;
type
Props
=
{
type
Props
=
{
onChange
:
(
item
:
RegionResp
)
=>
void
;
onChange
:
(
item
:
RegionResp
)
=>
void
;
...
...
components/filter/compoents/resultItem/index.tsx
浏览文件 @
0a6d70fb
import
React
from
'react'
;
import
{
Space
,
Tag
}
from
'antd'
;
import
{
Space
,
Tag
}
from
'antd'
;
// eslint-disable-next-line import/no-cycle
import
{
FilterResult
}
from
'../..'
;
import
{
FilterResult
}
from
'../..'
;
import
styles
from
'../../index.module.scss'
;
import
{
InfoList
}
from
'../../api'
;
import
{
InfoList
}
from
'../../api'
;
import
styles
from
'../../index.module.scss'
;
type
Props
=
{
type
Props
=
{
data
:
FilterResult
;
data
:
FilterResult
;
onDel
:
(
key
:
string
|
number
)
=>
void
;
onDel
:
(
key
:
string
|
number
)
=>
void
;
...
...
components/filter/compoents/typeInfo/index.tsx
浏览文件 @
0a6d70fb
import
{
Space
,
Button
,
Select
,
Collapse
}
from
'antd'
;
import
styles
from
'../../index.module.scss'
;
import
api
,
{
FilterOptionResp
,
InfoList
}
from
'../../api'
;
import
{
useState
,
useEffect
}
from
'react'
;
import
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Button
,
Collapse
}
from
'antd'
;
import
{
FilterOptionResp
,
InfoList
}
from
'../../api'
;
import
styles
from
'../../index.module.scss'
;
type
Props
=
{
type
Props
=
{
onChange
:
(
id
:
FilterOptionResp
)
=>
void
;
onChange
:
(
id
:
FilterOptionResp
)
=>
void
;
typeName
:
string
;
typeName
:
string
;
...
@@ -19,11 +21,11 @@ export default function CategoryItem(props: Props) {
...
@@ -19,11 +21,11 @@ export default function CategoryItem(props: Props) {
const
onClick
=
(
item
:
FilterOptionResp
)
=>
{
const
onClick
=
(
item
:
FilterOptionResp
)
=>
{
props
.
onChange
({
props
.
onChange
({
id
:
item
.
id
,
id
:
item
.
id
,
name
:
`
${
props
.
typeName
}
:
`
+
item
.
name
,
name
:
`
${
props
.
typeName
}
:
${
item
.
name
}
`
,
});
});
};
};
const
showCount
=
9
;
//展示数量
const
showCount
=
9
;
//
展示数量
return
(
return
(
<
div
className=
{
styles
.
filterItem
}
>
<
div
className=
{
styles
.
filterItem
}
>
...
...
components/filter/index.tsx
浏览文件 @
0a6d70fb
import
{
FilterOptionResp
,
RegionResp
}
from
'./api'
;
import
ResultItem
from
'./compoents/resultItem'
;
import
RegionItem
from
'./compoents/regionItem'
;
import
styles
from
'./index.module.scss'
;
import
React
,
{
useEffect
,
useState
,
forwardRef
,
useImperativeHandle
,
Ref
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
forwardRef
,
useImperativeHandle
,
Ref
}
from
'react'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
api
,
{
FilterOptionResp
,
TypesResp
,
InfoList
}
from
'./api'
;
import
RegionItem
from
'./compoents/regionItem'
;
// eslint-disable-next-line import/no-cycle
import
ResultItem
from
'./compoents/resultItem'
;
import
TypeInfo
from
'./compoents/typeInfo'
;
import
TypeInfo
from
'./compoents/typeInfo'
;
import
api
,
{
TypesResp
,
InfoList
}
from
'./api
'
;
import
styles
from
'./index.module.scss
'
;
export
type
AdapterResult
=
{
export
type
AdapterResult
=
{
categoryId
?:
any
[];
categoryId
?:
any
[];
...
@@ -18,29 +20,29 @@ export type FilterResult = {
...
@@ -18,29 +20,29 @@ export type FilterResult = {
};
};
type
Props
=
{
type
Props
=
{
types
:
string
[];
//需要包含的筛选条件项
types
:
string
[];
//
需要包含的筛选条件项
showResultItem
:
Boolean
;
//显示结果栏
showResultItem
:
Boolean
;
//
显示结果栏
onChange
:
(
onChange
:
(
filterResult
:
FilterResult
,
filterResult
:
FilterResult
,
adapterFilterResult
:
AdapterResult
,
//适配器,直接用于接口请求
adapterFilterResult
:
AdapterResult
,
//
适配器,直接用于接口请求
)
=>
void
;
//筛选条件更改事件
)
=>
void
;
//
筛选条件更改事件
};
};
const
Filter
=
(
props
:
Props
,
ref
:
Ref
<
any
>
)
=>
{
const
Filter
=
(
props
:
Props
,
ref
:
Ref
<
any
>
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
useImperativeHandle
(
ref
,
()
=>
({
useImperativeHandle
(
ref
,
()
=>
({
clearRouter
:
clearRouter
,
clearRouter
,
}));
}));
const
[
result
,
setResult
]
=
useState
<
FilterResult
>
({});
const
[
result
,
setResult
]
=
useState
<
FilterResult
>
({});
const
onChange
=
(
item
:
FilterOptionResp
,
type
:
string
)
=>
{
const
onChange
=
(
item
:
FilterOptionResp
,
type
:
string
)
=>
{
clearRouter
();
clearRouter
();
le
t
data
:
{
[
key
:
string
]:
FilterOptionResp
[]
|
FilterOptionResp
}
=
{};
cons
t
data
:
{
[
key
:
string
]:
FilterOptionResp
[]
|
FilterOptionResp
}
=
{};
if
(
type
===
'categoryId'
)
{
if
(
type
===
'categoryId'
)
{
if
(
result
.
categoryId
)
{
if
(
result
.
categoryId
)
{
data
[
type
]
=
[...
result
.
categoryId
,
item
];
data
[
type
]
=
[...
result
.
categoryId
,
item
];
const
map
=
new
Map
();
const
map
=
new
Map
();
//去重
//
去重
data
[
type
]
=
(
data
[
type
]
as
InfoList
[]).
filter
((
v
)
=>
!
map
.
has
(
v
.
id
)
&&
map
.
set
(
v
.
id
,
1
));
data
[
type
]
=
(
data
[
type
]
as
InfoList
[]).
filter
((
v
)
=>
!
map
.
has
(
v
.
id
)
&&
map
.
set
(
v
.
id
,
1
));
}
else
{
}
else
{
data
[
type
]
=
[
item
];
data
[
type
]
=
[
item
];
...
@@ -66,22 +68,20 @@ const Filter = (props: Props, ref: Ref<any>) => {
...
@@ -66,22 +68,20 @@ const Filter = (props: Props, ref: Ref<any>) => {
};
};
const
onDel
=
(
key
:
string
|
number
)
=>
{
const
onDel
=
(
key
:
string
|
number
)
=>
{
clearRouter
();
clearRouter
();
console
.
log
(
key
);
//
console.log(key);
if
(
Object
.
prototype
.
toString
.
call
(
key
)
===
'[object String]'
)
{
if
(
Object
.
prototype
.
toString
.
call
(
key
)
===
'[object String]'
)
{
//@ts-ignore
//
@ts-ignore
delete
result
[
key
];
delete
result
[
key
];
}
else
{
}
else
if
(
result
.
categoryId
?.
length
!
===
1
)
{
if
(
result
.
categoryId
?.
length
!
===
1
)
{
result
.
categoryId
=
undefined
;
result
.
categoryId
=
undefined
;
}
else
if
(
result
.
categoryId
?.
length
!
>=
2
)
{
}
else
if
(
result
.
categoryId
?.
length
!
>=
2
)
{
result
.
categoryId
?.
map
((
item
,
index
)
=>
{
result
.
categoryId
?.
forEach
((
item
,
index
)
=>
{
if
(
item
.
id
===
key
)
{
if
(
item
.
id
===
key
)
{
result
.
categoryId
?.
splice
(
index
,
1
);
result
.
categoryId
?.
splice
(
index
,
1
);
}
}
});
});
}
}
}
setResult
({
setResult
({
...
result
,
...
result
,
});
});
...
@@ -95,21 +95,21 @@ const Filter = (props: Props, ref: Ref<any>) => {
...
@@ -95,21 +95,21 @@ const Filter = (props: Props, ref: Ref<any>) => {
type
:
routerList
.
indexOf
(
router
.
pathname
)
+
1
,
type
:
routerList
.
indexOf
(
router
.
pathname
)
+
1
,
});
});
setTypeInfo
(
res
.
result
);
setTypeInfo
(
res
.
result
);
//首页跳转自定筛选选中
//
首页跳转自定筛选选中
le
t
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
cons
t
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
if
(
Object
.
keys
(
router
.
query
).
length
)
{
if
(
Object
.
keys
(
router
.
query
).
length
)
{
//获取类型的id
//
获取类型的id
const
idOfType
=
res
.
result
const
idOfType
=
res
.
result
?.
map
((
item
)
=>
item
.
categoriesInfoListDTO
)
?.
map
((
item
)
=>
item
.
categoriesInfoListDTO
)
.
flat
()
.
flat
()
.
filter
((
item
)
=>
item
&&
item
.
id
===
Number
(
queryVal
[
'categoryId'
]
))[
0
]?.
directoryId
;
.
filter
((
item
)
=>
item
&&
item
.
id
===
Number
(
queryVal
.
categoryId
))[
0
]?.
directoryId
;
//获取类型的名称然后拼接
//
获取类型的名称然后拼接
const
TypeName
=
res
.
result
?.
filter
((
item
)
=>
item
.
directoryId
===
idOfType
)[
0
]?.
name
;
const
TypeName
=
res
.
result
?.
filter
((
item
)
=>
item
.
directoryId
===
idOfType
)[
0
]?.
name
;
onChange
(
onChange
(
{
{
id
:
Number
(
queryVal
[
'categoryId'
]
),
id
:
Number
(
queryVal
.
categoryId
),
name
:
`
${
TypeName
?
TypeName
+
':'
+
queryVal
.
name
:
queryVal
.
name
}
`
,
name
:
`
${
TypeName
?
`
${
TypeName
}
:
${
queryVal
.
name
}
`
:
queryVal
.
name
}
`
,
},
},
'categoryId'
,
'categoryId'
,
);
);
...
@@ -139,7 +139,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
...
@@ -139,7 +139,7 @@ const Filter = (props: Props, ref: Ref<any>) => {
key=
{
item
.
directoryId
}
key=
{
item
.
directoryId
}
typeName=
{
item
.
name
}
typeName=
{
item
.
name
}
dataValue=
{
item
.
categoriesInfoListDTO
}
dataValue=
{
item
.
categoriesInfoListDTO
}
onChange=
{
(
item
:
FilterOptionResp
)
=>
onChange
(
item
,
'categoryId'
)
}
onChange=
{
(
e
:
FilterOptionResp
)
=>
onChange
(
e
,
'categoryId'
)
}
></
TypeInfo
>
></
TypeInfo
>
))
}
))
}
{
props
.
showResultItem
&&
<
ResultItem
data=
{
result
}
onDel=
{
onDel
}
></
ResultItem
>
}
{
props
.
showResultItem
&&
<
ResultItem
data=
{
result
}
onDel=
{
onDel
}
></
ResultItem
>
}
...
...
components/footer/index.tsx
浏览文件 @
0a6d70fb
import
styles
from
'./index.module.scss'
;
import
{
Image
}
from
'antd'
;
import
{
Image
}
from
'antd'
;
import
errImg
from
'~/assets/errImg'
;
import
errImg
from
'~/assets/errImg'
;
import
styles
from
'./index.module.scss'
;
const
qrcodeList
=
[
const
qrcodeList
=
[
{
{
img
:
'/assets/xiaochengxu.png'
,
img
:
'/assets/xiaochengxu.png'
,
...
@@ -30,7 +32,7 @@ export default function Footer() {
...
@@ -30,7 +32,7 @@ export default function Footer() {
return
(
return
(
<
div
className=
{
styles
.
footer
}
>
<
div
className=
{
styles
.
footer
}
>
<
div
className=
{
styles
.
footerBox
}
>
<
div
className=
{
styles
.
footerBox
}
>
{
/*
<div className={styles.logo}></div>
*/
}
{
/*
<div className={styles.logo}></div>
*/
}
<
div
className=
{
styles
.
qrcodeList
}
>
<
div
className=
{
styles
.
qrcodeList
}
>
{
qrcodeList
.
map
((
item
,
i
)
=>
{
{
qrcodeList
.
map
((
item
,
i
)
=>
{
return
(
return
(
...
...
components/layout/index.tsx
浏览文件 @
0a6d70fb
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Layout
,
Space
}
from
'antd'
;
import
{
Layout
,
Space
}
from
'antd'
;
import
NavHeader
from
'~/components/NavHeader'
;
import
FooterView
from
'~/components/footer'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
FooterView
from
'~/components/footer'
;
import
NavHeader
from
'~/components/NavHeader'
;
import
styles
from
'./index.module.scss'
;
import
styles
from
'./index.module.scss'
;
const
{
Header
,
Footer
,
Content
}
=
Layout
;
const
{
Header
,
Footer
,
Content
}
=
Layout
;
//底部栏固定定位
//
底部栏固定定位
const
includesPage
=
[
'/home'
,
'/flyingHandService/detail/[id]'
];
const
includesPage
=
[
'/home'
,
'/flyingHandService/detail/[id]'
];
const
homeStyle
:
React
.
CSSProperties
=
{
const
homeStyle
:
React
.
CSSProperties
=
{
...
@@ -50,9 +53,7 @@ export default function LayoutView(props: Props) {
...
@@ -50,9 +53,7 @@ export default function LayoutView(props: Props) {
const
router
=
useRouter
();
const
router
=
useRouter
();
return
(
return
(
<
Space
direction=
'vertical'
style=
{
{
minWidth
:
'100%'
}
}
size=
{
[
0
,
48
]
}
>
<
Space
direction=
'vertical'
style=
{
{
minWidth
:
'100%'
}
}
size=
{
[
0
,
48
]
}
>
<
Layout
<
Layout
style=
{
{
minHeight
:
'100vh'
,
backgroundColor
:
'#F8F8F8'
,
...
props
.
layoutStyle
}
}
>
style=
{
Object
.
assign
({
minHeight
:
'100vh'
,
backgroundColor
:
'#F8F8F8'
},
props
.
layoutStyle
)
}
>
<
Header
style=
{
headerStyle
}
>
<
Header
style=
{
headerStyle
}
>
<
NavHeader
style=
{
props
.
headerStyle
}
/>
<
NavHeader
style=
{
props
.
headerStyle
}
/>
</
Header
>
</
Header
>
...
...
components/loginModal/index.tsx
浏览文件 @
0a6d70fb
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Image
}
from
'antd'
;
import
{
Modal
,
Image
}
from
'antd'
;
import
api
from
'~/api'
;
import
api
from
'~/api'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
import
errImg
from
'~/assets/errImg'
;
import
errImg
from
'~/assets/errImg'
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
type
Props
=
{
type
Props
=
{
open
:
boolean
;
open
:
boolean
;
...
@@ -37,14 +39,14 @@ export default function LoginModal(props: Props) {
...
@@ -37,14 +39,14 @@ export default function LoginModal(props: Props) {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
randomLoginCode
)
{
if
(
randomLoginCode
)
{
//获取登录码
//
获取登录码
api
api
.
getAppletQRCode
({
.
getAppletQRCode
({
randomLoginCode
,
randomLoginCode
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
'200'
)
{
if
(
res
.
code
==
'200'
)
{
setQrCode
(
'data:image/png;base64,'
+
res
.
result
||
''
);
setQrCode
(
`data:image/png;base64,
${
res
.
result
}
`
||
''
);
}
else
{
}
else
{
window
.
messageApi
.
error
(
'获取登录二维码失败'
);
window
.
messageApi
.
error
(
'获取登录二维码失败'
);
}
}
...
@@ -58,7 +60,7 @@ export default function LoginModal(props: Props) {
...
@@ -58,7 +60,7 @@ export default function LoginModal(props: Props) {
const
handle
=
setInterval
(()
=>
{
const
handle
=
setInterval
(()
=>
{
api
api
.
getLoginInfo
({
.
getLoginInfo
({
randomLoginCode
:
randomLoginCode
,
randomLoginCode
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
'200'
)
{
if
(
res
.
code
===
'200'
)
{
...
@@ -66,8 +68,8 @@ export default function LoginModal(props: Props) {
...
@@ -66,8 +68,8 @@ export default function LoginModal(props: Props) {
setTimeHandle
(
null
);
setTimeHandle
(
null
);
window
.
localStorage
.
setItem
(
'token'
,
res
.
result
.
token
);
window
.
localStorage
.
setItem
(
'token'
,
res
.
result
.
token
);
api
.
userInfo
().
then
((
r
es
)
=>
{
api
.
userInfo
().
then
((
userR
es
)
=>
{
setUserInfo
(
r
es
.
result
);
setUserInfo
(
userR
es
.
result
);
window
.
messageApi
.
success
(
'登录成功'
);
window
.
messageApi
.
success
(
'登录成功'
);
props
.
onCancel
();
props
.
onCancel
();
window
.
location
.
reload
();
window
.
location
.
reload
();
...
...
components/uploader/api/index.ts
浏览文件 @
0a6d70fb
import
{
headers
}
from
'next/dist/client/components/headers'
;
import
request
,
{
Response
}
from
'~/api/request'
;
import
request
,
{
Response
}
from
'~/api/request'
;
// eslint-disable-next-line import/no-anonymous-default-export
export
default
{
export
default
{
uploadFile
:
(
data
:
FormData
):
Promise
<
Response
<
string
>>
=>
uploadFile
:
(
data
:
FormData
):
Promise
<
Response
<
string
>>
=>
request
(
'/pms/upload/breakpoint'
,
'post'
,
data
,
{
headers
:
{},
body
:
data
}),
request
(
'/pms/upload/breakpoint'
,
'post'
,
data
,
{
headers
:
{},
body
:
data
}),
...
...
components/uploader/index.tsx
浏览文件 @
0a6d70fb
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
message
,
Upload
,
UploadProps
}
from
'antd'
;
import
{
message
,
Upload
,
UploadProps
}
from
'antd'
;
import
uploadApi
from
'./api'
;
import
uploadApi
from
'./api'
;
interface
PropsType
{
interface
PropsType
{
...
@@ -9,7 +11,7 @@ interface PropsType {
...
@@ -9,7 +11,7 @@ interface PropsType {
fileUpload
:
boolean
;
// 是否上传到服务器(返回文件流还是返回上传后的地址)
fileUpload
:
boolean
;
// 是否上传到服务器(返回文件流还是返回上传后的地址)
fileLength
?:
number
;
// 最大上传文件数量
fileLength
?:
number
;
// 最大上传文件数量
children
:
React
.
ReactNode
;
// 上传按钮
children
:
React
.
ReactNode
;
// 上传按钮
showUploadList
?:
boolean
;
//是否隐藏上传文件列表
showUploadList
?:
boolean
;
//
是否隐藏上传文件列表
onChange
?:
(
onChange
?:
(
fileList
:
{
fileList
:
{
id
:
number
;
id
:
number
;
...
...
components/wxCodeModal/index.tsx
浏览文件 @
0a6d70fb
import
{
Modal
,
ModalProps
}
from
'antd'
;
import
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
{
Box
}
from
'./styled'
;
import
{
Modal
,
ModalProps
,
Image
}
from
'antd'
;
import
api
from
'~/api'
;
import
api
from
'~/api'
;
import
{
Image
}
from
'antd'
;
import
{
Box
}
from
'./styled'
;
const
WxCodeModal
:
FC
<
ModalProps
>
=
({
open
,
onCancel
})
=>
{
const
WxCodeModal
:
FC
<
ModalProps
>
=
({
open
,
onCancel
})
=>
{
const
[
wxCodeImg
,
setWxCodeImg
]
=
useState
<
string
>
(
''
);
const
[
wxCodeImg
,
setWxCodeImg
]
=
useState
<
string
>
(
''
);
const
getWXCode
=
()
=>
{
const
getWXCode
=
()
=>
{
...
@@ -20,7 +23,7 @@ const WxCodeModal: FC<ModalProps> = ({ open, onCancel }) => {
...
@@ -20,7 +23,7 @@ const WxCodeModal: FC<ModalProps> = ({ open, onCancel }) => {
<
Box
>
<
Box
>
<
div
className=
'title'
>
立即申请合作
</
div
>
<
div
className=
'title'
>
立即申请合作
</
div
>
<
div
className=
'img'
>
<
div
className=
'img'
>
<
Image
src=
{
wxCodeImg
}
width=
{
160
}
height=
{
160
}
/>
<
Image
src=
{
wxCodeImg
}
width=
{
160
}
height=
{
160
}
alt=
{
'图片'
}
/>
</
div
>
</
div
>
<
div
className=
'meta'
>
打开微信扫一扫
</
div
>
<
div
className=
'meta'
>
打开微信扫一扫
</
div
>
</
Box
>
</
Box
>
...
...
lib/commonProvider.tsx
浏览文件 @
0a6d70fb
import
React
,
{
createContext
,
Dispatch
,
SetStateAction
,
useState
}
from
'react'
;
import
React
,
{
createContext
,
Dispatch
,
SetStateAction
,
useState
}
from
'react'
;
export
const
CommonContext
=
createContext
<
{
export
const
CommonContext
=
createContext
<
{
reloadRequirements
:
boolean
;
//更新项目需求列表
reloadRequirements
:
boolean
;
//
更新项目需求列表
setReloadRequirements
:
Dispatch
<
SetStateAction
<
boolean
>>
;
setReloadRequirements
:
Dispatch
<
SetStateAction
<
boolean
>>
;
}
>
({
}
>
({
reloadRequirements
:
false
,
reloadRequirements
:
false
,
...
...
lib/hooks.ts
浏览文件 @
0a6d70fb
// @ts-nocheck
/* eslint-disable */
import
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
export
function
useGeolocation
()
{
export
function
useGeolocation
()
{
...
@@ -17,13 +20,13 @@ export function useGeolocation() {
...
@@ -17,13 +20,13 @@ export function useGeolocation() {
plugins
:
[
'AMap.Geolocation'
,
'AMap.Geocoder'
],
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
plugins
:
[
'AMap.Geolocation'
,
'AMap.Geocoder'
],
// 需要使用的的插件列表,如比例尺'AMap.Scale'等
})
})
.
then
(
async
(
AMap
:
any
)
=>
{
.
then
(
async
(
AMap
:
any
)
=>
{
//用户定位
//
用户定位
const
geolocation
=
new
AMap
.
Geolocation
({
const
geolocation
=
new
AMap
.
Geolocation
({
enableHighAccuracy
:
true
,
//是否使用高精度定位,默认:true
enableHighAccuracy
:
true
,
//
是否使用高精度定位,默认:true
timeout
:
10000
,
//超过10秒后停止定位,默认:5s
timeout
:
10000
,
//
超过10秒后停止定位,默认:5s
position
:
'RB'
,
//定位按钮的停靠位置
position
:
'RB'
,
//
定位按钮的停靠位置
offset
:
[
10
,
20
],
//定位按钮与设置的停靠位置的偏移量,默认:[10, 20]
offset
:
[
10
,
20
],
//
定位按钮与设置的停靠位置的偏移量,默认:[10, 20]
zoomToAccuracy
:
true
,
//定位成功后是否自动调整地图视野到定位点
zoomToAccuracy
:
true
,
//
定位成功后是否自动调整地图视野到定位点
});
});
geolocation
.
getCurrentPosition
(
function
(
status
:
string
,
result
:
any
)
{
geolocation
.
getCurrentPosition
(
function
(
status
:
string
,
result
:
any
)
{
if
(
status
==
'complete'
)
{
if
(
status
==
'complete'
)
{
...
@@ -32,7 +35,7 @@ export function useGeolocation() {
...
@@ -32,7 +35,7 @@ export function useGeolocation() {
onError
(
result
);
onError
(
result
);
}
}
});
});
//解析定位结果
//
解析定位结果
async
function
onComplete
(
data
:
any
)
{
async
function
onComplete
(
data
:
any
)
{
console
.
log
(
'定位成功'
,
data
.
position
);
console
.
log
(
'定位成功'
,
data
.
position
);
setPosition
({
setPosition
({
...
@@ -40,7 +43,7 @@ export function useGeolocation() {
...
@@ -40,7 +43,7 @@ export function useGeolocation() {
address
:
null
,
address
:
null
,
});
});
var
geocoder
=
new
AMap
.
Geocoder
({
const
geocoder
=
new
AMap
.
Geocoder
({
city
:
'全国'
,
// city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
city
:
'全国'
,
// city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
});
});
...
@@ -74,7 +77,7 @@ export function useGeolocation() {
...
@@ -74,7 +77,7 @@ export function useGeolocation() {
},
},
);
);
}
}
//解析定位错误信息
//
解析定位错误信息
async
function
onError
(
data
:
any
)
{
async
function
onError
(
data
:
any
)
{
// message.error(`定位失败
// message.error(`定位失败
// 失败原因排查信息:${data.message}
// 失败原因排查信息:${data.message}
...
...
lib/userProvider.tsx
浏览文件 @
0a6d70fb
import
React
,
{
createContext
,
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
createContext
,
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
;
import
api
,
{
UserInfoResp
}
from
'~/api'
;
import
api
,
{
UserInfoResp
}
from
'~/api'
;
export
const
UserContext
=
createContext
<
{
export
const
UserContext
=
createContext
<
{
...
@@ -22,15 +23,13 @@ type Props = {
...
@@ -22,15 +23,13 @@ type Props = {
};
};
const
UserProvider
=
({
children
}:
Props
)
=>
{
const
UserProvider
=
({
children
}:
Props
)
=>
{
const
[
userInfo
,
setUserInfo
]
=
useState
<
UserInfoResp
|
null
|
undefined
>
(
null
);
const
[
userInfo
,
setUserInfo
]
=
useState
<
UserInfoResp
|
null
|
undefined
>
(
null
);
const
[
needLogin
,
setNeedLogin
]
=
useState
<
Boolean
>
(
false
);
//用于通知登录modal需要打开
const
[
needLogin
,
setNeedLogin
]
=
useState
<
Boolean
>
(
false
);
//
用于通知登录modal需要打开
useEffect
(()
=>
{
useEffect
(()
=>
{
try
{
setUserInfo
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)
||
''
)
||
undefined
);
setUserInfo
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)
||
''
)
||
undefined
);
window
.
setUserInfo
=
setUserInfo
;
window
.
setUserInfo
=
setUserInfo
;
window
.
setNeedLogin
=
setNeedLogin
;
window
.
setNeedLogin
=
setNeedLogin
;
window
.
logout
=
logout
;
window
.
logout
=
logout
;
}
catch
(
e
)
{}
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -39,19 +38,19 @@ const UserProvider = ({ children }: Props) => {
...
@@ -39,19 +38,19 @@ const UserProvider = ({ children }: Props) => {
}
}
},
[
userInfo
]);
},
[
userInfo
]);
//测试登录
//
测试登录
function
testLogin
()
{
function
testLogin
()
{
api
.
testAppletLogin
().
then
((
res
)
=>
{
api
.
testAppletLogin
().
then
((
res
)
=>
{
if
(
res
.
code
==
'200'
)
{
if
(
res
&&
res
.
code
=
==
'200'
)
{
window
.
localStorage
.
setItem
(
'token'
,
res
.
result
?.
token
||
''
);
window
.
localStorage
.
setItem
(
'token'
,
res
.
result
?.
token
||
''
);
api
.
userInfo
().
then
((
r
es
)
=>
{
api
.
userInfo
().
then
((
userR
es
)
=>
{
setUserInfo
(
r
es
.
result
||
undefined
);
setUserInfo
(
userR
es
.
result
||
undefined
);
});
});
}
}
});
});
}
}
//登出
//
登出
function
logout
()
{
function
logout
()
{
localStorage
.
setItem
(
'token'
,
''
);
localStorage
.
setItem
(
'token'
,
''
);
setUserInfo
(
undefined
);
setUserInfo
(
undefined
);
...
...
lib/validateUtils.ts
浏览文件 @
0a6d70fb
// @ts-nocheck
/* eslint-disable */
// 不能输入数字,其他可惜输入
// 不能输入数字,其他可惜输入
export
const
exceptNumber
=
(
val
:
any
)
=>
{
export
const
exceptNumber
=
(
val
:
any
)
=>
{
val
.
target
.
value
=
val
.
target
.
value
.
replace
(
/1
?(\d
|
([
1-9
]\d
+
))(
.
\d
+
)?
$/g
,
''
).
replace
(
/
\s
/g
,
''
);
val
.
target
.
value
=
val
.
target
.
value
.
replace
(
/1
?(\d
|
([
1-9
]\d
+
))(
.
\d
+
)?
$/g
,
''
).
replace
(
/
\s
/g
,
''
);
...
...
pages/certification/api/index.ts
浏览文件 @
0a6d70fb
...
@@ -35,6 +35,7 @@ export interface Paging {
...
@@ -35,6 +35,7 @@ export interface Paging {
TotalRecords
:
number
;
TotalRecords
:
number
;
}
}
// eslint-disable-next-line import/no-anonymous-default-export
export
default
{
export
default
{
// 提交企业认证
// 提交企业认证
companyAuth
(
params
:
CompanyAuthParams
):
Promise
<
Response
<
string
>>
{
companyAuth
(
params
:
CompanyAuthParams
):
Promise
<
Response
<
string
>>
{
...
...
pages/certification/index.page.tsx
浏览文件 @
0a6d70fb
...
@@ -89,7 +89,7 @@ export default function Certification() {
...
@@ -89,7 +89,7 @@ export default function Certification() {
});
});
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
Router
.
query
.
type
==
'back'
)
{
if
(
Router
.
query
.
type
==
=
'back'
)
{
Router
.
back
();
Router
.
back
();
}
else
{
}
else
{
Router
.
push
(
'/'
);
Router
.
push
(
'/'
);
...
...
pages/equipmentLeasing/detail/components/orderForGoods/index.tsx
浏览文件 @
0a6d70fb
...
@@ -8,6 +8,7 @@ import { UserContext } from '~/lib/userProvider';
...
@@ -8,6 +8,7 @@ import { UserContext } from '~/lib/userProvider';
import
api
,
{
UserAddress
,
GetOrderForGoods
}
from
'./api'
;
import
api
,
{
UserAddress
,
GetOrderForGoods
}
from
'./api'
;
import
{
OrderForGoodsBox
}
from
'./styled'
;
import
{
OrderForGoodsBox
}
from
'./styled'
;
// eslint-disable-next-line import/no-cycle
import
{
ShopDetail
}
from
'../../[id].page'
;
import
{
ShopDetail
}
from
'../../[id].page'
;
import
{
GetWebDeviceDetailResult
,
GetWebDeviceWareSkuById
,
GetLeaseGoodsResult
}
from
'../../api'
;
import
{
GetWebDeviceDetailResult
,
GetWebDeviceWareSkuById
,
GetLeaseGoodsResult
}
from
'../../api'
;
...
@@ -35,6 +36,7 @@ export default function OrderForGoods(props: PropsBox) {
...
@@ -35,6 +36,7 @@ export default function OrderForGoods(props: PropsBox) {
const
onChangeValue
=
(
index
:
number
)
=>
{
const
onChangeValue
=
(
index
:
number
)
=>
{
setValue
(
index
);
setValue
(
index
);
};
};
// eslint-disable-next-line consistent-return
const
detailSumbit
=
()
=>
{
const
detailSumbit
=
()
=>
{
if
(
!
list
?.
length
)
return
message
.
warning
(
'暂无地址信息,请前往云享飞添加地址'
);
if
(
!
list
?.
length
)
return
message
.
warning
(
'暂无地址信息,请前往云享飞添加地址'
);
if
(
value
===
-
1
)
return
message
.
warning
(
'请选择地址'
);
if
(
value
===
-
1
)
return
message
.
warning
(
'请选择地址'
);
...
...
pages/equipmentLeasing/detail/components/picture-preview/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
LeftOutlined
,
RightOutlined
}
from
'@ant-design/icons'
;
import
{
LeftOutlined
,
RightOutlined
}
from
'@ant-design/icons'
;
...
@@ -35,6 +36,7 @@ export default function PicturePreview(props: ImagesType) {
...
@@ -35,6 +36,7 @@ export default function PicturePreview(props: ImagesType) {
const
handleSlide
=
(
direction
:
string
)
=>
{
const
handleSlide
=
(
direction
:
string
)
=>
{
// 左侧按钮
// 左侧按钮
if
(
direction
==
'left'
)
{
if
(
direction
==
'left'
)
{
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
moveLeft
==
0
?
setMoveLeft
(
0
)
:
setMoveLeft
((
props
)
=>
props
-
1
);
moveLeft
==
0
?
setMoveLeft
(
0
)
:
setMoveLeft
((
props
)
=>
props
-
1
);
}
else
{
}
else
{
// 右侧按钮
// 右侧按钮
...
...
pages/equipmentLeasing/index.page.tsx
浏览文件 @
0a6d70fb
...
@@ -107,6 +107,7 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -107,6 +107,7 @@ export default function EquipmentLeasing(props: Props) {
});
});
},
[
abort
]);
},
[
abort
]);
// eslint-disable-next-line
const
onFilterChange
=
(
filterResult
:
FilterResult
,
adapterFilterResult
:
AdapterResult
)
=>
{
const
onFilterChange
=
(
filterResult
:
FilterResult
,
adapterFilterResult
:
AdapterResult
)
=>
{
setPageParams
({
setPageParams
({
...
pageParams
,
...
pageParams
,
...
...
pages/flyingHandService/detail/[id].page.tsx
浏览文件 @
0a6d70fb
...
@@ -52,6 +52,7 @@ export default function FlyingDetail() {
...
@@ -52,6 +52,7 @@ export default function FlyingDetail() {
<
Box
>
<
Box
>
<
div
className=
'box'
>
<
div
className=
'box'
>
<
div
className=
'box-body'
>
<
div
className=
'box-body'
>
{
/* eslint-disable-next-line jsx-a11y/media-has-caption */
}
<
video
className=
'body-video'
controls
src=
{
detail
?.
videoUrl
as
string
}
/>
<
video
className=
'body-video'
controls
src=
{
detail
?.
videoUrl
as
string
}
/>
</
div
>
</
div
>
<
div
className=
'box-bottom'
>
<
div
className=
'box-bottom'
>
...
...
pages/flyingHandService/examination/components/brushQuestionZone/index.tsx
浏览文件 @
0a6d70fb
...
@@ -27,12 +27,12 @@ export default function BrushQuestionZone() {
...
@@ -27,12 +27,12 @@ export default function BrushQuestionZone() {
setSkills
(
res
.
result
||
[]);
setSkills
(
res
.
result
||
[]);
});
});
api
.
IndustryFlightSkills
().
then
((
res
)
=>
{
api
.
IndustryFlightSkills
().
then
((
res
)
=>
{
const
list
=
res
.
result
?.
map
((
item
)
=>
{
const
arr
=
res
.
result
?.
map
((
item
)
=>
(
{
item
.
label
=
item
.
skillsName
;
label
:
item
.
skillsName
,
item
.
value
=
item
.
id
;
value
:
item
.
id
,
return
item
;
}))
;
});
// @ts-ignore
setFlightSkillsList
(
list
||
[]);
setFlightSkillsList
(
arr
||
[]);
});
});
},
[]);
},
[]);
return
(
return
(
...
...
pages/flyingHandService/index.page.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
import
{
...
...
pages/forum/api/index.tsx
浏览文件 @
0a6d70fb
...
@@ -56,10 +56,12 @@ export interface ByDynamicResp {
...
@@ -56,10 +56,12 @@ export interface ByDynamicResp {
};
};
mediaVO
:
{
type
:
number
;
url
:
string
};
mediaVO
:
{
type
:
number
;
url
:
string
};
}
}
// eslint-disable-next-line @typescript-eslint/naming-convention
export
interface
dynamicDetail
extends
ByDynamicResp
{
export
interface
dynamicDetail
extends
ByDynamicResp
{
commentAndReplyVO
:
ByDynamicResp
[];
commentAndReplyVO
:
ByDynamicResp
[];
}
}
// eslint-disable-next-line import/no-anonymous-default-export
export
default
{
export
default
{
/**
/**
* 论坛动态列表
* 论坛动态列表
...
...
pages/forum/components/publishMessage/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
{
useContext
,
useState
}
from
'react'
;
import
{
useContext
,
useState
}
from
'react'
;
import
{
Form
,
Input
,
Modal
,
Image
,
Button
,
Row
,
Col
}
from
'antd'
;
import
{
Form
,
Input
,
Modal
,
Image
,
Button
,
Row
,
Col
}
from
'antd'
;
...
...
pages/forum/index.page.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
RightOutlined
}
from
'@ant-design/icons'
;
import
{
RightOutlined
}
from
'@ant-design/icons'
;
...
...
pages/home/waterfallFlowBody/components/map/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
...
...
pages/home/waterfallFlowBody/components/map/moreServicePoints/index.page.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
message
}
from
'antd'
;
import
{
message
}
from
'antd'
;
...
...
pages/home/waterfallFlowBody/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Select
,
Space
}
from
'antd'
;
import
{
Select
,
Space
}
from
'antd'
;
...
...
pages/jobServices/detail/[id].page.tsx
浏览文件 @
0a6d70fb
...
@@ -109,9 +109,10 @@ export default function JobServicesDetail() {
...
@@ -109,9 +109,10 @@ export default function JobServicesDetail() {
formDate
formDate
.
validateFields
()
.
validateFields
()
.
then
(
async
(
values
)
=>
{
.
then
(
async
(
values
)
=>
{
console
.
log
(
values
);
//
console.log(values);
if
(
!
addressContent
)
{
if
(
!
addressContent
)
{
return
message
.
warning
(
'请选择地点'
);
message
.
warning
(
'请选择地点'
);
return
;
}
}
const
res
=
await
api
.
insertOrderTask
({
const
res
=
await
api
.
insertOrderTask
({
address
:
addressContent
.
addressDteail
,
address
:
addressContent
.
addressDteail
,
...
...
pages/jobServices/detail/components/evaluate/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Rate
}
from
'antd'
;
import
{
Rate
}
from
'antd'
;
...
...
pages/jobServices/detail/components/map/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
React
,
{
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
...
...
pages/jobServices/index.page.tsx
浏览文件 @
0a6d70fb
...
@@ -114,6 +114,7 @@ export default function JobServices() {
...
@@ -114,6 +114,7 @@ export default function JobServices() {
});
});
},
[
abort
]);
},
[
abort
]);
// eslint-disable-next-line
const
onFilterChange
=
(
filterResult
:
FilterResult
,
adapterFilterResult
:
AdapterResult
)
=>
{
const
onFilterChange
=
(
filterResult
:
FilterResult
,
adapterFilterResult
:
AdapterResult
)
=>
{
setPageParams
({
setPageParams
({
...
pageParams
,
...
pageParams
,
...
...
pages/mall/detail/[id].page.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
styles
from
'./index.module.scss'
;
import
styles
from
'./index.module.scss'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
...
@@ -13,6 +14,7 @@ import { Swiper, SwiperSlide } from 'swiper/react';
...
@@ -13,6 +14,7 @@ import { Swiper, SwiperSlide } from 'swiper/react';
import
errImg
from
'~/assets/errImg'
;
import
errImg
from
'~/assets/errImg'
;
import
Layout
from
'~/components/layout'
;
import
Layout
from
'~/components/layout'
;
// eslint-disable-next-line import/order
import
OrderForGoods
from
'./components/orderForGoods'
;
import
OrderForGoods
from
'./components/orderForGoods'
;
// Import Swiper styles
// Import Swiper styles
...
...
pages/mall/detail/components/intentionModal/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
{
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
;
import
{
Dispatch
,
SetStateAction
,
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Col
,
Image
,
message
,
Modal
,
Row
,
Space
,
InputNumber
}
from
'antd'
;
import
{
Button
,
Col
,
Image
,
message
,
Modal
,
Row
,
Space
,
InputNumber
}
from
'antd'
;
...
...
pages/mall/detail/components/orderForGoods/index.tsx
浏览文件 @
0a6d70fb
/* eslint-disable */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
type
{
RadioChangeEvent
}
from
'antd'
;
import
type
{
RadioChangeEvent
}
from
'antd'
;
...
...
pages/mall/index.page.tsx
浏览文件 @
0a6d70fb
...
@@ -71,7 +71,7 @@ export default function Mall(props: Props) {
...
@@ -71,7 +71,7 @@ export default function Mall(props: Props) {
setAdList
(
res
.
result
||
[]);
setAdList
(
res
.
result
||
[]);
});
});
},
[]);
},
[]);
// eslint-disable-next-line
const
onFilterChange
=
(
filterResult
:
FilterResult
,
adapterFilterResult
:
AdapterResult
)
=>
{
const
onFilterChange
=
(
filterResult
:
FilterResult
,
adapterFilterResult
:
AdapterResult
)
=>
{
setPageParams
({
setPageParams
({
...
pageParams
,
...
pageParams
,
...
@@ -99,6 +99,7 @@ export default function Mall(props: Props) {
...
@@ -99,6 +99,7 @@ export default function Mall(props: Props) {
<
ul
className=
{
styles
.
listWrap
}
>
<
ul
className=
{
styles
.
listWrap
}
>
{
productList
.
map
((
item
,
i
)
=>
{
{
productList
.
map
((
item
,
i
)
=>
{
return
(
return
(
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
<
li
<
li
key=
{
i
}
key=
{
i
}
className=
{
styles
.
item
}
className=
{
styles
.
item
}
...
...
pages/personalCenter/leasingOrders/components/payModal/index.tsx
浏览文件 @
0a6d70fb
...
@@ -53,10 +53,12 @@ export default function PayModal(props: Props) {
...
@@ -53,10 +53,12 @@ export default function PayModal(props: Props) {
if
(
res
.
code
==
'200'
)
{
if
(
res
.
code
==
'200'
)
{
message
.
success
(
'付款成功'
);
message
.
success
(
'付款成功'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
props
.
onCancel
&&
props
.
onCancel
();
props
.
onCancel
&&
props
.
onCancel
();
setLoading
(
false
);
setLoading
(
false
);
},
1000
);
},
1000
);
}
else
{
}
else
{
// eslint-disable-next-line
res
.
message
&&
message
.
error
(
res
.
message
);
res
.
message
&&
message
.
error
(
res
.
message
);
setLoading
(
false
);
setLoading
(
false
);
}
}
...
...
pages/personalCenter/leasingOrders/components/refundModal/index.tsx
浏览文件 @
0a6d70fb
...
@@ -53,10 +53,12 @@ export default function RefundModal(props: Props) {
...
@@ -53,10 +53,12 @@ export default function RefundModal(props: Props) {
if
(
res
.
code
==
'200'
)
{
if
(
res
.
code
==
'200'
)
{
message
.
success
(
'付款成功'
);
message
.
success
(
'付款成功'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
props
.
onCancel
&&
props
.
onCancel
();
props
.
onCancel
&&
props
.
onCancel
();
setLoading
(
false
);
setLoading
(
false
);
},
1000
);
},
1000
);
}
else
{
}
else
{
// eslint-disable-next-line
res
.
message
&&
message
.
error
(
res
.
message
);
res
.
message
&&
message
.
error
(
res
.
message
);
setLoading
(
false
);
setLoading
(
false
);
}
}
...
...
pages/personalCenter/leasingOrders/index.page.tsx
浏览文件 @
0a6d70fb
...
@@ -2,7 +2,6 @@ import { useEffect, useState } from 'react';
...
@@ -2,7 +2,6 @@ import { useEffect, useState } from 'react';
import
{
TabsProps
,
Tabs
,
Row
,
Col
,
Image
,
Space
,
Button
,
Pagination
,
Empty
,
Spin
}
from
'antd'
;
import
{
TabsProps
,
Tabs
,
Row
,
Col
,
Image
,
Space
,
Button
,
Pagination
,
Empty
,
Spin
}
from
'antd'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
Moment
from
'moment'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
errImg
from
'~/assets/errImg'
;
import
errImg
from
'~/assets/errImg'
;
...
@@ -118,7 +117,9 @@ export default function LeasingOrders() {
...
@@ -118,7 +117,9 @@ export default function LeasingOrders() {
};
};
// 交易状态对应的按钮渲染
// 交易状态对应的按钮渲染
// eslint-disable-next-line consistent-return
const
statusBtn
=
function
(
item
:
LeasingList
)
{
const
statusBtn
=
function
(
item
:
LeasingList
)
{
// eslint-disable-next-line default-case
switch
(
item
.
tranStatus
)
{
switch
(
item
.
tranStatus
)
{
case
'100'
:
case
'100'
:
return
(
return
(
...
@@ -172,10 +173,13 @@ export default function LeasingOrders() {
...
@@ -172,10 +173,13 @@ export default function LeasingOrders() {
);
);
case
'500'
:
case
'500'
:
return
(
<
Button
type=
'link'
style=
{
{
marginTop
:
10
}
}
>
<
Button
type=
'link'
style=
{
{
marginTop
:
10
}
}
>
查看物流
查看物流
<
/Button>
;
</
Button
>
);
// eslint-disable-next-line no-fallthrough
case
'600'
:
case
'600'
:
return
<
Button
className=
{
styles
.
btn1
}
>
再来一单
</
Button
>;
return
<
Button
className=
{
styles
.
btn1
}
>
再来一单
</
Button
>;
}
}
...
@@ -217,8 +221,8 @@ export default function LeasingOrders() {
...
@@ -217,8 +221,8 @@ export default function LeasingOrders() {
<
div
className=
{
styles
.
font2
}
>
<
div
className=
{
styles
.
font2
}
>
<
Space
size=
{
10
}
>
<
Space
size=
{
10
}
>
<
div
>
<
div
>
{
M
oment
(
item
.
startDate
).
format
(
'YYYY-MM-DD'
)
}
至
{
' '
}
{
m
oment
(
item
.
startDate
).
format
(
'YYYY-MM-DD'
)
}
至
{
' '
}
{
M
oment
(
item
.
endDate
).
format
(
'YYYY-MM-DD'
)
}
{
m
oment
(
item
.
endDate
).
format
(
'YYYY-MM-DD'
)
}
</
div
>
</
div
>
<
div
>
订单编号:
{
item
.
orderNo
}
</
div
>
<
div
>
订单编号:
{
item
.
orderNo
}
</
div
>
</
Space
>
{
' '
}
</
Space
>
{
' '
}
...
...
pages/projectInfo/components/news/index.tsx
浏览文件 @
0a6d70fb
...
@@ -69,8 +69,7 @@ export default function News(props: Props) {
...
@@ -69,8 +69,7 @@ export default function News(props: Props) {
// 获取产品信息事件
// 获取产品信息事件
const
onGetInfo
=
()
=>
{
const
onGetInfo
=
()
=>
{
if
(
userInfo
)
{
if
(
userInfo
)
{
if
(
userInfo
.
companyAuthStatus
)
{
if
(
!
userInfo
.
companyAuthStatus
)
{
}
else
{
Router
.
push
(
'/certification?type=back'
);
Router
.
push
(
'/certification?type=back'
);
}
}
}
else
{
}
else
{
...
...
pages/projectInfo/index.page.tsx
浏览文件 @
0a6d70fb
...
@@ -24,6 +24,7 @@ export default function ProjectInfo() {
...
@@ -24,6 +24,7 @@ export default function ProjectInfo() {
[
/* "项目需求", */
'招标快讯'
,
'业务案例'
,
'行业新闻'
].
map
((
value
)
=>
{
[
/* "项目需求", */
'招标快讯'
,
'业务案例'
,
'行业新闻'
].
map
((
value
)
=>
{
let
children
:
JSX
.
Element
|
string
=
<></>;
let
children
:
JSX
.
Element
|
string
=
<></>;
// eslint-disable-next-line default-case
switch
(
value
)
{
switch
(
value
)
{
case
'项目需求'
:
case
'项目需求'
:
children
=
<
Requirements
params=
{
params
}
></
Requirements
>;
children
=
<
Requirements
params=
{
params
}
></
Requirements
>;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论