Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
9ca00270
提交
9ca00270
authored
6月 10, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商城接口更新1.0.1
上级
1ab84db7
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
94 行增加
和
93 行删除
+94
-93
index.ts
pages/mall/api/index.ts
+13
-22
[id].page.tsx
pages/mall/detail/[id].page.tsx
+5
-5
index.ts
pages/mall/detail/api/index.ts
+45
-47
index.tsx
pages/mall/detail/components/intentionModal/index.tsx
+2
-2
index.page.tsx
pages/mall/index.page.tsx
+10
-6
index.ts
pages/personalCenter/mallOrders/api/index.ts
+9
-9
index.page.tsx
pages/personalCenter/mallOrders/index.page.tsx
+10
-2
没有找到文件。
pages/mall/api/index.ts
浏览文件 @
9ca00270
import
request
,
{
Response
}
from
'~/api/request'
;
import
request
,
{
Response
}
from
'~/api/request'
;
export
interface
ListPageGoodsInfoParams
{
export
interface
DeviceListParams
{
"brandId"
?:
number
,
categoryId
?:
any
[];
"districtId"
?:
number
,
pageNo
:
number
;
"modelId"
?:
number
,
pageSize
:
number
;
"pageNo"
:
number
,
provinceId
?:
number
;
"pageSize"
:
number
,
type
:
number
;
"partsId"
?:
number
,
"productCategoryId"
?:
number
,
"qualityId"
?:
number
}
}
export
interface
Goods
{
export
interface
Goods
{
"createTime"
:
string
,
id
:
number
;
"directoryId"
:
number
,
goodsName
:
string
;
"directoryName"
:
string
,
images
:
string
;
"goodsName"
:
string
,
price
?:
any
;
"goodsOneLevelTypeName"
:
string
,
"goodsTwoLevelTypeName"
:
string
,
"id"
:
number
,
"imgUrl"
:
string
,
"isCoupons"
:
number
,
"status"
:
number
}
}
export
interface
ListPageGoodsInfo
Resp
{
export
interface
DeviceList
Resp
{
"pageNo"
:
1
,
"pageNo"
:
1
,
"pageSize"
:
10
,
"pageSize"
:
10
,
"list"
:
Array
<
Goods
>
,
"list"
:
Array
<
Goods
>
,
...
@@ -39,8 +30,8 @@ export interface Ad {
...
@@ -39,8 +30,8 @@ export interface Ad {
export
default
{
export
default
{
//web-商品信息-分页
//web-商品信息-分页
listPageGoodsInfo
:
(
params
:
ListPageGoodsInfoParams
,
options
=
{}):
Promise
<
Response
<
ListPageGoodsInfo
Resp
>>
=>
{
deviceList
:
(
params
:
DeviceListParams
,
options
=
{}):
Promise
<
Response
<
DeviceList
Resp
>>
=>
{
return
request
(
'/pms/
webProductMall/listPageGoodsInfo
'
,
'post'
,
params
,
options
)
return
request
(
'/pms/
product/mall/deviceList
'
,
'post'
,
params
,
options
)
},
},
//产品商城广告位
//产品商城广告位
ad
:
():
Promise
<
Response
<
Array
<
Ad
>>>
=>
{
ad
:
():
Promise
<
Response
<
Array
<
Ad
>>>
=>
{
...
...
pages/mall/detail/[id].page.tsx
浏览文件 @
9ca00270
...
@@ -13,7 +13,7 @@ import { Navigation } from "swiper";
...
@@ -13,7 +13,7 @@ import { Navigation } from "swiper";
// Import Swiper styles
// Import Swiper styles
import
"swiper/css"
;
import
"swiper/css"
;
import
"swiper/css/navigation"
;
import
"swiper/css/navigation"
;
import
api
,
{
Get
AppGoodsInfoDetailResult
}
from
"./api"
;
import
api
,
{
Get
LeaseGoodsDetailResp
}
from
"./api"
;
import
IntentionModal
from
"./components/intentionModal"
;
import
IntentionModal
from
"./components/intentionModal"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
...
@@ -22,7 +22,7 @@ export default function MallDetail() {
...
@@ -22,7 +22,7 @@ export default function MallDetail() {
const
[
visible
,
setVisible
]
=
useState
(
false
);
//商品图预览
const
[
visible
,
setVisible
]
=
useState
(
false
);
//商品图预览
const
router
=
useRouter
();
const
router
=
useRouter
();
const
[
id
,
setId
]
=
useState
<
number
|
null
>
(
null
);
const
[
id
,
setId
]
=
useState
<
number
|
null
>
(
null
);
const
[
detail
,
setDetail
]
=
useState
<
Get
AppGoodsInfoDetailResult
|
null
>
(
const
[
detail
,
setDetail
]
=
useState
<
Get
LeaseGoodsDetailResp
|
null
>
(
null
null
);
//详情数据
);
//详情数据
const
[
intentionModalOpen
,
setIntentionModalOpen
]
=
useState
(
false
);
//意向弹窗
const
[
intentionModalOpen
,
setIntentionModalOpen
]
=
useState
(
false
);
//意向弹窗
...
@@ -53,8 +53,8 @@ export default function MallDetail() {
...
@@ -53,8 +53,8 @@ export default function MallDetail() {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
id
)
{
if
(
id
)
{
api
api
.
get
AppGoodsInfo
Detail
({
.
get
LeaseGoods
Detail
({
i
d
:
id
,
goodsI
d
:
id
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
setDetail
(
res
.
result
||
null
);
setDetail
(
res
.
result
||
null
);
...
@@ -132,7 +132,7 @@ export default function MallDetail() {
...
@@ -132,7 +132,7 @@ export default function MallDetail() {
className=
{
`${styles.font2} ${styles.ellipsis}`
}
className=
{
`${styles.font2} ${styles.ellipsis}`
}
style=
{
{
height
:
22
}
}
style=
{
{
height
:
22
}
}
>
>
{
detail
?.
goodsDesc
}
{
detail
?.
goodsDe
tail
?.
goodsDe
sc
}
</
div
>
</
div
>
<
Space
<
Space
size=
{
24
}
size=
{
24
}
...
...
pages/mall/detail/api/index.ts
浏览文件 @
9ca00270
import
request
,
{
Response
}
from
"~/api/request"
import
request
,
{
Response
}
from
"~/api/request"
export
interface
Get
AppGoodsInfo
DetailParams
{
export
interface
Get
LeaseGoods
DetailParams
{
i
d
:
number
goodsI
d
:
number
}
}
export
interface
Get
AppGoodsInfoDetailResult
{
export
interface
Get
LeaseGoodsDetailResp
{
id
:
number
;
id
:
number
;
pid
?:
number
;
images
:
Image
[];
goodsName
?:
string
;
goodsVideo
?:
any
;
shareFlyServiceId
?:
number
;
goodsVideoId
?:
any
;
repoId
?:
number
;
goodsName
:
string
;
goodsSpec
?:
GoodsSpec
[];
goodsNo
:
string
;
images
?:
Image
[];
goodsDetail
:
GoodsDetail
;
goodsVideo
?:
string
;
directoryId
:
number
;
goodsVideoId
?:
number
;
categoryByOne
:
number
;
goodsDetail
?:
GoodsDetail
;
categoryByTwo
?:
any
;
sortTypeId
?:
number
;
tag
?:
any
;
masterTypeId
?:
number
;
shelfStatus
:
number
;
slaveTypeId
?:
number
;
goodsSpec
:
GoodsSpec
[];
tag
?:
string
;
otherService
:
OtherService
[];
shelfStatus
?:
number
;
price
?:
any
;
otherService
?:
OtherService
[];
question
?:
Question
[];
goodsDesc
?:
string
}
}
export
interface
GoodsDetail
{
export
interface
OtherService
{
id
:
number
;
goodsDesc
:
string
;
content
:
string
;
remark
?:
any
;
}
export
interface
Image
{
id
:
number
;
id
:
number
;
imgUrl
:
string
;
saleServiceId
:
number
;
imgType
:
number
;
serviceName
:
string
;
}
}
export
interface
GoodsSpec
{
export
interface
GoodsSpec
{
id
:
number
;
id
:
number
;
goodsSpecName
:
string
;
goodsSpecName
:
string
;
goodsType
Id
:
number
;
category
Id
:
number
;
typeName
:
string
;
typeName
:
string
;
skuId
:
number
;
skuId
:
number
;
brandInfoId
:
number
;
brandInfoId
?:
any
;
skuName
:
string
;
skuName
:
string
;
productSpecList
:
ProductSpec
[];
productSpecList
:
ProductSpec
List
[];
industrySpecList
?:
any
;
industrySpecList
?:
any
;
chooseType
:
number
;
chooseType
:
number
;
skuUnitId
:
number
;
skuUnitId
:
number
;
unitName
:
string
;
unitName
:
string
;
must
:
number
;
must
:
number
;
flag
?:
any
;
flag
:
number
;
}
}
export
interface
ProductSpec
{
export
interface
ProductSpec
List
{
id
:
number
;
id
:
number
;
productSpec
:
number
;
productSpec
:
number
;
productSkuId
:
number
;
productSkuId
:
number
;
...
@@ -64,26 +54,33 @@ export interface ProductSpec {
...
@@ -64,26 +54,33 @@ export interface ProductSpec {
partNo
:
string
;
partNo
:
string
;
versionDesc
:
string
;
versionDesc
:
string
;
createTime
?:
any
;
createTime
?:
any
;
productSpecCPQVO
?:
any
;
productSpecCPQVO
:
ProductSpecCPQVO
;
}
}
export
interface
Question
{
export
interface
ProductSpecCPQVO
{
answer
:
string
,
productSpecId
:
number
;
id
:
number
,
type
:
number
;
question
:
string
leaseTerm
?:
any
;
specPrice
:
any
[];
}
}
//其他服务: 1:免费配送,2:专业飞手培训2日, 3:半年保修, 4:一年保修
export
interface
GoodsDetail
{
export
interface
OtherService
{
id
:
number
;
id
:
number
,
goodsDesc
:
string
;
saleServiceId
:
number
,
content
:
string
;
serviceName
:
string
remark
?:
any
;
}
export
interface
Image
{
id
:
number
;
imgUrl
:
string
;
imgType
:
number
;
}
}
export
default
{
export
default
{
//web-获取商品详细信息--共多少种选择
//web-获取商品详细信息--共多少种选择
get
AppGoodsInfoDetail
(
params
:
GetAppGoodsInfoDetailParams
):
Promise
<
Response
<
GetAppGoodsInfoDetailResult
>>
{
get
LeaseGoodsDetail
(
params
:
GetLeaseGoodsDetailParams
):
Promise
<
Response
<
GetLeaseGoodsDetailResp
>>
{
return
request
(
'/pms/
webProductMall/getAppGoodsInfo
Detail'
,
'get'
,
params
)
return
request
(
'/pms/
product/mall/getLeaseGoods
Detail'
,
'get'
,
params
)
}
}
}
}
\ No newline at end of file
pages/mall/detail/components/intentionModal/index.tsx
浏览文件 @
9ca00270
import
{
Button
,
Col
,
Image
,
Modal
,
Row
,
Space
}
from
"antd"
;
import
{
Button
,
Col
,
Image
,
Modal
,
Row
,
Space
}
from
"antd"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
errImg
from
"~/assets/errImg"
;
import
errImg
from
"~/assets/errImg"
;
import
{
Get
AppGoodsInfoDetailResult
}
from
"../../api"
;
import
{
Get
LeaseGoodsDetailResp
}
from
"../../api"
;
import
styles
from
"./index.module.scss"
;
import
styles
from
"./index.module.scss"
;
type
Props
=
{
type
Props
=
{
open
?:
boolean
;
open
?:
boolean
;
onOk
?:
(
e
:
React
.
MouseEvent
<
HTMLButtonElement
>
)
=>
void
;
onOk
?:
(
e
:
React
.
MouseEvent
<
HTMLButtonElement
>
)
=>
void
;
onCancel
:
(
e
:
React
.
MouseEvent
<
HTMLButtonElement
>
)
=>
void
;
onCancel
:
(
e
:
React
.
MouseEvent
<
HTMLButtonElement
>
)
=>
void
;
detail
:
Get
AppGoodsInfoDetailResult
|
null
;
detail
:
Get
LeaseGoodsDetailResp
|
null
;
};
};
export
default
function
IntentionModal
(
props
:
Props
)
{
export
default
function
IntentionModal
(
props
:
Props
)
{
const
[
checkedMap
,
setCheckedMap
]
=
useState
<
{
string
?:
boolean
}
>
({});
//通过索引记录选中的产品规格 例: {'1,1': true|false}
const
[
checkedMap
,
setCheckedMap
]
=
useState
<
{
string
?:
boolean
}
>
({});
//通过索引记录选中的产品规格 例: {'1,1': true|false}
...
...
pages/mall/index.page.tsx
浏览文件 @
9ca00270
...
@@ -4,7 +4,7 @@ import Layout from "~/components/layout";
...
@@ -4,7 +4,7 @@ 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
Filter
,
{
AdapterResult
,
FilterResult
}
from
"~/components/filter"
;
import
Filter
,
{
AdapterResult
,
FilterResult
}
from
"~/components/filter"
;
import
api
,
{
Ad
,
Goods
,
ListPageGoodsInfoParams
}
from
"./api"
;
import
api
,
{
Ad
,
Goods
}
from
"./api"
;
import
errImg
from
"~/assets/errImg"
;
import
errImg
from
"~/assets/errImg"
;
// 此函数在构建时被调用
// 此函数在构建时被调用
...
@@ -35,16 +35,17 @@ export default function Mall(props: Props) {
...
@@ -35,16 +35,17 @@ export default function Mall(props: Props) {
setAbort
(
new
AbortController
());
setAbort
(
new
AbortController
());
},
[
filterResult
,
pageParams
]);
},
[
filterResult
,
pageParams
]);
//
端口
列表请求
//
商品
列表请求
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
abort
)
{
if
(
!
abort
)
{
return
;
return
;
}
}
setLoading
(
true
);
setLoading
(
true
);
api
api
.
listPageGoodsInfo
(
.
deviceList
(
{
{
...
filterResult
,
provinceId
:
filterResult
.
districtId
,
type
:
0
,
...
pageParams
,
...
pageParams
,
},
},
{
{
...
@@ -83,7 +84,7 @@ export default function Mall(props: Props) {
...
@@ -83,7 +84,7 @@ export default function Mall(props: Props) {
<
Layout
>
<
Layout
>
<
div
className=
"page"
style=
{
{
paddingTop
:
"18px"
}
}
>
<
div
className=
"page"
style=
{
{
paddingTop
:
"18px"
}
}
>
<
Filter
<
Filter
types=
{
[
"类目"
,
"地域"
,
"品牌"
,
"部件"
,
/* "型号", "成色" */
]
}
types=
{
[
"类目"
,
"地域"
,
"品牌"
,
"部件"
/* "型号", "成色" */
]
}
showResultItem
showResultItem
onChange=
{
onFilterChange
}
onChange=
{
onFilterChange
}
></
Filter
>
></
Filter
>
...
@@ -91,6 +92,7 @@ export default function Mall(props: Props) {
...
@@ -91,6 +92,7 @@ export default function Mall(props: Props) {
<
div
className=
{
styles
.
productList
}
>
<
div
className=
{
styles
.
productList
}
>
<
div
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
listContent
}
>
<
div
className=
{
styles
.
listContent
}
>
<
Spin
spinning=
{
loading
}
delay=
{
500
}
>
<
ul
className=
{
styles
.
listWrap
}
>
<
ul
className=
{
styles
.
listWrap
}
>
{
productList
.
map
((
item
,
i
)
=>
{
{
productList
.
map
((
item
,
i
)
=>
{
return
(
return
(
...
@@ -102,7 +104,7 @@ export default function Mall(props: Props) {
...
@@ -102,7 +104,7 @@ export default function Mall(props: Props) {
<
div
className=
{
styles
.
imgBox
}
>
<
div
className=
{
styles
.
imgBox
}
>
<
Image
<
Image
alt=
""
alt=
""
src=
{
item
.
imgUrl
}
src=
{
item
.
images
}
className=
{
styles
.
img
}
className=
{
styles
.
img
}
width=
{
116
}
width=
{
116
}
height=
{
116
}
height=
{
116
}
...
@@ -127,6 +129,8 @@ export default function Mall(props: Props) {
...
@@ -127,6 +129,8 @@ export default function Mall(props: Props) {
></
Empty
>
></
Empty
>
)
}
)
}
</
ul
>
</
ul
>
</
Spin
>
<
div
className=
{
styles
.
paginationPage
}
>
<
div
className=
{
styles
.
paginationPage
}
>
<
Pagination
<
Pagination
current=
{
pageParams
.
pageNo
}
current=
{
pageParams
.
pageNo
}
...
...
pages/personalCenter/mallOrders/api/index.ts
浏览文件 @
9ca00270
import
request
,
{
Response
}
from
"~/api/request"
import
request
,
{
Response
}
from
"~/api/request"
export
interface
l
istPageParams
{
export
interface
L
istPageParams
{
keyword
?:
string
,
keyword
?:
string
,
showType
:
number
,
showType
:
number
,
pageNo
:
number
;
pageNo
:
number
;
pageSize
:
number
;
pageSize
:
number
;
}
}
export
interface
l
istPageResp
{
export
interface
L
istPageResp
{
pageNo
:
number
;
pageNo
:
number
;
pageSize
:
number
;
pageSize
:
number
;
list
:
OrderList
[];
list
:
OrderList
[];
...
@@ -78,21 +78,20 @@ interface OgSkuSpecDTOList {
...
@@ -78,21 +78,20 @@ interface OgSkuSpecDTOList {
}
}
export
interface
List
Tran
StatusResp
{
export
interface
ListStatusResp
{
status
:
string
;
status
:
string
;
doing
:
string
;
code
:
number
;
waiting
:
string
;
nextCode
:
number
;
leaseOrderStatus
:
string
;
}
}
export
default
{
export
default
{
//v1.0.0订单列表-查询
//v1.0.0订单列表-查询
listPage
(
params
:
listPageParams
,
options
:
any
):
Promise
<
Response
<
l
istPageResp
>>
{
listPage
(
params
:
ListPageParams
,
options
:
any
):
Promise
<
Response
<
L
istPageResp
>>
{
return
request
(
'/oms/app-order/listPage'
,
'get'
,
params
,
options
)
return
request
(
'/oms/app-order/listPage'
,
'get'
,
params
,
options
)
},
},
//订单状态-字典
//订单状态-字典
list
TranStatus
():
Promise
<
Response
<
ListTran
StatusResp
[]
>>
{
list
Status
():
Promise
<
Response
<
List
StatusResp
[]
>>
{
return
request
(
'/oms/
RentalOrders/listTran
Status'
,
'get'
);
return
request
(
'/oms/
mallorder/list
Status'
,
'get'
);
}
}
}
}
\ No newline at end of file
pages/personalCenter/mallOrders/index.page.tsx
浏览文件 @
9ca00270
...
@@ -16,7 +16,7 @@ import errImg from "~/assets/errImg";
...
@@ -16,7 +16,7 @@ import errImg from "~/assets/errImg";
import
Right
from
"~/components/contentBox/right"
;
import
Right
from
"~/components/contentBox/right"
;
import
LayoutView
from
"~/components/layout"
;
import
LayoutView
from
"~/components/layout"
;
import
Sider
from
"../components/sider"
;
import
Sider
from
"../components/sider"
;
import
api
,
{
OrderList
,
ListTranStatus
Resp
}
from
"./api"
;
import
api
,
{
OrderList
,
Mallorder
Resp
}
from
"./api"
;
import
styles
from
"./index.module.scss"
;
import
styles
from
"./index.module.scss"
;
const
items
:
TabsProps
[
"items"
]
=
[
const
items
:
TabsProps
[
"items"
]
=
[
...
@@ -54,6 +54,14 @@ export default function LeasingOrder() {
...
@@ -54,6 +54,14 @@ export default function LeasingOrder() {
const
[
orderList
,
setOrderList
]
=
useState
<
OrderList
[]
>
([]);
const
[
orderList
,
setOrderList
]
=
useState
<
OrderList
[]
>
([]);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
orderNo
,
setOrderNo
]
=
useState
<
string
|
undefined
>
();
const
[
orderNo
,
setOrderNo
]
=
useState
<
string
|
undefined
>
();
const
[
tranStatusMap
,
setTranStatusMap
]
=
useState
<
ListStatusResp
[]
>
([]);
//订单状态字典
//获取订单状态字典
useEffect
(()
=>
{
api
.
listStatus
().
then
((
res
)
=>
{
setTranStatusMap
(
res
.
result
||
[]);
});
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
//中断前一次列表请求
//中断前一次列表请求
...
@@ -134,7 +142,7 @@ export default function LeasingOrder() {
...
@@ -134,7 +142,7 @@ export default function LeasingOrder() {
}
}
}
}
>
>
<
div
className=
{
styles
.
font2
}
>
{
item
.
createTime
}
</
div
>
<
div
className=
{
styles
.
font2
}
>
{
item
.
createTime
}
</
div
>
<
div
className=
{
styles
.
font3
}
>
待分配运营
</
div
>
<
div
className=
{
styles
.
font3
}
>
{
tranStatusMap
.
find
(
status
=>
status
.
code
===
item
.
statusCode
)?.
status
}
</
div
>
</
Row
>
</
Row
>
<
Row
<
Row
style=
{
{
minHeight
:
100
,
border
:
"1px solid #D0EAF5"
}
}
style=
{
{
minHeight
:
100
,
border
:
"1px solid #D0EAF5"
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论