Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
3af3ebf1
Commit
3af3ebf1
authored
Apr 14, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 商品列表和详情请求头添加type参数
parent
ffcb2060
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
19 deletions
+44
-19
index.tsx
src/pages/lxMall/commodity/index.tsx
+3
-1
search.tsx
src/pages/lxMall/commodity/search.tsx
+6
-1
index.tsx
...es/lxMall/commodityDetail/components/Interested/index.tsx
+4
-1
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+15
-0
index.tsx
src/pages/lxMall/components/Recommand/index.tsx
+7
-8
index.tsx
src/pages/lxMall/pointsMall/index.tsx
+3
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+6
-7
No files found.
src/pages/lxMall/commodity/index.tsx
View file @
3af3ebf1
...
...
@@ -141,7 +141,9 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
}
setLoading
(
true
)
let
getFn
;
let
headers
=
{}
let
headers
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getFn
=
PublicApi
.
postSearchShopEnterpriseGetCommodityList
...
...
src/pages/lxMall/commodity/search.tsx
View file @
3af3ebf1
...
...
@@ -95,6 +95,9 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
}
setLoading
(
true
)
let
getFn
;
const
headers
:
{
type
:
number
}
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getFn
=
PublicApi
.
postSearchShopEnterpriseGetCommodityList
...
...
@@ -104,16 +107,18 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
getFn
=
PublicApi
.
postSearchShopStoreGetCommodityList
break
case
LAYOUT_TYPE
.
channel
:
headers
.
type
=
3
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
case
LAYOUT_TYPE
.
ichannel
:
headers
.
type
=
4
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
}
getFn
&&
getFn
(
param
).
then
(
res
=>
{
getFn
&&
getFn
(
param
,
{
headers
}
).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
...
...
src/pages/lxMall/commodityDetail/components/Interested/index.tsx
View file @
3af3ebf1
...
...
@@ -31,12 +31,15 @@ const Interested: React.FC<InterestedPropsType> = (props) => {
current
:
1
,
pageSize
:
5
}
const
headers
:
any
=
{}
const
headers
:
any
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
shop
:
case
LAYOUT_TYPE
.
mall
:
param
.
storeId
=
shopInfo
.
id
if
(
priceType
===
COMMODITY_TYPE
.
integral
)
{
headers
.
type
=
2
param
.
priceTypeList
=
[
3
]
getFn
=
PublicApi
.
postSearchShopScoreGetCommodityList
}
else
if
(
priceType
===
COMMODITY_TYPE
.
inquiry
)
{
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
3af3ebf1
...
...
@@ -124,6 +124,9 @@ const CommodityDetail = (props) => {
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
shop
:
param
.
storeId
=
shopId
headers
=
{
type
:
1
}
switch
(
priceType
)
{
case
COMMODITY_TYPE
.
prompt
:
param
.
priceTypeList
=
[
1
]
...
...
@@ -134,6 +137,9 @@ const CommodityDetail = (props) => {
getListFn
=
PublicApi
.
postSearchShopStoreGetCommodityList
break
case
COMMODITY_TYPE
.
integral
:
headers
=
{
type
:
2
}
param
.
priceTypeList
=
[
3
]
getListFn
=
PublicApi
.
postSearchShopScoreGetCommodityList
break
...
...
@@ -219,6 +225,15 @@ const CommodityDetail = (props) => {
getDetailFn
=
PublicApi
.
getSearchShopChannelGetCommodityDetail
break
default
:
if
(
type
===
"3"
)
{
headers
=
{
type
:
2
}
}
else
{
headers
=
{
type
:
1
}
}
getDetailFn
=
PublicApi
.
getSearchShopStoreGetCommodityDetail
break
}
...
...
src/pages/lxMall/components/Recommand/index.tsx
View file @
3af3ebf1
...
...
@@ -37,7 +37,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
for
(
const
id
of
categoryIds
)
{
const
resList
:
any
=
await
getListById
(
id
)
result
=
[...
result
,
...
resList
]
if
(
result
&&
result
.
length
>
=
5
)
{
if
(
result
&&
result
.
length
>
0
)
{
setList
(
result
)
break
}
...
...
@@ -66,24 +66,23 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
pageSize
:
5
,
customerCategoryId
:
categoryId
,
}
let
headers
=
{}
const
headers
:
{
type
:
number
}
=
{
type
:
1
}
let
getListFn
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
headers
.
type
=
3
param
.
channelMemberId
=
memberId
getListFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
headers
.
type
=
4
param
.
channelMemberId
=
memberId
getListFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
default
:
headers
.
type
=
1
getListFn
=
PublicApi
.
postSearchShopEnterpriseGetCommodityList
break
}
...
...
src/pages/lxMall/pointsMall/index.tsx
View file @
3af3ebf1
...
...
@@ -81,7 +81,9 @@ const PointsMall: React.FC<CommodityPropsType> = (props) => {
param
=
Object
.
assign
(
param
,
filterParam
)
}
setLoading
(
true
)
let
headers
=
{}
let
headers
=
{
type
:
2
}
let
getFn
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
3af3ebf1
...
...
@@ -57,21 +57,20 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
*/
const
fetchPurchaseList
=
()
=>
{
let
getFn
let
headers
=
{}
const
headers
:
{
type
:
number
}
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
headers
.
type
=
3
getFn
=
PublicApi
.
getSearchShopPurchaseChannelGetPurchaseList
break
;
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
headers
.
type
=
4
getFn
=
PublicApi
.
getSearchShopPurchaseChannelGetPurchaseList
break
;
default
:
headers
.
type
=
1
getFn
=
PublicApi
.
getSearchShopPurchaseGetPurchaseList
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment