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
1077daac
Commit
1077daac
authored
Jan 20, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 商品收藏管理再次购买跳转商城链接问题修复
parent
4f7dc6fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
index.ts
src/global/config/index.ts
+6
-0
commodity.tsx
src/pages/systemSetting/collection/commodity.tsx
+9
-5
No files found.
src/global/config/index.ts
View file @
1077daac
...
...
@@ -20,4 +20,10 @@ const ichannelRootRoute = 'ichannel'
SELF_CONFIG
.
channelRootRoute
=
channelRootRoute
// 渠道商城路由根路径
SELF_CONFIG
.
ichannelRootRoute
=
ichannelRootRoute
// 渠道自有商城路由根路径
export
const
getShopInfoById
=
(
shopId
:
number
)
=>
{
return
SELF_CONFIG
.
web
.
shopInfo
.
filter
((
item
)
=>
item
.
id
===
shopId
)[
0
]
}
export
const
GlobalConfig
:
NewRootObject
=
SELF_CONFIG
src/pages/systemSetting/collection/commodity.tsx
View file @
1077daac
...
...
@@ -4,9 +4,10 @@ import { Button, message, Modal, Pagination } from 'antd'
import
{
StarFilled
}
from
'@ant-design/icons'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
ShopCredit
from
'@/components/ShopCredit'
import
{
getShopInfoById
}
from
'@/global/config'
import
{
numFormat
}
from
'@/utils/numberFomat'
import
moment
from
'moment'
import
{
COMMODITY_TYPE
,
CHANNEL_CENTER_URL
,
ENTERPRISE_CENTER_URL
}
from
'@/constants'
import
{
COMMODITY_TYPE
,
CHANNEL_CENTER_URL
,
ENTERPRISE_CENTER_URL
,
REQUEST_HEADER
,
TOP_DOMAIN
}
from
'@/constants'
import
styles
from
'./index.less'
import
{
getSearchShopCommodityCollectGetCommodityCollectList
,
postSearchShopCommodityCollectChannelDeleteCommodityCollectById
,
postSearchShopCommodityCollectDeleteCommodityCollectById
}
from
'@/services/SearchV2Api'
;
import
{
useIntl
}
from
'umi'
...
...
@@ -42,24 +43,27 @@ const Commodity: React.FC = () => {
const
linkToDetail
=
(
detail
)
=>
{
if
(
detail
.
isPublish
)
{
const
el
=
document
.
createElement
(
'a'
)
const
shopInfo
=
getShopInfoById
(
detail
.
shopId
)
if
(
!
shopInfo
)
return
const
mallUrl
=
`
${
REQUEST_HEADER
}${
shopInfo
.
url
}
.
${
TOP_DOMAIN
}
`
if
(
detail
.
channelMemberId
)
{
switch
(
detail
.
commodity
.
priceType
)
{
case
1
:
case
2
:
el
.
href
=
`
${
CHANNEL_CENTER_URL
}
/m
${
detail
.
channelMemberId
}
/commodity/detail/
${
detail
.
commodity
.
id
}
`
;
el
.
href
=
`
${
mallUrl
}
/m
${
detail
.
channelMemberId
}
/commodity/detail/
${
detail
.
commodity
.
id
}
`
;
break
case
3
:
el
.
href
=
`
${
CHANNEL_CENTER_URL
}
/m
${
detail
.
channelMemberId
}
/integral/detail/
${
detail
.
commodity
.
id
}
`
;
el
.
href
=
`
${
mallUrl
}
/m
${
detail
.
channelMemberId
}
/integral/detail/
${
detail
.
commodity
.
id
}
`
;
break
}
}
else
{
switch
(
detail
.
commodity
.
priceType
)
{
case
1
:
case
2
:
el
.
href
=
`
${
ENTERPRISE_CENTER_URL
}
/shop/
${
detail
.
commodity
.
memberId
}
_
${
detail
.
commodity
.
memberRoleId
}
/commodity/detail/
${
detail
.
commodity
.
id
}
`
;
el
.
href
=
`
${
mallUrl
}
/shop/
${
detail
.
commodity
.
memberId
}
_
${
detail
.
commodity
.
memberRoleId
}
/commodity/detail/
${
detail
.
commodity
.
id
}
`
;
break
case
3
:
el
.
href
=
`
${
ENTERPRISE_CENTER_URL
}
/shop/
${
detail
.
commodity
.
memberId
}
_
${
detail
.
commodity
.
memberRoleId
}
/integral/detail/
${
detail
.
commodity
.
id
}
`
;
el
.
href
=
`
${
mallUrl
}
/shop/
${
detail
.
commodity
.
memberId
}
_
${
detail
.
commodity
.
memberRoleId
}
/integral/detail/
${
detail
.
commodity
.
id
}
`
;
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