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
黄庭坚
jinfa-platform
Commits
8519262e
Commit
8519262e
authored
Nov 11, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:1.修复分类跳转时导致渠道id丢失问题;2,商品库存小于最小订购量还可以下单的问题;3.渠道商城支付页面logo不对的问题;4.模板状态样式问题
parent
446ffdba
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
125 additions
and
27 deletions
+125
-27
index.ts
config/channelRoutes/index.ts
+18
-0
index.ts
config/selfchannelRoutes/index.ts
+18
-0
app.tsx
src/app.tsx
+4
-0
index.tsx
src/components/InputNumber/index.tsx
+1
-1
index.tsx
src/pages/editor/channelEdit/index.tsx
+1
-0
index.less
src/pages/editor/components/SettingList/index.less
+2
-1
index.less
...ngsPanel/propsSettings/components/GoodsSetting/index.less
+1
-1
index.tsx
src/pages/lxMall/channel/index.tsx
+1
-1
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+7
-0
index.tsx
src/pages/lxMall/components/Category/index.tsx
+4
-4
index.tsx
src/pages/lxMall/components/FloorAnchor/index.tsx
+5
-2
index.tsx
src/pages/lxMall/index/index.tsx
+4
-3
index.tsx
src/pages/lxMall/order/index.tsx
+20
-3
common.less
src/pages/lxMall/pay/components/common.less
+1
-0
index.tsx
src/pages/lxMall/pay/components/credit/index.tsx
+7
-2
index.tsx
src/pages/lxMall/pay/components/transfer/index.tsx
+7
-4
index.tsx
src/pages/lxMall/pay/index.tsx
+4
-3
index.ts
src/pages/lxMall/pay/utils/index.ts
+19
-0
index.tsx
src/pages/lxMall/shop/index.tsx
+1
-2
No files found.
config/channelRoutes/index.ts
View file @
8519262e
...
...
@@ -100,6 +100,24 @@ const ChannelRoute = {
component
:
'@/pages/lxMall/order'
,
},
{
// 渠道订单支付页面
path
:
`
${
rootRoute
}
/pay`
,
name
:
'pay'
,
key
:
'pay'
,
hide
:
true
,
hideHeader
:
true
,
component
:
'@/pages/lxMall/pay'
,
},
{
// 支付结果页面
path
:
`
${
rootRoute
}
/pay/result`
,
name
:
'payResult'
,
key
:
'payResult'
,
hide
:
true
,
hideHeader
:
true
,
component
:
'@/pages/lxMall/payResult'
,
},
{
path
:
'/noAuth'
,
component
:
'@/pages/403'
,
},
...
...
config/selfchannelRoutes/index.ts
View file @
8519262e
...
...
@@ -100,6 +100,24 @@ const selfChannelRoute = {
component
:
'@/pages/lxMall/order'
,
},
{
// 渠道订单支付页面
path
:
`
${
rootRoute
}
/pay`
,
name
:
'pay'
,
key
:
'pay'
,
hide
:
true
,
hideHeader
:
true
,
component
:
'@/pages/lxMall/pay'
,
},
{
// 支付结果页面
path
:
`
${
rootRoute
}
/pay/result`
,
name
:
'payResult'
,
key
:
'payResult'
,
hide
:
true
,
hideHeader
:
true
,
component
:
'@/pages/lxMall/payResult'
,
},
{
path
:
'/noAuth'
,
component
:
'@/pages/403'
,
},
...
...
src/app.tsx
View file @
8519262e
...
...
@@ -65,6 +65,8 @@ const mallLists = [
`
${
channelRootRoute
}
/about`
,
`
${
channelRootRoute
}
/purchaseOrder`
,
`
${
channelRootRoute
}
/order`
,
`
${
channelRootRoute
}
/pay`
,
`
${
channelRootRoute
}
/pay/result`
,
`
${
ichannelRootRoute
}
`
,
`
${
ichannelRootRoute
}
/commodity`
,
`
${
ichannelRootRoute
}
/commodity/search`
,
...
...
@@ -76,6 +78,8 @@ const mallLists = [
`
${
ichannelRootRoute
}
/about`
,
`
${
ichannelRootRoute
}
/purchaseOrder`
,
`
${
ichannelRootRoute
}
/order`
,
`
${
ichannelRootRoute
}
/pay`
,
`
${
ichannelRootRoute
}
/pay/result`
,
]
// let routeAuthUrls: any[] = []
...
...
src/components/InputNumber/index.tsx
View file @
8519262e
...
...
@@ -67,7 +67,7 @@ const InputNumber: React.FC<InputNumberPropsType> = (props) => {
return
(
<
div
className=
{
styles
.
input_number
}
>
<
div
className=
{
cx
(
styles
.
input_number_item
,
styles
.
reduce
,
value
<=
minCount
?
styles
.
disable
:
''
)
}
onClick=
{
handleReduce
}
><
MinusOutlined
/></
div
>
<
input
disabled=
{
disabled
}
className=
{
styles
.
input_number_input
}
value=
{
value
}
onChange=
{
handleChange
}
onBlur=
{
handleBlur
}
/>
<
input
disabled=
{
disabled
}
maxLength=
{
8
}
className=
{
styles
.
input_number_input
}
value=
{
value
}
onChange=
{
handleChange
}
onBlur=
{
handleBlur
}
/>
<
div
className=
{
cx
(
styles
.
input_number_item
,
styles
.
add
,
value
>=
maxCount
?
styles
.
disable
:
''
)
}
onClick=
{
handleAdd
}
><
PlusOutlined
/></
div
>
</
div
>
)
...
...
src/pages/editor/channelEdit/index.tsx
View file @
8519262e
...
...
@@ -225,6 +225,7 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
"props"
:
{
categoryAdvertPicUrl
:
categoryDetail
.
categoryAdvertPicUrl
,
categoryid
:
item
.
id
,
linkdisable
:
true
,
categoryList
:
categoryDetail
.
categoryBOList
},
},
...
...
src/pages/editor/components/SettingList/index.less
View file @
8519262e
...
...
@@ -5,7 +5,8 @@
&_item {
position: relative;
width: 380px;
// width: 380px;
flex: 0 0 48.6%;
height: 136px;
border: 1px solid #ffffff;
margin: 8px 4px;
...
...
src/pages/editor/settingsPanel/propsSettings/components/GoodsSetting/index.less
View file @
8519262e
...
...
@@ -15,7 +15,7 @@
}
&_info {
flex: 1;
flex
-grow
: 1;
width: 0;
margin-left: 12px;
...
...
src/pages/lxMall/channel/index.tsx
View file @
8519262e
...
...
@@ -151,7 +151,7 @@ const ChannelIndex: React.FC<ChannelIndexPropsType> = (props) => {
useMemo
(()
=>
<
Advert
visible=
{
firstAdvertList
.
length
>
0
}
type=
"banner"
advertList=
{
firstAdvertList
}
hasQuickNav=
{
false
}
/>,
[
firstAdvertList
])
}
</
div
>
<
FloorAnchor
anchorList=
{
categoryList
}
type=
"shop"
/>
<
FloorAnchor
anchorList=
{
categoryList
}
type=
{
LAYOUT_TYPE
.
channel
}
/>
<
CommonTitle
title=
"热销商品"
type=
"primary"
/>
{
categoryComponents
?
categoryComponents
:
loading
?
<
FloorSkeleton
type=
{
LAYOUT_TYPE
.
shop
}
/>
:
null
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
8519262e
...
...
@@ -451,6 +451,13 @@ const CommodityDetail = (props) => {
message
.
info
(
"请选择商品属性"
)
return
}
if
(
stockCount
<
commodityDetail
.
minOrder
)
{
message
.
destroy
()
message
.
info
(
"库存不足"
)
return
}
if
(
clickFlag
)
{
clickFlag
=
false
...
...
src/pages/lxMall/components/Category/index.tsx
View file @
8519262e
...
...
@@ -73,9 +73,9 @@ const Category: React.FC<CategoryPropsType> = (props) => {
case
LAYOUT_TYPE
.
shop
:
return
`/shop/commodity?categoryId=
${
item
.
id
}
&categoryName=
${
btoa
(
encodeURIComponent
(
item
.
title
))}
&shopId=
${
shopUrlParam
}
`
case
LAYOUT_TYPE
.
channel
:
return
`
${
GlobalConfig
.
channelRootRoute
}
/commodity?categoryId=
${
item
.
id
}
&categoryName=
${
btoa
(
encodeURIComponent
(
item
.
title
))}
&
i
d=
${
shopUrlParam
}
`
return
`
${
GlobalConfig
.
channelRootRoute
}
/commodity?categoryId=
${
item
.
id
}
&categoryName=
${
btoa
(
encodeURIComponent
(
item
.
title
))}
&
channelI
d=
${
shopUrlParam
}
`
case
LAYOUT_TYPE
.
ichannel
:
return
`
${
GlobalConfig
.
ichannelRootRoute
}
/commodity?categoryId=
${
item
.
id
}
&categoryName=
${
btoa
(
encodeURIComponent
(
item
.
title
))}
&
i
d=
${
shopUrlParam
}
`
return
`
${
GlobalConfig
.
ichannelRootRoute
}
/commodity?categoryId=
${
item
.
id
}
&categoryName=
${
btoa
(
encodeURIComponent
(
item
.
title
))}
&
channelI
d=
${
shopUrlParam
}
`
default
:
return
`/commodity?categoryId=
${
item
.
id
}
&categoryName=
${
btoa
(
encodeURIComponent
(
item
.
title
))}
`
}
...
...
@@ -86,9 +86,9 @@ const Category: React.FC<CategoryPropsType> = (props) => {
case
LAYOUT_TYPE
.
shop
:
return
`/shop/commodity?brandId=
${
item
.
brandId
}
&brandName=
${
btoa
(
encodeURIComponent
(
item
.
brandName
))}
&shopId=
${
shopUrlParam
}
`
case
LAYOUT_TYPE
.
channel
:
return
`
${
GlobalConfig
.
channelRootRoute
}
/commodity?brandId=
${
item
.
brandId
}
&brandName=
${
btoa
(
encodeURIComponent
(
item
.
brandName
))}
&
i
d=
${
shopUrlParam
}
`
return
`
${
GlobalConfig
.
channelRootRoute
}
/commodity?brandId=
${
item
.
brandId
}
&brandName=
${
btoa
(
encodeURIComponent
(
item
.
brandName
))}
&
channelI
d=
${
shopUrlParam
}
`
case
LAYOUT_TYPE
.
ichannel
:
return
`
${
GlobalConfig
.
ichannelRootRoute
}
/commodity?brandId=
${
item
.
brandId
}
&brandName=
${
btoa
(
encodeURIComponent
(
item
.
brandName
))}
&
i
d=
${
shopUrlParam
}
`
return
`
${
GlobalConfig
.
ichannelRootRoute
}
/commodity?brandId=
${
item
.
brandId
}
&brandName=
${
btoa
(
encodeURIComponent
(
item
.
brandName
))}
&
channelI
d=
${
shopUrlParam
}
`
default
:
return
`/commodity?brandId=
${
item
.
brandId
}
&brandName=
${
btoa
(
encodeURIComponent
(
item
.
brandName
))}
`
}
...
...
src/pages/lxMall/components/FloorAnchor/index.tsx
View file @
8519262e
import
React
from
'react'
import
{
ToTopOutlined
}
from
'@ant-design/icons'
import
{
Anchor
,
BackTop
}
from
'antd'
import
qrcodeImg
from
'@/assets/imgs/erweima.png
'
import
{
LAYOUT_TYPE
}
from
'@/constants
'
import
'./index.less'
interface
FloorAnchorPropsType
{
...
...
@@ -17,7 +17,7 @@ const FloorAnchor: React.FC<FloorAnchorPropsType> = (props) => {
<
div
className=
"anchor_wrap"
>
<
Anchor
className=
"anchor"
offsetTop=
{
120
}
>
{
type
===
'shop'
&&
<
Anchor
.
Link
href=
{
`#about_us`
}
title=
"关于我们"
/>
type
===
LAYOUT_TYPE
.
shop
&&
<
Anchor
.
Link
href=
{
`#about_us`
}
title=
"关于我们"
/>
}
{
anchorList
.
map
(
item
=>
(
...
...
@@ -27,6 +27,9 @@ const FloorAnchor: React.FC<FloorAnchorPropsType> = (props) => {
{
type
===
'mall'
&&
<
Anchor
.
Link
href=
{
`#find_more`
}
title=
"发现更多"
/>
}
{
(
type
===
LAYOUT_TYPE
.
channel
||
type
===
LAYOUT_TYPE
.
ichannel
)
&&
<
Anchor
.
Link
href=
{
`#about_us`
}
title=
"关于我们"
/>
}
<
BackTop
>
<
ToTopOutlined
/>
<
span
className=
"text"
>
顶部
</
span
>
...
...
src/pages/lxMall/index/index.tsx
View file @
8519262e
...
...
@@ -13,11 +13,12 @@ import styles from './index.less'
interface
MallIndexPropsType
{
SiteStore
?:
any
;
mallInfo
:
any
mallInfo
:
any
;
layoutType
:
LAYOUT_TYPE
}
const
MallIndex
:
React
.
FC
<
MallIndexPropsType
>
=
(
props
)
=>
{
const
{
mallInfo
}
=
props
const
{
mallInfo
,
layoutType
}
=
props
const
[
categoryList
,
setCategoryList
]
=
useState
<
GetTemplatePlatformFindAllFirstCategoryResponse
>
([])
const
{
mallTemplateId
}
=
props
.
SiteStore
const
[
firstAdvertList
,
setFirstAdvertList
]
=
useState
([])
...
...
@@ -145,7 +146,7 @@ const MallIndex: React.FC<MallIndexPropsType> = (props) => {
{
useMemo
(()
=>
<
Advert
type=
"banner"
advertList=
{
firstAdvertList
}
hasQuickNav=
{
true
}
><
QuickNav
name=
{
mallInfo
.
name
}
/></
Advert
>,
[
firstAdvertList
])
}
<
FloorAnchor
anchorList=
{
categoryList
}
type=
"mall"
/>
<
FloorAnchor
anchorList=
{
categoryList
}
type=
{
LAYOUT_TYPE
.
mall
}
/>
{
secondAdvertList
?
useMemo
(()
=>
{
if
(
secondAdvertList
.
length
>
0
)
{
...
...
src/pages/lxMall/order/index.tsx
View file @
8519262e
...
...
@@ -15,6 +15,7 @@ import styles from './index.less'
import
{
PublicApi
}
from
'@/services/api'
import
SignModal
from
'@/components/SignModal'
import
{
isEmpty
}
from
'lodash'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
getAuth
}
from
'@/utils/auth'
import
{
LAYOUT_TYPE
,
OrderModalType
,
COMMODITY_TYPE
}
from
'@/constants'
...
...
@@ -23,12 +24,13 @@ interface OrderPropsType {
shopInfo
:
any
;
mallInfo
:
any
;
layoutType
:
LAYOUT_TYPE
;
shopUrlParam
:
string
;
}
const
Order
:
React
.
FC
<
OrderPropsType
>
=
(
props
)
=>
{
let
checkoutCount
=
0
const
userInfo
=
getAuth
()
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
const
{
shopInfo
,
mallInfo
,
layoutType
,
shopUrlParam
}
=
props
const
{
query
:
{
type
=
COMMODITY_TYPE
.
prompt
}
}
=
props
.
location
const
[
signModalVisible
,
setSignModalVisible
]
=
useState
<
boolean
>
(
false
)
const
{
spam_id
}
=
props
.
location
.
query
...
...
@@ -310,9 +312,9 @@ const Order: React.FC<OrderPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
const
data
=
res
.
data
if
(
selectPayWay
.
payType
===
4
)
{
history
.
replace
(
`/pay/result?orderId=
${
data
.
orderId
}
`
)
linkToUrl
(
`/pay/result?orderId=
${
data
.
orderId
}
`
)
}
else
{
history
.
replace
(
`/pay?orderId=
${
data
.
orderId
}
&spam_id=
${
spam_id
}
`
)
linkToUrl
(
`/pay?orderId=
${
data
.
orderId
}
&spam_id=
${
spam_id
}
`
)
}
}
setConfirmLoading
(
false
)
...
...
@@ -321,6 +323,21 @@ const Order: React.FC<OrderPropsType> = (props) => {
})
}
const
linkToUrl
=
(
path
:
string
)
=>
{
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
history
.
replace
(
`
${
GlobalConfig
.
channelRootRoute
}${
path
}
?channelId=
${
shopUrlParam
}
`
)
break
case
LAYOUT_TYPE
.
ichannel
:
history
.
replace
(
`
${
GlobalConfig
.
ichannelRootRoute
}${
path
}
?channelId=
${
shopUrlParam
}
`
)
break
default
:
history
.
replace
(
`
${
path
}
?channelId=
${
shopUrlParam
}
`
)
break
}
}
const
checkOrder
=
()
=>
{
message
.
destroy
()
if
(
orderInfo
.
logistics
.
deliveryType
===
1
&&
!
selectAddressInfo
)
{
...
...
src/pages/lxMall/pay/components/common.less
View file @
8519262e
...
...
@@ -48,6 +48,7 @@
.pay_btn {
display: block;
width: 160px;
text-align: center;
color: #FFF;
...
...
src/pages/lxMall/pay/components/credit/index.tsx
View file @
8519262e
...
...
@@ -7,6 +7,8 @@ import { GetMemberSecurityGetResponse } from '@/services/MemberApi'
import
{
history
}
from
'umi'
import
PasswordInput
from
'../passwordInput'
import
{
numFormat
}
from
'@/utils/numberFomat'
import
{
linkToUrl
}
from
'../../utils'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
styles
from
'./index.less'
import
{
message
,
Button
,
Spin
}
from
'antd'
...
...
@@ -14,11 +16,13 @@ interface CreditPayWayPropsType {
payInfo
:
GetOrderOrderPayDetailsResponse
,
orderInfo
:
any
,
orderId
:
number
,
onChange
:
Function
onChange
:
Function
,
layoutType
?:
LAYOUT_TYPE
,
shopUrlParam
?:
string
}
const
CreditPayWay
:
React
.
FC
<
CreditPayWayPropsType
>
=
(
props
)
=>
{
const
{
payInfo
,
orderId
,
orderInfo
}
=
props
const
{
payInfo
,
orderId
,
orderInfo
,
layoutType
,
shopUrlParam
}
=
props
const
[
payPassword
,
setPayPassword
]
=
useState
<
string
>
(
''
)
const
[
type
,
setType
]
=
useState
<
string
>
(
'normal'
)
// normal: 普通;member:会员
const
[
creditInfo
,
setCreditInfo
]
=
useState
<
GetPayCreditGetCreditResponse
>
()
...
...
@@ -84,6 +88,7 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
message
.
success
(
"支付成功"
)
linkToUrl
(
`/pay/result?orderId=
${
orderId
}
`
,
layoutType
,
shopUrlParam
)
history
.
replace
(
`/pay/result?orderId=
${
orderId
}
`
)
}
else
{
setConfirmLoading
(
false
)
...
...
src/pages/lxMall/pay/components/transfer/index.tsx
View file @
8519262e
...
...
@@ -6,7 +6,8 @@ import { history } from 'umi'
import
{
GetOrderOrderPayDetailsResponse
}
from
'@/services/OrderApi'
import
{
UploadFile
,
UploadChangeParam
}
from
'antd/lib/upload/interface'
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
{
UPLOAD_TYPE
,
LAYOUT_TYPE
}
from
'@/constants'
import
{
linkToUrl
}
from
'../../utils'
import
styles
from
'./index.less'
const
{
Dragger
}
=
Upload
...
...
@@ -14,11 +15,13 @@ const { Dragger } = Upload
interface
TransferPayWayPropsType
{
payInfo
:
GetOrderOrderPayDetailsResponse
orderId
:
number
,
onChange
:
Function
onChange
:
Function
,
layoutType
?:
LAYOUT_TYPE
,
shopUrlParam
?:
string
}
const
TransferPayWay
:
React
.
FC
<
TransferPayWayPropsType
>
=
(
props
)
=>
{
const
{
payInfo
,
orderId
,
onChange
}
=
props
const
{
payInfo
,
orderId
,
onChange
,
layoutType
,
shopUrlParam
}
=
props
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
payOrderUrl
,
setPayOrderUrls
]
=
useState
<
string
>
()
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -77,7 +80,7 @@ const TransferPayWay: React.FC<TransferPayWayPropsType> = (props) => {
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
message
.
success
(
"支付成功"
)
history
.
push
(
`/pay/result?orderId=
${
orderId
}
`
)
linkToUrl
(
`/pay/result?orderId=
${
orderId
}
`
,
layoutType
,
shopUrlParam
)
}
else
{
setConfirmLoading
(
false
)
onChange
(
false
)
...
...
src/pages/lxMall/pay/index.tsx
View file @
8519262e
...
...
@@ -49,7 +49,7 @@ const getPayTypeTitle = (type) => {
}
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
const
{
shopInfo
,
mallInfo
,
layoutType
}
=
props
const
[
payState
,
setPayState
]
=
useState
<
boolean
>
(
false
)
const
{
orderId
,
spam_id
}
=
props
.
location
.
query
const
[
pageTitle
,
setPageTitle
]
=
useState
<
string
>
()
...
...
@@ -105,17 +105,18 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
case
PayWayType
.
balance
:
return
<
BablancePayWay
/>
case
PayWayType
.
credit
:
return
<
CreditPayWay
payInfo=
{
payInfo
}
orderInfo=
{
orderInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
/>
return
<
CreditPayWay
payInfo=
{
payInfo
}
orderInfo=
{
orderInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
{
...
props
}
/>
case
PayWayType
.
wechat
:
return
<
WechatPayWay
/>
case
PayWayType
.
bank
:
return
<
BankPayWay
/>
case
PayWayType
.
transfer
:
return
<
TransferPayWay
payInfo=
{
payInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
/>
return
<
TransferPayWay
payInfo=
{
payInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
{
...
props
}
/>
default
:
return
null
}
}
const
backHome
=
()
=>
{
window
.
location
.
href
=
'/'
}
...
...
src/pages/lxMall/pay/utils/index.ts
0 → 100644
View file @
8519262e
import
{
GlobalConfig
}
from
'@/global/config'
import
{
history
}
from
'umi'
import
{
LAYOUT_TYPE
}
from
'@/constants'
export
const
linkToUrl
=
(
path
:
string
,
layoutType
,
shopUrlParam
)
=>
{
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
history
.
replace
(
`
${
GlobalConfig
.
channelRootRoute
}${
path
}
?channelId=
${
shopUrlParam
}
`
)
break
case
LAYOUT_TYPE
.
ichannel
:
history
.
replace
(
`
${
GlobalConfig
.
ichannelRootRoute
}${
path
}
?channelId=
${
shopUrlParam
}
`
)
break
default
:
history
.
replace
(
`
${
path
}
?channelId=
${
shopUrlParam
}
`
)
break
}
}
\ No newline at end of file
src/pages/lxMall/shop/index.tsx
View file @
8519262e
...
...
@@ -138,7 +138,7 @@ const ShopIndex: React.FC<ChannelIndexPropsType> = (props) => {
useMemo
(()
=>
<
Advert
type=
"banner"
visible=
{
firstAdvertList
.
length
>
0
}
advertList=
{
firstAdvertList
}
hasQuickNav=
{
false
}
/>,
[
firstAdvertList
])
}
</
div
>
<
FloorAnchor
anchorList=
{
categoryList
}
type=
"shop"
/>
<
FloorAnchor
anchorList=
{
categoryList
}
type=
{
LAYOUT_TYPE
.
shop
}
/>
<
CommonTitle
title=
"关于我们"
type=
"primary"
/>
<
AboutUs
shopInfo=
{
shopInfo
}
shopUrlParam=
{
shopUrlParam
}
type=
{
LAYOUT_TYPE
.
shop
}
/>
<
CommonTitle
title=
"热销商品"
type=
"primary"
/>
...
...
@@ -146,7 +146,6 @@ const ShopIndex: React.FC<ChannelIndexPropsType> = (props) => {
categoryComponents
?
categoryComponents
:
loading
?
<
FloorSkeleton
type=
{
LAYOUT_TYPE
.
shop
}
/>
:
null
}
<
Advert
visible=
{
secondAdvertList
.
length
>
0
}
type=
"service"
advertList=
{
secondAdvertList
}
/>
{
/* <Information /> */
}
</
div
>
)
}
...
...
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