Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
71f14a6b
提交
71f14a6b
authored
7月 05, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:项目资讯,联系人二维码
上级
746d55c8
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
196 行增加
和
268 行删除
+196
-268
index.tsx
components/wxCodeModal/index.tsx
+30
-0
styled.tsx
components/wxCodeModal/styled.tsx
+24
-0
index.tsx
pages/home/waterfallFlowBody/index.tsx
+36
-151
index.tsx
pages/jobServices/api/index.tsx
+1
-0
index.page.tsx
pages/jobServices/index.page.tsx
+2
-7
styled.tsx
pages/jobServices/styled.tsx
+0
-20
[id].page.tsx
pages/projectInfo/caseArticle/[id].page.tsx
+2
-2
index.tsx
pages/projectInfo/components/bids/index.tsx
+11
-19
index.tsx
pages/projectInfo/components/cases/index.tsx
+38
-35
index.module.scss
pages/projectInfo/components/news/index.module.scss
+6
-1
index.tsx
pages/projectInfo/components/news/index.tsx
+12
-8
index.page.tsx
pages/projectInfo/index.page.tsx
+33
-24
[id].page.tsx
pages/projectInfo/newsArticle/[id].page.tsx
+1
-1
没有找到文件。
components/wxCodeModal/index.tsx
0 → 100644
浏览文件 @
71f14a6b
import
{
Modal
,
ModalProps
}
from
'antd'
;
import
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
{
Box
}
from
'./styled'
;
import
api
from
'~/api'
;
import
{
Image
}
from
'antd'
;
const
WxCodeModal
:
FC
<
ModalProps
>
=
({
open
,
onCancel
})
=>
{
const
[
wxCodeImg
,
setWxCodeImg
]
=
useState
<
string
>
(
''
);
const
getWXCode
=
()
=>
{
api
.
listBannerImg
(
'WX_CODE'
).
then
(({
result
})
=>
{
if
(
result
)
{
setWxCodeImg
(
result
[
0
].
bannerImg
);
}
});
};
useEffect
(()
=>
{
getWXCode
();
},
[]);
return
(
<
Modal
open=
{
open
}
onCancel=
{
onCancel
}
width=
{
400
}
footer=
{
null
}
>
<
Box
>
<
div
className=
'title'
>
立即申请合作
</
div
>
<
div
className=
'img'
>
<
Image
src=
{
wxCodeImg
}
width=
{
160
}
height=
{
160
}
/>
</
div
>
<
div
className=
'meta'
>
打开微信扫一扫
</
div
>
</
Box
>
</
Modal
>
);
};
export
default
WxCodeModal
;
components/wxCodeModal/styled.tsx
0 → 100644
浏览文件 @
71f14a6b
import
styled
from
'styled-components'
;
export
const
Box
=
styled
.
div
`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.title {
font-size: 20px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #ff5a33;
line-height: 25px;
}
.img {
margin: 48px 0 40px 0;
}
.meta {
font-size: 14px;
font-family: MicrosoftYaHei;
color: #3e454d;
line-height: 19px;
}
`
;
pages/home/waterfallFlowBody/index.tsx
浏览文件 @
71f14a6b
import
{
Select
,
Space
,
message
}
from
'antd'
;
import
{
Select
,
Space
,
message
}
from
'antd'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useRouter
}
from
'next/router'
;
import
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
ContentBox
from
'~/components/contentBox'
;
import
ContentBox
from
'~/components/contentBox'
;
import
Map
from
'./components/map'
;
import
Map
from
'./components/map'
;
import
RotationChart
from
'./components/rotationChart'
;
import
RotationChart
from
'./components/rotationChart'
;
...
@@ -18,6 +18,7 @@ import api, {
...
@@ -18,6 +18,7 @@ import api, {
mallApi
,
mallApi
,
}
from
'./api'
;
}
from
'./api'
;
import
{
bigNumberTransform
}
from
'~/utils/money'
;
import
{
bigNumberTransform
}
from
'~/utils/money'
;
import
WxCodeModal
from
'~/components/wxCodeModal'
;
interface
ColumnsType
{
interface
ColumnsType
{
title
:
string
;
title
:
string
;
...
@@ -26,9 +27,8 @@ interface ColumnsType {
...
@@ -26,9 +27,8 @@ interface ColumnsType {
export
default
function
WaterfallFlowBody
()
{
export
default
function
WaterfallFlowBody
()
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
[
list
,
setList
]
=
useState
([
const
[
list
]
=
useState
([
'中国人寿'
,
'中国人寿'
,
'中国平安'
,
'中国平安'
,
'中国人保'
,
'中国人保'
,
...
@@ -100,127 +100,13 @@ export default function WaterfallFlowBody() {
...
@@ -100,127 +100,13 @@ export default function WaterfallFlowBody() {
const
[
rightTopDomList
,
setRightTopDomList
]
=
useState
<
JSX
.
Element
>
();
const
[
rightTopDomList
,
setRightTopDomList
]
=
useState
<
JSX
.
Element
>
();
const
[
rightBottomDomList
,
setRightBottomDomList
]
=
useState
<
JSX
.
Element
>
();
const
[
rightBottomDomList
,
setRightBottomDomList
]
=
useState
<
JSX
.
Element
>
();
const
[
wxCodeShow
,
setWXCodeShow
]
=
useState
<
boolean
>
(
false
);
// const { deviceBrand, deviceModel } = equipmentLeasingApi
// const eqApiTypeList = ['brandId', 'categoryId', 'modelId']
// const {
// listAllModel,
// listAllBrand,
// listAllCategory,
// listAllParts,
// listAllQuality,
// } = mallApi
// const mallApiTypeList = [
// 'brandId',
// 'productCategoryId',
// 'partsId',
// 'modelId',
// 'qualityId',
// ]
// const { IndustryFlightSkills, InDronePilotLicense } = flightSkillsApi
// const flightApiTypeList = ['licenseId', 'flightSkillsId']
// const { listAllIndustry, listAllAppType } = jobServicesApi
// const jobApiTypeList = ['industryId', 'appTypeId']
const
onMoreChange
=
(
value
:
{
value
:
string
;
label
:
number
},
index
:
number
,
option
:
[])
=>
{
const
onMoreChange
=
(
value
:
{
value
:
string
;
label
:
number
},
index
:
number
,
option
:
[])
=>
{
const
[
item
]
=
option
.
filter
((
item
:
any
)
=>
item
.
name
===
value
.
value
);
const
[
item
]
=
option
.
filter
((
item
:
any
)
=>
item
.
name
===
value
.
value
);
routerPath
(
index
,
item
);
routerPath
(
index
,
item
);
};
};
// useEffect(() => {
// ;(async () => {
// let res1 = await Promise.all([deviceBrand(), deviceModel()])
// let res2 = await Promise.all([listAllBrand(), listAllCategory(), listAllParts(), listAllModel(), listAllQuality()])
// let res3 = await Promise.all([IndustryFlightSkills(), InDronePilotLicense()])
// let res4 = await Promise.all([listAllIndustry(), listAllAppType()])
// // let res4 = await Promise.all([deviceCategory(),deviceBrand(),deviceModel()])
// // let res6 = await Promise.all([deviceCategory(),deviceBrand(),deviceModel()])
// const resValuelist1 = res1
// .map((item, index) => {
// if (item.code === '200') {
// return item.result?.map(it => {
// it.type = eqApiTypeList[index]
// return it
// })
// }
// return {}
// })
// .flat()
// const resValuelist2 = res2
// .map((item, index) => {
// if (item.code === '200') {
// return item.result?.map(it => {
// it.type = mallApiTypeList[index]
// return it
// })
// }
// return {}
// })
// .flat()
// const resValuelist3 = res3
// .map((item, index) => {
// if (item.code === '200') {
// return item.result?.map(it => {
// it.type = flightApiTypeList[index]
// it.name = it.name || it.skillsName || it.licenseType
// return it
// })
// }
// return {}
// })
// .flat()
// const resValuelist4 = res4
// .map((item, index) => {
// if (item.code === '200') {
// return item.result?.map(it => {
// it.type = jobApiTypeList[index]
// it.name = it.name || it.appName
// return it
// })
// }
// return {}
// })
// .flat()
// let res7 = await listNewsApi.listNewsPage({ pageNo: 1, pageSize: 5 })
// let res8 = await listNewsApi.listNewTenderInfo({
// pageNo: 1,
// pageSize: 6
// })
// const listValue: any = [resValuelist1, resValuelist2, [], resValuelist3, resValuelist4, []]
// const listOption = JSON.parse(JSON.stringify(list)).map((item: string, index: number) => {
// return { id: index, name: item, value: index }
// })
// const list2Option = JSON.parse(JSON.stringify(list2)).map((item: string, index: number) => {
// return { id: index, name: item, value: index }
// })
// const optionList = [resValuelist1, resValuelist2, listOption, resValuelist3, resValuelist4, list2Option]
// setLeftDomList(
// columns.map((item, index) => {
// if (index < 3) {
// return {
// element: leftDom(item, index, listValue, optionList[index]),
// type: 'left'
// }
// }
// return {
// element: leftDom(item, index, listValue, optionList[index]),
// type: 'right'
// }
// })
// )
// setRightTopDomList(rightDom(res7.result?.list!))
// setRightBottomDomList(rightDom2(res8.result?.list!))
// })()
// }, [])
useEffect
(()
=>
{
useEffect
(()
=>
{
(
async
()
=>
{
(
async
()
=>
{
const
res2
=
await
api
.
HomeCategories
({
type
:
2
});
//无人机培训
const
res2
=
await
api
.
HomeCategories
({
type
:
2
});
//无人机培训
...
@@ -283,31 +169,35 @@ export default function WaterfallFlowBody() {
...
@@ -283,31 +169,35 @@ export default function WaterfallFlowBody() {
}
}
};
};
const
handleTenderApply
=
async
(
item
:
NewsTenderType
)
=>
{
const
handleTenderApply
=
()
=>
{
if
(
item
.
apply
)
return
;
setWXCodeShow
(
true
);
if
(
userInfo
)
{
// if (item.apply) return;
let
res
=
await
listNewsApi
.
tenderApply
({
// if (userInfo) {
tenderInfoId
:
item
.
id
,
// let res = await listNewsApi.tenderApply({
tenderNewsId
:
item
.
tenderNewsId
,
// tenderInfoId: item.id,
userAccountId
:
userInfo
.
id
,
// tenderNewsId: item.tenderNewsId,
});
// userAccountId: userInfo.id,
try
{
// });
if
(
res
.
code
===
'200'
)
{
// try {
message
.
success
(
'申请成功'
);
// if (res.code === '200') {
let
res8
=
await
listNewsApi
.
listNewTenderInfo
({
// message.success('申请成功');
pageNo
:
1
,
// let res8 = await listNewsApi.listNewTenderInfo({
pageSize
:
6
,
// pageNo: 1,
});
// pageSize: 6,
setRightBottomDomList
(
rightDom2
(
res8
.
result
?.
list
!
));
// });
}
else
{
// setRightBottomDomList(rightDom2(res8.result?.list!));
message
.
error
(
res
.
message
);
// } else {
}
// message.error(res.message);
}
catch
(
e
)
{
// }
console
.
log
(
e
);
// } catch (e) {
}
// console.log(e);
}
else
{
// }
setNeedLogin
(
true
);
// } else {
}
// setNeedLogin(true);
// }
};
const
wxCodeModalCancel
=
()
=>
{
setWXCodeShow
(
false
);
};
};
const
leftDom
=
(
const
leftDom
=
(
...
@@ -435,16 +325,10 @@ export default function WaterfallFlowBody() {
...
@@ -435,16 +325,10 @@ export default function WaterfallFlowBody() {
</
div
>
</
div
>
<
div
<
div
className=
{
`item-right ${item.apply ? 'apply' : ''}`
}
className=
{
`item-right ${item.apply ? 'apply' : ''}`
}
onClick=
{
()
=>
handleTenderApply
(
item
)
}
onClick=
{
handleTenderApply
}
>
>
<
div
className=
'left'
>
{
bigNumberTransform
(
item
.
tenderPrice
*
10000
,
true
)
}
</
div
>
<
div
className=
'left'
>
{
bigNumberTransform
(
item
.
tenderPrice
*
10000
,
true
)
}
</
div
>
{
item
.
apply
?
(
<
div
className=
'right'
>
申请合作
</
div
>
<
div
className=
'right'
>
已申请
</
div
>
)
:
(
<>
<
div
className=
'right'
>
申请合作
</
div
>
</>
)
}
</
div
>
</
div
>
</
div
>
</
div
>
))
}
))
}
...
@@ -473,6 +357,7 @@ export default function WaterfallFlowBody() {
...
@@ -473,6 +357,7 @@ export default function WaterfallFlowBody() {
],
],
}
}
}
}
/>
/>
<
WxCodeModal
open=
{
wxCodeShow
}
onCancel=
{
wxCodeModalCancel
}
/>
</
Box
>
</
Box
>
);
);
}
}
pages/jobServices/api/index.tsx
浏览文件 @
71f14a6b
...
@@ -16,6 +16,7 @@ export interface Job {
...
@@ -16,6 +16,7 @@ export interface Job {
teamName
:
string
;
teamName
:
string
;
price
:
number
;
price
:
number
;
inspComtAmount
:
number
;
inspComtAmount
:
number
;
companyName
:
string
;
}
}
export
interface
ListPageJobInfoResp
{
export
interface
ListPageJobInfoResp
{
...
...
pages/jobServices/index.page.tsx
浏览文件 @
71f14a6b
...
@@ -33,17 +33,12 @@ export default function JobServices() {
...
@@ -33,17 +33,12 @@ export default function JobServices() {
<
div
className=
'label'
>
{
item
.
serviceName
}
</
div
>
<
div
className=
'label'
>
{
item
.
serviceName
}
</
div
>
{
/* <div className="com">{item.teamName}</div> */
}
{
/* <div className="com">{item.teamName}</div> */
}
</
div
>
</
div
>
<
div
className=
'value-right'
>
{
/* <span className="money">¥{item.price}</span> */
}
{
/* <span className="unit">/平</span> */
}
<
span
className=
'money'
>
获取报价
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'item-bottom'
>
<
div
className=
'item-bottom'
>
<
div
className=
'bottom-left'
>
{
item
.
inspComtAmount
}
条评价
</
div
>
<
div
className=
'bottom-left'
>
{
item
.
inspComtAmount
}
条评价
</
div
>
{
/* <div className="bottom-right">专业飞手团队,精通巡航业务</div> */
}
<
div
className=
'bottom-right'
>
{
item
.
companyName
}
</
div
>
<
div
className=
'com'
>
{
item
.
teamName
}
</
div
>
{
/*<div className='com'>{item.teamName}</div>*/
}
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
pages/jobServices/styled.tsx
浏览文件 @
71f14a6b
...
@@ -37,25 +37,6 @@ export const Box = styled.div`
...
@@ -37,25 +37,6 @@ export const Box = styled.div`
white-space: nowrap;
white-space: nowrap;
}
}
}
}
&-right {
.money {
width: 89px;
height: 22px;
font-size: 20px;
font-family: Arial-BoldMT, Arial;
color: #ff552d;
line-height: 22px;
font-weight: bold;
}
.unit {
width: 24px;
height: 22px;
font-size: 16px;
font-family: MicrosoftYaHei;
color: #ff552d;
line-height: 22px;
}
}
}
}
}
}
&-bottom {
&-bottom {
...
@@ -77,7 +58,6 @@ export const Box = styled.div`
...
@@ -77,7 +58,6 @@ export const Box = styled.div`
line-height: 22px;
line-height: 22px;
}
}
.bottom-right {
.bottom-right {
width: 216px;
height: 22px;
height: 22px;
font-size: 14px;
font-size: 14px;
font-family: MicrosoftYaHei;
font-family: MicrosoftYaHei;
...
...
pages/projectInfo/caseArticle/[id].page.tsx
浏览文件 @
71f14a6b
...
@@ -69,8 +69,8 @@ export default function CaseArticle() {
...
@@ -69,8 +69,8 @@ export default function CaseArticle() {
<
Col
flex=
'auto'
>
<
Col
flex=
'auto'
>
<
div
className=
{
styles
.
font1
}
>
{
data
?.
caseTitle
}
</
div
>
<
div
className=
{
styles
.
font1
}
>
{
data
?.
caseTitle
}
</
div
>
<
div
className=
{
styles
.
font2
}
style=
{
{
marginTop
:
18
,
marginBottom
:
41
}
}
>
<
div
className=
{
styles
.
font2
}
style=
{
{
marginTop
:
18
,
marginBottom
:
41
}
}
>
{
data
?.
createTime
&&
Moment
(
data
?.
createTime
).
format
(
'YYYY-MM-DD'
)
}
·作者:
{
data
?.
createTime
&&
Moment
(
data
?.
createTime
).
format
(
'YYYY-MM-DD'
)
}
{
data
?.
caseAuthor
||
'不详
'
}
{
data
?.
caseAuthor
?
` ·作者:${data?.caseAuthor}`
:
'
'
}
</
div
>
</
div
>
<
div
<
div
style=
{
{
lineHeight
:
1.5
}
}
style=
{
{
lineHeight
:
1.5
}
}
...
...
pages/projectInfo/components/bids/index.tsx
浏览文件 @
71f14a6b
...
@@ -13,6 +13,7 @@ type Props = {
...
@@ -13,6 +13,7 @@ type Props = {
districtCode
:
number
;
//区编码
districtCode
:
number
;
//区编码
provinceCode
:
number
;
//省编码
provinceCode
:
number
;
//省编码
};
};
showWxCodeModalEvent
:
()
=>
void
;
};
};
export
default
function
Bids
(
props
:
Props
)
{
export
default
function
Bids
(
props
:
Props
)
{
...
@@ -91,27 +92,18 @@ export default function Bids(props: Props) {
...
@@ -91,27 +92,18 @@ export default function Bids(props: Props) {
<
div
className=
{
styles
.
bids
}
style=
{
{
height
:
610
}
}
>
<
div
className=
{
styles
.
bids
}
style=
{
{
height
:
610
}
}
>
{
list
.
map
((
item
)
=>
{
{
list
.
map
((
item
)
=>
{
return
(
return
(
<
div
className=
{
styles
.
item
}
key=
{
item
.
id
}
onClick=
{
()
=>
toTenderProjectsDetail
(
item
)
}
>
<
div
className=
{
styles
.
item
}
key=
{
item
.
id
}
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
info
}
onClick=
{
()
=>
toTenderProjectsDetail
(
item
)
}
>
<
div
className=
{
styles
.
title
}
>
{
item
.
tenderTitle
}
</
div
>
<
div
className=
{
styles
.
title
}
>
{
item
.
tenderTitle
}
</
div
>
</
div
>
</
div
>
{
item
.
apply
?
(
<
Button
type=
'primary'
className=
{
styles
.
btn
}
>
<
Button
type=
'primary'
disabled
className=
{
`${styles.btn} ${styles.disabled}`
}
>
<
div
className=
{
styles
.
text1
}
>
<
div
className=
{
styles
.
text1
}
>
{
bigNumberTransform
(
item
.
tenderPrice
*
10000
,
true
)
}
{
bigNumberTransform
(
item
.
tenderPrice
*
10000
,
true
)
}
</
div
>
</
div
>
<
div
className=
{
styles
.
text2
}
onClick=
{
()
=>
props
.
showWxCodeModalEvent
()
}
>
<
div
className=
{
styles
.
text2
}
>
已申请
</
div
>
商务合作
</
Button
>
</
div
>
)
:
(
</
Button
>
<
Button
type=
'primary'
className=
{
styles
.
btn
}
>
<
div
className=
{
styles
.
text1
}
>
{
bigNumberTransform
(
item
.
tenderPrice
*
10000
,
true
)
}
</
div
>
<
div
className=
{
styles
.
text2
}
onClick=
{
()
=>
onApply
(
item
)
}
>
商务合作
</
div
>
</
Button
>
)
}
</
div
>
</
div
>
);
);
})
}
})
}
...
...
pages/projectInfo/components/cases/index.tsx
浏览文件 @
71f14a6b
...
@@ -3,6 +3,7 @@ import { useRouter } from 'next/router';
...
@@ -3,6 +3,7 @@ import { useRouter } from 'next/router';
import
{
useState
,
useEffect
}
from
'react'
;
import
{
useState
,
useEffect
}
from
'react'
;
import
api
,
{
Item
}
from
'./api'
;
import
api
,
{
Item
}
from
'./api'
;
import
styles
from
'./index.module.scss'
;
import
styles
from
'./index.module.scss'
;
import
WxCodeModal
from
'~/components/wxCodeModal'
;
type
Props
=
{
type
Props
=
{
params
?:
{
params
?:
{
...
@@ -11,6 +12,7 @@ type Props = {
...
@@ -11,6 +12,7 @@ type Props = {
districtCode
:
number
;
//区编码
districtCode
:
number
;
//区编码
provinceCode
:
number
;
//省编码
provinceCode
:
number
;
//省编码
};
};
showWxCodeModalEvent
:
()
=>
void
;
};
};
export
default
function
Cases
(
props
:
Props
)
{
export
default
function
Cases
(
props
:
Props
)
{
...
@@ -22,7 +24,6 @@ export default function Cases(props: Props) {
...
@@ -22,7 +24,6 @@ export default function Cases(props: Props) {
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
Router
=
useRouter
();
const
Router
=
useRouter
();
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -61,41 +62,43 @@ export default function Cases(props: Props) {
...
@@ -61,41 +62,43 @@ export default function Cases(props: Props) {
};
};
return
(
return
(
<
Spin
spinning=
{
loading
}
delay=
{
500
}
>
<>
<
div
className=
{
styles
.
casas
}
style=
{
{
height
:
612
}
}
>
<
Spin
spinning=
{
loading
}
delay=
{
500
}
>
{
list
.
map
((
item
)
=>
{
<
div
className=
{
styles
.
casas
}
style=
{
{
height
:
612
}
}
>
return
(
{
list
.
map
((
item
)
=>
{
<
div
className=
{
styles
.
item
}
key=
{
item
.
id
}
>
return
(
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
item
}
key=
{
item
.
id
}
>
<
div
<
div
className=
{
styles
.
info
}
>
className=
{
styles
.
title
}
<
div
onClick=
{
()
=>
Router
.
push
(
'/projectInfo/caseArticle/'
+
item
.
id
)
}
className=
{
styles
.
title
}
>
onClick=
{
()
=>
Router
.
push
(
'/projectInfo/caseArticle/'
+
item
.
id
)
}
{
item
.
caseTitle
}
>
{
item
.
caseTitle
}
</
div
>
</
div
>
</
div
>
<
Button
type=
'primary'
className=
{
styles
.
btn
}
onClick=
{
()
=>
props
.
showWxCodeModalEvent
()
}
>
联系品牌厂家
</
Button
>
</
div
>
</
div
>
<
Button
);
type=
'primary'
})
}
className=
{
styles
.
btn
}
{
list
.
length
===
0
&&
<
Empty
></
Empty
>
}
onClick=
{
()
=>
Router
.
push
(
'/projectInfo/caseArticle/'
+
item
.
id
)
}
</
div
>
>
<
Pagination
联系品牌厂家
current=
{
pageParams
.
pageNo
}
</
Button
>
defaultPageSize=
{
pageParams
.
pageSize
}
</
div
>
showSizeChanger=
{
false
}
);
showQuickJumper
})
}
total=
{
count
}
{
list
.
length
===
0
&&
<
Empty
></
Empty
>
}
onChange=
{
onPageChange
}
</
div
>
hideOnSinglePage=
{
true
}
<
Pagination
style=
{
{
marginTop
:
20
}
}
current=
{
pageParams
.
pageNo
}
/>
defaultPageSize=
{
pageParams
.
pageSize
}
</
Spin
>
showSizeChanger=
{
false
}
</>
showQuickJumper
total=
{
count
}
onChange=
{
onPageChange
}
hideOnSinglePage=
{
true
}
style=
{
{
marginTop
:
20
}
}
/>
</
Spin
>
);
);
}
}
pages/projectInfo/components/news/index.module.scss
浏览文件 @
71f14a6b
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
.info
{
.info
{
padding-left
:
3px
;
padding-left
:
3px
;
padding-right
:
83px
;
padding-right
:
83px
;
flex
:
1
;
.title
{
.title
{
font-size
:
16px
;
font-size
:
16px
;
font-family
:
MicrosoftYaHeiUI-Bold
,
MicrosoftYaHeiUI
;
font-family
:
MicrosoftYaHeiUI-Bold
,
MicrosoftYaHeiUI
;
...
@@ -49,6 +49,11 @@
...
@@ -49,6 +49,11 @@
line-height
:
22px
;
line-height
:
22px
;
margin-top
:
6px
;
margin-top
:
6px
;
@include
ellipsis
(
1
);
@include
ellipsis
(
1
);
width
:
100%
;
video
{
max-width
:
100%
;
height
:
auto
;
}
}
}
.date
{
.date
{
...
...
pages/projectInfo/components/news/index.tsx
浏览文件 @
71f14a6b
import
{
Col
,
Empty
,
Pagination
,
Row
,
Spin
}
from
'antd'
;
import
{
Button
,
Col
,
Empty
,
Pagination
,
Row
,
Spin
}
from
'antd'
;
import
styles
from
'./index.module.scss'
;
import
styles
from
'./index.module.scss'
;
import
Image
from
'next/image'
;
import
Image
from
'next/image'
;
import
{
useState
,
useEffect
,
useContext
}
from
'react'
;
import
{
useState
,
useEffect
,
useContext
}
from
'react'
;
...
@@ -13,6 +13,7 @@ type Props = {
...
@@ -13,6 +13,7 @@ type Props = {
districtCode
:
number
;
//区编码
districtCode
:
number
;
//区编码
provinceCode
:
number
;
//省编码
provinceCode
:
number
;
//省编码
};
};
showWxCodeModalEvent
:
()
=>
void
;
};
};
export
default
function
News
(
props
:
Props
)
{
export
default
function
News
(
props
:
Props
)
{
...
@@ -103,13 +104,16 @@ export default function News(props: Props) {
...
@@ -103,13 +104,16 @@ export default function News(props: Props) {
{
item
.
createTime
}
· 作者:
{
item
.
newsAuthor
}
{
item
.
createTime
}
· 作者:
{
item
.
newsAuthor
}
</
div
>
</
div
>
</
div
>
</
div
>
{
/*<Button*/
}
<
Button
{
/* type='primary'*/
}
type=
'primary'
{
/* style={{ width: 120, height: 40, flexShrink: 0 }}*/
}
style=
{
{
width
:
120
,
height
:
40
,
flexShrink
:
0
}
}
{
/* onClick={onGetInfo}*/
}
onClick=
{
(
e
)
=>
{
{
/*>*/
}
props
.
showWxCodeModalEvent
();
{
/* 获取产品资料 */
}
e
.
stopPropagation
();
{
/*</Button>*/
}
}
}
>
获取产品资料
</
Button
>
</
div
>
</
div
>
);
);
})
}
})
}
...
...
pages/projectInfo/index.page.tsx
浏览文件 @
71f14a6b
...
@@ -7,6 +7,7 @@ import Bids from './components/bids'; //招投标项目
...
@@ -7,6 +7,7 @@ import Bids from './components/bids'; //招投标项目
import
Cases
from
'./components/cases'
;
//业务案例
import
Cases
from
'./components/cases'
;
//业务案例
import
News
from
'./components/news'
;
//行业新闻
import
News
from
'./components/news'
;
//行业新闻
import
commonApi
,
{
RegionResp
}
from
'~/api'
;
import
commonApi
,
{
RegionResp
}
from
'~/api'
;
import
WxCodeModal
from
'~/components/wxCodeModal'
;
export
interface
Params
{
export
interface
Params
{
cityCode
?:
number
;
//市编码
cityCode
?:
number
;
//市编码
...
@@ -15,37 +16,38 @@ export interface Params {
...
@@ -15,37 +16,38 @@ export interface Params {
provinceCode
?:
number
;
//省编码
provinceCode
?:
number
;
//省编码
}
}
const
items
=
(
params
:
any
)
=>
export
default
function
ProjectInfo
()
{
[
/* "项目需求", */
'招标快讯'
,
'业务案例'
,
'行业新闻'
].
map
((
value
)
=>
{
const
items
=
(
params
:
any
)
=>
let
children
:
JSX
.
Element
|
string
=
<></>;
[
/* "项目需求", */
'招标快讯'
,
'业务案例'
,
'行业新闻'
].
map
((
value
)
=>
{
let
children
:
JSX
.
Element
|
string
=
<></>;
switch
(
value
)
{
switch
(
value
)
{
case
'项目需求'
:
case
'项目需求'
:
children
=
<
Requirements
params=
{
params
}
></
Requirements
>;
children
=
<
Requirements
params=
{
params
}
></
Requirements
>;
break
;
break
;
case
'招标快讯'
:
case
'招标快讯'
:
children
=
<
Bids
params=
{
params
}
></
Bids
>;
children
=
<
Bids
params=
{
params
}
showWxCodeModalEvent=
{
showWxCodeModalEvent
}
></
Bids
>;
break
;
break
;
case
'业务案例'
:
case
'业务案例'
:
children
=
<
Cases
params=
{
params
}
></
Cases
>;
children
=
<
Cases
params=
{
params
}
showWxCodeModalEvent=
{
showWxCodeModalEvent
}
></
Cases
>;
break
;
break
;
case
'行业新闻'
:
case
'行业新闻'
:
children
=
<
News
params=
{
params
}
></
News
>;
children
=
<
News
params=
{
params
}
showWxCodeModalEvent=
{
showWxCodeModalEvent
}
></
News
>;
break
;
break
;
}
}
return
{
return
{
label
:
`
${
value
}
`
,
label
:
`
${
value
}
`
,
key
:
value
,
key
:
value
,
children
:
children
,
children
:
children
,
};
};
});
});
export
default
function
ProjectInfo
()
{
const
[
region
,
setRegion
]
=
useState
<
Array
<
RegionResp
>>
([]);
const
[
region
,
setRegion
]
=
useState
<
Array
<
RegionResp
>>
([]);
const
[
params
,
setParams
]
=
useState
<
Params
|
null
>
({});
const
[
params
,
setParams
]
=
useState
<
Params
|
null
>
({});
const
[
wxCodeShow
,
setWXCodeShow
]
=
useState
<
boolean
>
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
window
!
.
document
!
.
querySelector
(
'body'
)
!
.
style
.
background
=
'#fff'
;
window
!
.
document
!
.
querySelector
(
'body'
)
!
.
style
.
background
=
'#fff'
;
...
@@ -91,6 +93,12 @@ export default function ProjectInfo() {
...
@@ -91,6 +93,12 @@ export default function ProjectInfo() {
date
:
dateString
||
undefined
,
date
:
dateString
||
undefined
,
});
});
};
};
const
showWxCodeModalEvent
=
()
=>
{
setWXCodeShow
(
true
);
};
const
wxCodeModalCancel
=
()
=>
{
setWXCodeShow
(
false
);
};
return
(
return
(
<
Layout
layoutStyle=
{
{
backgroundColor
:
'#fff'
}
}
hideFooter
>
<
Layout
layoutStyle=
{
{
backgroundColor
:
'#fff'
}
}
hideFooter
>
<
div
style=
{
{
backgroundColor
:
'#fff'
,
minHeight
:
820
}
}
>
<
div
style=
{
{
backgroundColor
:
'#fff'
,
minHeight
:
820
}
}
>
...
@@ -127,6 +135,7 @@ export default function ProjectInfo() {
...
@@ -127,6 +135,7 @@ export default function ProjectInfo() {
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
<
WxCodeModal
open=
{
wxCodeShow
}
onCancel=
{
wxCodeModalCancel
}
/>
</
Layout
>
</
Layout
>
);
);
}
}
pages/projectInfo/newsArticle/[id].page.tsx
浏览文件 @
71f14a6b
...
@@ -70,7 +70,7 @@ export default function CaseArticle() {
...
@@ -70,7 +70,7 @@ export default function CaseArticle() {
<
div
className=
{
styles
.
font1
}
>
{
data
?.
newsTitle
}
</
div
>
<
div
className=
{
styles
.
font1
}
>
{
data
?.
newsTitle
}
</
div
>
<
div
className=
{
styles
.
font2
}
style=
{
{
marginTop
:
18
,
marginBottom
:
41
}
}
>
<
div
className=
{
styles
.
font2
}
style=
{
{
marginTop
:
18
,
marginBottom
:
41
}
}
>
{
data
?.
createTime
&&
Moment
(
data
?.
createTime
).
format
(
'YYYY-MM-DD'
)
}
·作者:
{
data
?.
createTime
&&
Moment
(
data
?.
createTime
).
format
(
'YYYY-MM-DD'
)
}
·作者:
{
data
?.
newsAuthor
||
'不详
'
}
{
data
?.
newsAuthor
?
` ·作者:${data?.newsAuthor}`
:
'
'
}
</
div
>
</
div
>
<
div
<
div
style=
{
{
lineHeight
:
1.5
}
}
style=
{
{
lineHeight
:
1.5
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论