Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
c2801cef
提交
c2801cef
authored
5月 19, 2023
作者:
曹云
浏览文件
操作
浏览文件
下载
差异文件
合并master代码
上级
35ecb3b6
d487663a
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
49 行增加
和
17 行删除
+49
-17
index.tsx
components/filter/index.tsx
+7
-5
index.tsx
...ipmentLeasing/detail/components/picture-preview/index.tsx
+1
-1
index.page.tsx
pages/equipmentLeasing/index.page.tsx
+8
-3
图标.png
pages/home/waterfallFlowBody/assets/图标.png
+0
-0
index.tsx
pages/home/waterfallFlowBody/index.tsx
+1
-1
index.page.tsx
pages/mall/index.page.tsx
+32
-7
没有找到文件。
components/filter/index.tsx
浏览文件 @
c2801cef
import
CategoryItem
from
"./compoents/categoryItem"
;
import
CategoryItem
from
"./compoents/categoryItem"
;
import
{
FilterOptionResp
,
leasingApi
,
mallApi
}
from
"./api"
;
import
{
FilterOptionResp
,
RegionResp
}
from
"./api"
;
import
ResultItem
from
"./compoents/resultItem"
;
import
ResultItem
from
"./compoents/resultItem"
;
import
RegionItem
from
"./compoents/regionItem"
;
import
RegionItem
from
"./compoents/regionItem"
;
import
styles
from
"./index.module.scss"
;
import
styles
from
"./index.module.scss"
;
...
@@ -10,7 +10,12 @@ import PartItem from "./compoents/partItem";
...
@@ -10,7 +10,12 @@ import PartItem from "./compoents/partItem";
import
QualityItem
from
"./compoents/qualityItem"
;
import
QualityItem
from
"./compoents/qualityItem"
;
export
type
FilterResult
=
{
export
type
FilterResult
=
{
category
?:
FilterOptionResp
|
undefined
;
region
?:
RegionResp
;
brand
?:
FilterOptionResp
;
category
?:
FilterOptionResp
;
part
?:
FilterOptionResp
;
model
?:
FilterOptionResp
;
quality
?:
FilterOptionResp
;
};
};
type
itemType
=
"类目"
|
"地域"
|
"品牌"
|
"部件"
|
"型号"
|
"成色"
;
type
itemType
=
"类目"
|
"地域"
|
"品牌"
|
"部件"
|
"型号"
|
"成色"
;
...
@@ -86,6 +91,3 @@ export default function Filter(props: Props) {
...
@@ -86,6 +91,3 @@ export default function Filter(props: Props) {
</>
</>
);
);
}
}
Filter
.
mallApi
=
mallApi
;
Filter
.
leasingApi
=
leasingApi
;
pages/equipmentLeasing/detail/components/picture-preview/index.tsx
浏览文件 @
c2801cef
import
React
,
{
useState
,
useRef
}
from
'react'
import
React
,
{
useState
,
useRef
}
from
'react'
import
{
Box
}
from
'./styled'
;
import
{
Box
}
from
'./styled'
;
import
{
LeftOutlined
,
RightOutlined
}
from
'@ant-design/icons'
;
import
{
LeftOutlined
,
RightOutlined
}
from
'@ant-design/icons'
;
export
default
function
index
()
{
export
default
function
PicturePreview
()
{
const
mask
=
useRef
<
HTMLDivElement
>
(
null
!
)
const
mask
=
useRef
<
HTMLDivElement
>
(
null
!
)
const
moveBox
=
useRef
<
HTMLDivElement
>
(
null
!
)
const
moveBox
=
useRef
<
HTMLDivElement
>
(
null
!
)
const
big
=
useRef
<
HTMLImageElement
>
(
null
!
)
const
big
=
useRef
<
HTMLImageElement
>
(
null
!
)
...
...
pages/equipmentLeasing/index.page.tsx
浏览文件 @
c2801cef
...
@@ -8,13 +8,18 @@ import Filter, { FilterResult } from "~/components/filter";
...
@@ -8,13 +8,18 @@ import Filter, { FilterResult } from "~/components/filter";
import
{
FilterOptionResp
}
from
"~/components/filter/api"
;
import
{
FilterOptionResp
}
from
"~/components/filter/api"
;
// 此函数在构建时被调用
// 此函数在构建时被调用
export
async
function
getServerSideProps
()
{
export
async
function
getStaticProps
()
{
//获取筛选数据,进行静态渲染
return
{
return
{
props
:
{},
props
:
{
},
};
};
}
}
export
default
function
EquipmentLeasing
()
{
type
Props
=
{
};
export
default
function
EquipmentLeasing
(
props
:
Props
)
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
leftDom
=
<
div
className=
'item'
onClick=
{
()
=>
router
.
push
(
'/equipmentLeasing/detail/1'
)
}
>
const
leftDom
=
<
div
className=
'item'
onClick=
{
()
=>
router
.
push
(
'/equipmentLeasing/detail/1'
)
}
>
...
...
pages/home/waterfallFlowBody/assets/
icon
.png
→
pages/home/waterfallFlowBody/assets/
图标
.png
浏览文件 @
c2801cef
File moved
pages/home/waterfallFlowBody/index.tsx
浏览文件 @
c2801cef
...
@@ -5,7 +5,7 @@ import { Box } from "./styled";
...
@@ -5,7 +5,7 @@ import { Box } from "./styled";
import
ContentBox
from
"~/components/contentBox"
;
import
ContentBox
from
"~/components/contentBox"
;
import
RotationChart
from
"./components/rotationChart"
;
import
RotationChart
from
"./components/rotationChart"
;
import
Map
from
"./components/map"
;
import
Map
from
"./components/map"
;
import
icon
from
"./assets/
icon
.png"
;
import
icon
from
"./assets/
图标
.png"
;
// const icon = "error";
// const icon = "error";
export
default
function
WaterfallFlowBody
()
{
export
default
function
WaterfallFlowBody
()
{
const
onMoreChange
=
(
value
:
string
)
=>
{
const
onMoreChange
=
(
value
:
string
)
=>
{
...
...
pages/mall/index.page.tsx
浏览文件 @
c2801cef
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
{
Button
,
Select
,
Space
,
Tag
}
from
"antd"
;
import
{
Button
,
Pagination
,
Select
,
Space
,
Tag
}
from
"antd"
;
import
Layout
from
"~/components/layout"
;
import
Layout
from
"~/components/layout"
;
import
styles
from
"./index.module.scss"
;
import
styles
from
"./index.module.scss"
;
import
{
useRouter
}
from
"next/router"
;
import
{
useRouter
}
from
"next/router"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
Filter
,
{
FilterResult
}
from
"~/components/filter"
;
import
Filter
,
{
FilterResult
}
from
"~/components/filter"
;
import
api
,
{
Goods
}
from
"./api"
;
import
api
,
{
Goods
,
ListPageGoodsInfoParams
}
from
"./api"
;
// 此函数在构建时被调用
// 此函数在构建时被调用
export
async
function
getServerSideProps
()
{
export
async
function
getServerSideProps
()
{
...
@@ -20,22 +20,40 @@ export default function Mall(props: Props) {
...
@@ -20,22 +20,40 @@ export default function Mall(props: Props) {
const
router
=
useRouter
();
const
router
=
useRouter
();
const
[
productList
,
setProductList
]
=
useState
(
Array
<
Goods
>
);
const
[
productList
,
setProductList
]
=
useState
(
Array
<
Goods
>
);
const
[
filterResult
,
setFilterResult
]
=
useState
<
FilterResult
>
({});
const
[
filterResult
,
setFilterResult
]
=
useState
<
FilterResult
>
({});
const
[
pageParams
,
setPageParams
]
=
useState
({
pageNo
:
1
,
pageSize
:
16
,
});
const
[
count
,
setCount
]
=
useState
(
0
);
useEffect
(()
=>
{
useEffect
(()
=>
{
api
api
.
listPageGoodsInfo
({
.
listPageGoodsInfo
({
brandId
:
1
,
brandId
:
filterResult
.
brand
?.
id
,
pageNo
:
1
,
districtId
:
filterResult
.
region
?.
id
,
pageSize
:
10
,
modelId
:
filterResult
.
model
?.
id
,
partsId
:
filterResult
.
part
?.
id
,
productCategoryId
:
filterResult
.
category
?.
id
,
qualityId
:
filterResult
.
quality
?.
id
,
...
pageParams
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
setProductList
(
res
.
result
?.
list
||
[]);
setProductList
(
res
.
result
?.
list
||
[]);
setCount
(
res
.
result
?.
totalCount
);
});
});
},
[]);
},
[
filterResult
,
pageParams
]);
const
onFilterChange
=
(
filterResult
:
FilterResult
)
=>
{
const
onFilterChange
=
(
filterResult
:
FilterResult
)
=>
{
console
.
log
(
"filterResult"
,
filterResult
);
console
.
log
(
"filterResult"
,
filterResult
);
setFilterResult
(
filterResult
);
};
};
const
onPageChange
=
(
page
:
number
,
pageSize
:
number
)
=>
{
setPageParams
({
...
pageParams
,
pageNo
:
page
,
})
}
return
(
return
(
<
Layout
>
<
Layout
>
<
div
className=
"page"
style=
{
{
paddingTop
:
"18px"
}
}
>
<
div
className=
"page"
style=
{
{
paddingTop
:
"18px"
}
}
>
...
@@ -65,10 +83,17 @@ export default function Mall(props: Props) {
...
@@ -65,10 +83,17 @@ export default function Mall(props: Props) {
></
Image
>
></
Image
>
</
div
>
</
div
>
<
div
className=
{
styles
.
title
}
>
{
item
.
goodsName
}
</
div
>
<
div
className=
{
styles
.
title
}
>
{
item
.
goodsName
}
</
div
>
<
div
className=
{
styles
.
sellCount
}
>
半年售
12987
</
div
>
<
div
className=
{
styles
.
sellCount
}
>
半年售
{
(
Math
.
floor
(
Math
.
random
()
*
901
)
+
100
).
toFixed
(
0
)
}
</
div
>
</
li
>
</
li
>
);
);
})
}
})
}
<
Pagination
current=
{
pageParams
.
pageNo
}
showSizeChanger=
{
false
}
showQuickJumper
total=
{
count
}
onChange=
{
onPageChange
}
/>
</
ul
>
</
ul
>
<
div
className=
{
styles
.
adList
}
>
<
div
className=
{
styles
.
adList
}
>
<
div
className=
{
styles
.
ad
}
></
div
>
<
div
className=
{
styles
.
ad
}
></
div
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论