Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
f515c921
提交
f515c921
authored
6月 29, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:加盟入驻
上级
5ad605b3
隐藏空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
323 行增加
和
198 行删除
+323
-198
request.ts
api/request.ts
+34
-31
index.tsx
components/NavHeader/index.tsx
+4
-4
index.tsx
components/NavHeader/joinModal/index.tsx
+1
-2
index.tsx
components/layout/index.tsx
+1
-1
index.ts
components/uploader/api/index.ts
+7
-0
index.scss
components/uploader/index.scss
+0
-5
index.tsx
components/uploader/index.tsx
+87
-20
userProvider.tsx
lib/userProvider.tsx
+0
-1
next.config.js
next.config.js
+2
-2
index.ts
pages/JoinPolicy/api/index.ts
+2
-1
index.module.scss
pages/JoinPolicy/index.module.scss
+51
-14
index.page.tsx
pages/JoinPolicy/index.page.tsx
+115
-73
index.page.tsx
pages/equipmentLeasing/index.page.tsx
+2
-2
styled.tsx
pages/equipmentLeasing/styled.tsx
+0
-5
index.page.tsx
pages/flyingHandService/index.page.tsx
+2
-1
styled.tsx
pages/flyingHandService/styled.tsx
+0
-5
index.tsx
pages/forum/components/publishMessage/api/index.tsx
+1
-4
index.tsx
pages/forum/components/publishMessage/index.tsx
+3
-7
index.page.tsx
pages/jobServices/index.page.tsx
+2
-3
styled.tsx
pages/jobServices/styled.tsx
+0
-6
index.page.tsx
pages/mall/index.page.tsx
+1
-1
index.tsx
pages/projectInfo/components/news/index.tsx
+8
-9
index.module.scss
pages/projectInfo/index.module.scss
+0
-1
没有找到文件。
api/request.ts
浏览文件 @
f515c921
import
config
from
'./config'
;
let
loginTimeout
:
NodeJS
.
Timeout
|
undefined
;
...
...
@@ -10,7 +9,12 @@ let loginTimeout: NodeJS.Timeout | undefined;
* @param options 额外参数
* @returns Promise<Response>
*/
export
default
function
request
(
url
:
string
,
method
:
String
=
'get'
,
data
?:
any
,
options
:
any
&
{
hideError
?:
boolean
,
headers
?:
{
token
?:
string
}
}
=
{}):
Promise
<
Response
<
any
>>
{
export
default
function
request
(
url
:
string
,
method
:
String
=
'get'
,
data
?:
any
,
options
:
any
&
{
hideError
?:
boolean
;
headers
?:
{
token
?:
string
}
}
=
{},
):
Promise
<
Response
<
any
>>
{
let
token
=
localStorage
.
getItem
(
'token'
)
||
''
;
switch
(
method
.
toLowerCase
())
{
...
...
@@ -19,7 +23,7 @@ export default function request(url: string, method: String = 'get', data?: any,
if
(
data
)
{
Object
.
keys
(
data
).
forEach
((
key
)
=>
{
params
.
append
(
key
,
data
[
key
]);
})
})
;
url
+=
'?'
+
params
;
}
...
...
@@ -33,16 +37,16 @@ export default function request(url: string, method: String = 'get', data?: any,
},
body
:
JSON
.
stringify
(
data
),
...
options
,
}
}
;
break
;
}
if
(
options
.
headers
)
{
if
(
options
.
headers
)
{
options
.
headers
.
token
=
token
;
}
else
{
}
else
{
options
.
headers
=
{
token
}
token
,
}
;
}
/**
...
...
@@ -57,65 +61,65 @@ export default function request(url: string, method: String = 'get', data?: any,
/**
* 未登录消息展示,1.5秒内限制只展示一次
* @returns
* @returns
*/
function
loginErrorMsg
(){
console
.
log
(
'loginTimeout'
,
loginTimeout
)
if
(
loginTimeout
)
{
function
loginErrorMsg
()
{
console
.
log
(
'loginTimeout'
,
loginTimeout
)
;
if
(
loginTimeout
)
{
return
;
}
loginTimeout
=
setTimeout
(()
=>
{
errMsg
(
'请先登录'
);
loginTimeout
=
undefined
;
},
1500
)
},
1500
)
;
}
return
fetch
(
config
.
baseUrl
+
url
,
options
)
.
then
((
r
)
=>
{
try
{
return
r
.
json
()
return
r
.
json
()
;
}
catch
(
e
)
{
console
.
error
(
e
);
}
return
{
code
:
'-1'
,
message
:
'请求失败'
,
result
:
null
}
result
:
null
,
}
;
})
.
then
((
data
)
=>
{
if
(
data
.
errors
)
{
//全局消息提示
errMsg
(
'请求出错'
)
errMsg
(
'请求出错'
)
;
if
(
Array
.
isArray
(
data
.
errors
))
{
data
.
errors
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
defaultMessage
)
{
errMsg
(
item
.
defaultMessage
)
errMsg
(
item
.
defaultMessage
)
;
}
})
})
;
}
return
{
code
:
'-1'
,
message
:
'请求失败'
,
result
:
null
}
result
:
null
,
}
;
}
if
(
data
.
code
!==
'200'
)
{
//未登录判断
if
(
data
.
code
===
'5008'
||
data
.
code
===
'2014'
)
{
if
(
data
.
code
===
'5008'
||
data
.
code
===
'2014'
)
{
loginErrorMsg
();
window
.
logout
();
}
else
{
}
else
{
errMsg
(
data
.
message
||
'请求出错'
);
}
}
return
data
;
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
if
(
error
.
name
===
'AbortError'
)
{
console
.
log
(
'请求已中断'
);
console
.
log
(
error
);
...
...
@@ -125,14 +129,14 @@ export default function request(url: string, method: String = 'get', data?: any,
return
{
code
:
'-1'
,
message
:
'请求失败'
,
result
:
null
}
result
:
null
,
}
;
});
}
//准备响应结构
export
interface
Response
<
T
>
{
code
:
string
,
message
:
string
,
result
?:
T
|
null
}
\ No newline at end of file
code
:
string
;
message
:
string
;
result
?:
T
|
null
;
}
components/NavHeader/index.tsx
浏览文件 @
f515c921
...
...
@@ -14,8 +14,8 @@ const items: TabsProps['items'] = [
label
:
` 首页 `
,
},
{
key
:
'/
jobServices
'
,
label
:
`
作业服务
`
,
key
:
'/
mall
'
,
label
:
`
产品商城
`
,
},
{
key
:
'/equipmentLeasing'
,
...
...
@@ -26,8 +26,8 @@ const items: TabsProps['items'] = [
label
:
`飞手培训`
,
},
{
key
:
'/
mall
'
,
label
:
`
产品商城
`
,
key
:
'/
jobServices
'
,
label
:
`
作业服务
`
,
},
{
key
:
'/projectInfo'
,
...
...
components/NavHeader/joinModal/index.tsx
浏览文件 @
f515c921
import
{
Col
,
Modal
,
Row
}
from
'antd'
;
import
Image
from
'next/image'
;
import
styles
from
'./index.module.scss'
;
import
img
from
'./assets/img.png'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
api
,
{
ListTagResp
}
from
'./api'
;
import
{
useRouter
}
from
'next/router'
;
...
...
@@ -37,7 +36,7 @@ export default function JoinModal(props: Props) {
const
onClickTag
=
(
item
:
ListTagResp
)
=>
{
if
(
userInfo
!
.
companyAuthStatus
)
{
router
.
replace
(
'/JoinPolicy?tagId='
+
item
.
id
);
router
.
replace
(
{
pathname
:
'/JoinPolicy'
,
query
:
{
tagId
:
item
.
id
}
}
);
props
.
onCancel
&&
props
.
onCancel
();
}
else
{
router
.
push
(
'/certification'
);
...
...
components/layout/index.tsx
浏览文件 @
f515c921
import
React
,
{
Suspense
}
from
'react'
;
import
React
from
'react'
;
import
{
Layout
,
Space
}
from
'antd'
;
import
NavHeader
from
'~/components/NavHeader'
;
import
FooterView
from
'~/components/footer'
;
...
...
components/uploader/api/index.ts
0 → 100644
浏览文件 @
f515c921
import
{
headers
}
from
'next/dist/client/components/headers'
;
import
request
,
{
Response
}
from
'~/api/request'
;
export
default
{
uploadFile
:
(
data
:
FormData
):
Promise
<
Response
<
string
>>
=>
request
(
'/pms/upload/breakpoint'
,
'post'
,
data
,
{
headers
:
{},
body
:
data
}),
};
components/uploader/index.scss
deleted
100644 → 0
浏览文件 @
5ad605b3
.uploader-view
{
.ant-upload-wrapper
.ant-upload-list
.ant-upload-list-item-container
{
//width: 200px !important;
}
}
components/uploader/index.tsx
浏览文件 @
f515c921
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
use
Effect
,
use
State
}
from
'react'
;
import
{
message
,
Upload
,
UploadProps
}
from
'antd'
;
// import { UploadFile } from "antd/es/upload/interface";
import
'./index.scss'
;
import
uploadApi
from
'./api'
;
interface
PropsType
{
listType
?:
'text'
|
'picture'
|
'picture-card'
;
// 上传列表的内建样式
fileSize
?:
number
;
// 文件大小
fileType
?:
string
[];
// 上传文件类型
fileUpload
:
boolean
;
// 是否上传到服务器(返回文件流还是返回上传后的地址)
fileLength
?:
number
;
// 最大上传文件数量
children
:
React
.
ReactNode
;
// 上传按钮
onChange
?:
(
fileList
:
any
[])
=>
void
;
// 上传文件改变时的状态
onRemove
?:
(
fileList
:
any
[])
=>
void
;
onChange
?:
(
fileList
:
{
id
:
number
;
name
:
string
;
uid
:
number
;
url
:
string
;
}[],
)
=>
void
;
// 上传文件改变时的状态
defaultFileList
?:
any
[];
// 默认文件列表
}
export
const
Uploader
:
React
.
FC
<
PropsType
>
=
(
props
)
=>
{
Uploader
.
defaultProps
=
{
listType
:
'
text
'
,
listType
:
'
picture-card
'
,
fileSize
:
2
,
fileLength
:
1
,
fileType
:
[
'image/png'
,
'image/jpeg'
,
'image/jpg'
,
'image/gif'
,
'image/bmp'
],
fileType
:
[
'image/png'
,
'image/jpeg'
,
'image/jpg'
,
'image/gif'
],
onChange
:
()
=>
{},
onRemove
:
()
=>
{}
,
defaultFileList
:
[]
,
};
const
{
fileType
,
children
,
listType
,
fileSize
,
fileLength
,
onChange
,
onRemove
}
=
props
;
const
{
fileType
=
[
'image/png'
,
'image/jpeg'
,
'image/jpg'
,
'image/gif'
,
'image/bmp'
],
children
,
listType
,
fileSize
,
fileUpload
,
fileLength
,
onChange
,
defaultFileList
,
}
=
props
;
const
[
fileList
,
setFileList
]
=
useState
<
any
[]
>
([]);
// 上传文件配置
const
uploadProps
:
UploadProps
=
{
listType
,
fileList
,
beforeUpload
:
(
res
)
=>
{
console
.
log
(
'上传文件-->'
,
res
);
const
isType
=
fileType
?.
includes
(
res
.
type
);
const
isSize
=
res
.
size
/
1024
/
1024
<
(
fileSize
||
2
);
const
isLength
=
fileList
.
length
<
(
fileLength
||
1
);
if
(
!
isType
)
{
message
.
error
(
'请上传正确的格式!'
).
then
();
return
isType
;
message
.
error
(
'上传文件格式错误!'
).
then
();
}
if
(
!
isSize
)
{
message
.
error
(
'文件最大2M,请压缩后上传!'
).
then
();
return
isSize
;
message
.
error
(
`文件最大
${
props
.
fileSize
}
M,请压缩后上传!`
).
then
();
}
if
(
!
isLength
)
{
message
.
error
(
`最多上传
${
fileLength
||
1
}
个文件`
).
then
();
}
return
isType
&&
isSize
&&
isLength
;
},
customRequest
:
(
res
)
=>
{
if
(
fileList
.
length
>=
(
fileLength
||
1
))
{
message
.
error
(
`最多上传
${
fileLength
||
1
}
个文件`
).
then
();
return
;
if
(
fileUpload
)
{
setFileList
([
...
fileList
,
{
id
:
new
Date
().
getTime
(),
uid
:
new
Date
().
getTime
(),
name
:
(
res
.
file
as
any
).
name
,
type
:
(
res
.
file
as
any
).
type
,
url
:
(
res
.
file
as
any
).
url
,
status
:
'uploading'
,
},
]);
// 上传到服务器
const
formData
=
new
FormData
();
formData
.
append
(
'uploadFile'
,
res
.
file
);
uploadApi
.
uploadFile
(
formData
).
then
(({
result
,
code
})
=>
{
if
(
code
===
'200'
)
{
setFileList
([
...
fileList
,
{
id
:
new
Date
().
getTime
(),
uid
:
new
Date
().
getTime
(),
name
:
(
res
.
file
as
any
).
name
||
''
,
url
:
result
,
type
:
(
res
.
file
as
any
).
type
,
status
:
'done'
,
},
]);
onChange
?.([
...
fileList
,
{
id
:
new
Date
().
getTime
(),
uid
:
new
Date
().
getTime
(),
name
:
(
res
.
file
as
any
).
name
||
''
,
url
:
result
,
type
:
(
res
.
file
as
any
).
type
,
status
:
'done'
,
},
]);
}
});
}
else
{
setFileList
([...
fileList
,
res
.
file
]);
onChange
?.([...
fileList
,
res
.
file
]);
}
setFileList
([...
fileList
,
res
.
file
]);
onChange
?.([...
fileList
,
res
.
file
]);
},
onRemove
:
(
res
)
=>
{
const
newFileList
=
fileList
.
filter
((
item
)
=>
item
.
uid
!==
res
.
uid
);
setFileList
(
newFileList
);
on
Remov
e
?.(
newFileList
);
on
Chang
e
?.(
newFileList
);
},
// onPreview: { onPreview },
};
useEffect
(()
=>
{
// 如果有默认文件列表
if
(
defaultFileList
?.
length
)
{
setFileList
(
defaultFileList
);
}
else
{
setFileList
([]);
}
},
[
defaultFileList
]);
return
(
<
div
className=
'uploader-view'
>
<
Upload
{
...
uploadProps
}
style=
{
{
width
:
'100%'
}
}
>
<>
{
fileList
.
length
<
(
fileLength
||
1
)
&&
children
}
</>
{
children
}
</
Upload
>
</
div
>
);
...
...
lib/userProvider.tsx
浏览文件 @
f515c921
...
...
@@ -27,7 +27,6 @@ const UserProvider = ({ children }: Props) => {
useEffect
(()
=>
{
try
{
setUserInfo
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'userInfo'
)
||
''
)
||
undefined
);
window
.
setUserInfo
=
setUserInfo
;
window
.
setNeedLogin
=
setNeedLogin
;
window
.
logout
=
logout
;
...
...
next.config.js
浏览文件 @
f515c921
...
...
@@ -27,8 +27,8 @@ const nextConfig = {
return
[
{
source
:
'/local/:path*'
,
destination
:
'https://www.iuav.shop/:path*'
,
//
destination: 'https://test.iuav.shop/:path*',
//
destination: 'https://www.iuav.shop/:path*',
destination
:
'https://test.iuav.shop/:path*'
,
},
];
},
...
...
pages/JoinPolicy/api/index.ts
浏览文件 @
f515c921
...
...
@@ -4,8 +4,8 @@ export interface CooperationApplyParams {
applyName
:
string
;
applyPhone
:
string
;
remark
?:
string
;
userAccountId
:
number
;
cooperationTagId
:
number
;
attachmentList
?:
{
type
:
number
;
url
:
string
}[];
}
export
interface
GetTagIdResp
{
...
...
@@ -14,6 +14,7 @@ export interface GetTagIdResp {
tagImg
:
string
;
tagDescription
:
string
;
createTime
:
string
;
tagRequire
:
string
;
}
export
default
{
...
...
pages/JoinPolicy/index.module.scss
浏览文件 @
f515c921
.banner
{
width
:
100vw
;
height
:
200px
;
background
:
#f25834
;
position
:
absolute
;
left
:
50%
;
top
:
0
;
transform
:
translate
(
-50%
,
0
);
.headerLine
{
height
:
8px
;
background
:
linear-gradient
(
90deg
,
#F5B351
0%
,
#FF552D
100%
);
}
.font1
{
font-size
:
20px
;
font-family
:
MicrosoftYaHeiUI-Bold
,
MicrosoftYaHeiUI
;
font-weight
:
bold
;
color
:
#000000
;
line-height
:
25px
;
}
.font2
{
font-size
:
18px
;
font-family
:
MicrosoftYaHei
;
color
:
#333333
;
line-height
:
32px
;
font-size
:
14px
;
color
:
#1A1B1C
;
line-height
:
19px
;
letter-spacing
:
1px
;
}
.infoContent
{
padding
:
29px
0
0
50px
;
box-sizing
:
border-box
;
.tip
{
.tipTitle
{
font-size
:
14px
;
font-weight
:
bold
;
color
:
#000000
;
line-height
:
18px
;
margin-bottom
:
17px
;
}
}
.formWrap
{
margin-top
:
35px
;
.formTitle
{
font-size
:
14px
;
font-weight
:
bold
;
color
:
#000000
;
line-height
:
18px
;
margin-bottom
:
17px
;
}
}
.uploadTip
{
font-size
:
12px
;
color
:
#858687
;
line-height
:
18px
;
margin-bottom
:
12px
;
}
.uploadOperate
{
}
}
.submitOperate
{
text-align
:
center
;
margin-top
:
69px
;
button
{
width
:
200px
;
height
:
40px
;
border-radius
:
6px
;
background
:
linear-gradient
(
90deg
,
#FF552D
0%
,
#FF812D
100%
);
font-size
:
16px
;
color
:
#FEFFFE
;
}
}
pages/JoinPolicy/index.page.tsx
浏览文件 @
f515c921
...
...
@@ -4,107 +4,149 @@ import { useEffect, useState } from 'react';
import
LayoutView
from
'~/components/layout'
;
import
api
from
'./api'
;
import
styles
from
'./index.module.scss'
;
import
{
phoneNumber
}
from
'~/lib/validateUtils'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
JoinModal
from
'~/components/NavHeader/joinModal'
;
export
default
function
JoinPolicy
()
{
const
[
form
]
=
Form
.
useForm
();
const
router
=
useRouter
();
const
[
content
,
setContent
]
=
useState
(
''
);
//福利内容
const
tagId
=
Number
(
router
.
query
.
tagId
);
const
[
tagId
,
setTagId
]
=
useState
<
number
>
(
-
1
);
useEffect
(()
=>
{
if
(
tagId
)
{
if
(
router
.
query
.
tagId
)
{
setTagId
(
Number
(
router
.
query
.
tagId
));
api
.
getTagById
({
id
:
tagId
,
id
:
Number
(
router
.
query
.
tagId
)
,
})
.
then
((
res
)
=>
{
setContent
(
res
.
result
?.
tag
Description
.
replaceAll
(
'
\
n'
,
'<br/>'
)
||
''
);
setContent
(
res
.
result
?.
tag
Require
.
replaceAll
(
'
\
n'
,
'<br/>'
)
||
''
);
});
}
},
[]);
},
[
router
.
query
.
tagId
]);
//提交
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
api
.
cooperationApply
({
...
values
,
cooperationTagId
:
tagId
,
})
.
then
((
res
)
=>
{
console
.
log
(
'提交结果'
,
res
);
if
(
res
.
code
===
'200'
)
{
window
.
messageApi
.
success
(
'提交成功'
);
setTimeout
(()
=>
{
router
.
push
(
'/'
);
},
1500
);
}
});
const
submitApply
=
()
=>
{
form
.
validateFields
().
then
((
valid
)
=>
{
api
.
cooperationApply
({
...
valid
,
cooperationTagId
:
tagId
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
'200'
)
{
window
.
messageApi
.
success
(
'提交成功'
);
form
.
resetFields
();
setTimeout
(()
=>
{
router
.
push
(
'/'
);
},
1500
);
}
});
});
};
//上传变更
const
uploadChange
=
(
value
:
any
)
=>
{
let
attachmentList
=
value
.
map
((
v
:
any
)
=>
({
type
:
v
.
type
.
includes
(
'image'
)
?
0
:
1
,
url
:
v
.
url
,
}));
form
.
setFieldValue
(
'attachmentList'
,
attachmentList
);
};
return
(
<
LayoutView
>
<
div
className=
{
styles
.
banner
}
></
div
>
<
div
className=
'page'
style=
{
{
background
:
'#fff'
,
position
:
'relative'
,
zIndex
:
1
,
marginTop
:
6
0
,
marginTop
:
2
0
,
paddingBottom
:
63
,
}
}
>
<
div
className=
{
styles
.
font1
}
style=
{
{
textAlign
:
'center'
,
paddingTop
:
40
,
paddingBottom
:
30
}
}
>
加盟入驻福利
<
div
className=
{
styles
.
headerLine
}
></
div
>
<
div
className=
{
styles
.
font1
}
style=
{
{
textAlign
:
'center'
,
marginTop
:
'22px'
}
}
>
加盟入驻
</
div
>
<
div
className=
{
styles
.
font2
}
style=
{
{
paddingLeft
:
50
,
paddingRight
:
50
}
}
dangerouslySetInnerHTML=
{
{
__html
:
content
}
}
></
div
>
<
Divider
/>
<
div
className=
{
styles
.
font1
}
style=
{
{
textAlign
:
'center'
,
marginBottom
:
28
}
}
>
申请加盟入驻
</
div
>
<
Row
justify=
{
'center'
}
>
<
Col
style=
{
{
width
:
400
}
}
>
<
Form
labelAlign=
'left'
labelCol=
{
{
span
:
5
}
}
onFinish=
{
onFinish
}
>
<
Form
.
Item
label=
'姓名'
name=
'applyName'
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
'请输入姓名'
></
Input
>
</
Form
.
Item
>
<
Form
.
Item
label=
'联系方式'
name=
'applyPhone'
rules=
{
[
{
required
:
true
},
{
pattern
:
/^1
\d
{10}$/
,
message
:
'很输入11位手机号'
,
},
]
}
>
<
Input
placeholder=
'请输入手机号'
maxLength=
{
11
}
onInput=
{
phoneNumber
}
></
Input
>
</
Form
.
Item
>
<
Form
.
Item
name=
'remark'
>
<
Input
.
TextArea
placeholder=
'其它信息'
></
Input
.
TextArea
>
</
Form
.
Item
>
<
Row
justify=
{
'center'
}
>
<
Button
type=
'primary'
htmlType=
'submit'
style=
{
{
marginTop
:
11
,
width
:
200
}
}
size=
'large'
<
div
className=
{
styles
.
infoContent
}
>
<
div
className=
{
styles
.
tip
}
>
<
div
className=
{
styles
.
tipTitle
}
>
需准备上传资料
</
div
>
<
div
className=
{
styles
.
font2
}
dangerouslySetInnerHTML=
{
{
__html
:
content
}
}
></
div
>
</
div
>
<
div
className=
{
styles
.
formWrap
}
>
<
div
className=
{
styles
.
formTitle
}
>
填写资料
</
div
>
<
div
className=
{
styles
.
form
}
>
<
Form
labelCol=
{
{
span
:
2
}
}
wrapperCol=
{
{
span
:
10
}
}
labelAlign=
'left'
form=
{
form
}
>
<
Form
.
Item
label=
'联系人'
name=
'applyName'
rules=
{
[{
required
:
true
,
message
:
'请输入联系人'
}]
}
>
<
Input
placeholder=
'请输入联系人'
maxLength=
{
30
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'联系方式'
name=
'applyPhone'
rules=
{
[
{
required
:
true
,
message
:
'请输入联系方式'
},
{
pattern
:
/^1
\d
{10}$/
,
message
:
'请输入正确的手机号码'
},
]
}
>
提交申请
</
Button
>
</
Row
>
</
Form
>
</
Col
>
</
Row
>
<
Input
placeholder=
'请输入联系方式'
/>
</
Form
.
Item
>
<
Row
>
<
Col
span=
{
2
}
>
<
div
>
上传资料:
</
div
>
</
Col
>
<
Col
span=
{
10
}
>
<
div
className=
{
styles
.
uploadTip
}
>
<
div
>
1. 图片格式为JPG、JPEG、BMP、GIF、PNG
</
div
>
<
div
>
2. 文档格式为word、PDF、excel
</
div
>
<
div
>
3. 文件大小不超过10M
</
div
>
</
div
>
<
div
className=
{
styles
.
uploadOperate
}
>
<
Form
.
Item
name=
'attachmentList'
>
<
Uploader
fileUpload
listType=
'text'
fileLength=
{
3
}
fileSize=
{
10
}
onChange=
{
uploadChange
}
fileType=
{
[
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
,
'pplication/vnd.openxmlformats-officedocument.wordprocessingml.document'
,
'application/vnd.ms-excel'
,
'application/pdf'
,
'application/msword'
,
'image/png'
,
'image/jpeg'
,
'image/jpg'
,
'image/gif'
,
'image/bmp'
,
]
}
>
<
Button
>
上传文件
</
Button
>
</
Uploader
>
</
Form
.
Item
>
</
div
>
</
Col
>
</
Row
>
<
Form
.
Item
label=
'备注(选填)'
name=
'remark'
>
<
Input
placeholder=
'请输入备注'
maxLength=
{
60
}
/>
</
Form
.
Item
>
</
Form
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
submitOperate
}
>
<
Button
type=
'primary'
onClick=
{
submitApply
}
>
提交申请
</
Button
>
</
div
>
</
div
>
</
LayoutView
>
);
}
JoinPolicy
.
getInitialProps
=
async
()
=>
{
return
{};
};
pages/equipmentLeasing/index.page.tsx
浏览文件 @
f515c921
import
{
Pagination
}
from
'antd'
;
import
{
Pagination
,
Image
as
AntdImage
}
from
'antd'
;
import
Image
from
'next/image'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useContext
,
useEffect
,
useRef
,
useState
}
from
'react'
;
...
...
@@ -57,7 +57,7 @@ export default function EquipmentLeasing(props: Props) {
const
rightDom
=
(
item
:
{
id
:
number
;
bannerImg
:
string
})
=>
{
return
(
<
div
key=
{
item
.
id
}
className=
'right-box-item right-item'
>
<
Image
src=
{
item
.
bannerImg
}
alt=
'error'
fill
/>
<
AntdImage
src=
{
item
.
bannerImg
}
width=
{
180
}
preview=
{
false
}
/>
</
div
>
);
};
...
...
pages/equipmentLeasing/styled.tsx
浏览文件 @
f515c921
...
...
@@ -67,11 +67,6 @@ export const Box = styled.div`
}
.right-item {
width: 180px;
height: 347px;
background: #d8d8d8;
border-radius: 6px;
overflow: hidden;
position: relative;
}
.pagination-page {
text-align: right;
...
...
pages/flyingHandService/index.page.tsx
浏览文件 @
f515c921
...
...
@@ -9,6 +9,7 @@ import {
Select
,
Space
,
message
,
Image
as
AntdImage
,
}
from
'antd'
;
import
type
{
CheckboxValueType
}
from
'antd/es/checkbox/Group'
;
import
Image
from
'next/image'
;
...
...
@@ -94,7 +95,7 @@ export default function FlyingHandService() {
const
rightDom
=
(
item
:
string
)
=>
{
return
(
<
div
className=
'right-box-item right-item'
key=
{
item
}
>
<
Image
src=
{
item
}
alt=
'error'
fill
/>
<
AntdImage
src=
{
item
}
width=
{
260
}
preview=
{
false
}
/>
</
div
>
);
};
...
...
pages/flyingHandService/styled.tsx
浏览文件 @
f515c921
...
...
@@ -128,11 +128,6 @@ export const Box = styled.div`
}
.right-item {
width: 260px;
height: 500px;
background: #ffffff;
border-radius: 6px;
overflow: hidden;
position: relative;
}
.pagination-page {
text-align: right;
...
...
pages/forum/components/publishMessage/api/index.tsx
浏览文件 @
f515c921
...
...
@@ -5,10 +5,7 @@ export interface PublishParams {
lon
?:
number
;
//经度
description
:
string
;
//描述
userId
:
number
;
//用户id
mediaVO
:
{
//发布图片
picture
:
Array
<
string
>
;
};
mediaVO
:
{
type
:
number
;
url
:
string
}[];
}
export
default
{
...
...
pages/forum/components/publishMessage/index.tsx
浏览文件 @
f515c921
...
...
@@ -96,17 +96,13 @@ export default function PublishMessage(props: Props) {
.
publish
({
lat
:
position
?.
position
?.
lat
,
//纬度
lon
:
position
?.
position
?.
lng
,
//经度
title
:
''
,
//标题
description
:
values
.
description
,
//描述
userId
:
userInfo
.
id
,
//用户id
mediaVO
:
{
//发布图片
//@ts-ignore
picture
:
fileList
.
filter
((
item
)
=>
item
.
url
).
map
((
item
)
=>
item
.
url
),
},
mediaVO
:
fileList
.
filter
((
item
)
=>
item
.
url
)
.
map
((
item
)
=>
({
type
:
0
,
url
:
item
.
url
as
string
})),
})
.
then
((
res
)
=>
{
console
.
log
(
'提交结果'
,
res
);
setShowLoad
(
false
);
if
(
res
.
code
===
'200'
)
{
window
.
messageApi
.
success
(
'发布成功'
);
...
...
pages/jobServices/index.page.tsx
浏览文件 @
f515c921
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Box
}
from
'./styled'
;
import
{
Pagination
}
from
'antd'
;
import
{
Pagination
,
Image
}
from
'antd'
;
import
Layout
from
'~/components/layout'
;
import
ContentBox
from
'~/components/contentBox'
;
import
{
useRouter
}
from
'next/router'
;
import
Filter
,
{
FilterResult
,
AdapterResult
}
from
'~/components/filter'
;
import
api
,
{
Job
}
from
'./api'
;
import
commonApi
from
'~/api'
;
import
Image
from
'next/image'
;
// 此函数在构建时被调用
export
async
function
getServerSideProps
()
{
return
{
...
...
@@ -53,7 +52,7 @@ export default function JobServices() {
const
rightDom
=
(
item
:
string
)
=>
{
return
(
<
div
className=
'right-box-item advertisement'
key=
{
item
}
>
<
Image
src=
{
item
}
alt=
'error'
width=
{
260
}
height=
{
500
}
/>
<
Image
src=
{
item
}
width=
{
260
}
preview=
{
false
}
/>
</
div
>
);
};
...
...
pages/jobServices/styled.tsx
浏览文件 @
f515c921
...
...
@@ -86,12 +86,6 @@ export const Box = styled.div`
}
}
}
.advertisement {
width: 260px;
height: 420px;
background: #ffffff;
border-radius: 6px;
}
.pagination-page {
text-align: right;
}
...
...
pages/mall/index.page.tsx
浏览文件 @
f515c921
...
...
@@ -151,7 +151,7 @@ export default function Mall(props: Props) {
className=
{
styles
.
ad
}
src=
{
item
.
bannerImg
}
width=
{
189
}
height=
{
364
}
//
height=
{364}
preview=
{
false
}
fallback=
{
errImg
}
></
Image
>
...
...
pages/projectInfo/components/news/index.tsx
浏览文件 @
f515c921
import
{
RightOutlined
}
from
'@ant-design/icons'
;
import
{
Button
,
Col
,
Empty
,
Pagination
,
Row
,
Spin
}
from
'antd'
;
import
{
Col
,
Empty
,
Pagination
,
Row
,
Spin
}
from
'antd'
;
import
styles
from
'./index.module.scss'
;
import
Image
from
'next/image'
;
import
{
useState
,
useEffect
,
useContext
}
from
'react'
;
...
...
@@ -96,13 +95,13 @@ export default function News(props: Props) {
{
Moment
().
format
(
'yyyy-MM-DD'
)
}
·
{
item
.
newsAuthor
}
</
div
>
</
div
>
<
Button
type=
'primary'
style=
{
{
width
:
120
,
height
:
40
,
flexShrink
:
0
}
}
onClick=
{
onGetInfo
}
>
获取产品资料
</
Button
>
{
/*<Button*/
}
{
/* type='primary'*/
}
{
/* style={{ width: 120, height: 40, flexShrink: 0 }}*/
}
{
/* onClick={onGetInfo}*/
}
{
/*>*/
}
{
/* 获取产品资料*/
}
{
/*</Button>*/
}
</
div
>
);
})
}
...
...
pages/projectInfo/index.module.scss
浏览文件 @
f515c921
.bannerWrap
{
height
:
100px
;
position
:
relative
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论