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
4654bf4d
Commit
4654bf4d
authored
Mar 09, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 自营商城模板关联的商城id问题修改
parent
04431beb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
index.tsx
src/pages/editor/ownMallEdit/index.tsx
+3
-3
preview.tsx
src/pages/editor/ownMallEdit/preview.tsx
+3
-3
index.tsx
.../ownMall/ownMallManager/components/templateItem/index.tsx
+1
-1
index.tsx
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
+8
-6
No files found.
src/pages/editor/ownMallEdit/index.tsx
View file @
4654bf4d
...
...
@@ -26,7 +26,7 @@ import Loading from '../components/Loading'
import
{
getShopInfoById
,
GlobalConfig
}
from
'@/global/config'
import
{
getAuth
}
from
'@/utils/auth'
import
styles
from
'./index.less'
import
{
getManageContentInformationFindAllByRecommendLabel
,
postManageWebShopWebAll
}
from
'@/services/ManageV2Api'
import
{
getManageContentInformationFindAllByRecommendLabel
}
from
'@/services/ManageV2Api'
import
{
getSearchShopSelfGetCustomerCategoryTree
}
from
'@/services/SearchV2Api'
import
{
getTemplateAdornWebSelfFindAdvertsByType
,
getTemplateAdornWebSelfFindAllFirstCategory
,
getTemplateAdornWebSelfFindColumn
,
getTemplateAdornWebSelfMemberCategoryAdorn
}
from
'@/services/TemplateV2Api'
import
useBrickAsync
from
'../hooks/useBrickAsync'
...
...
@@ -201,8 +201,8 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
const
mallPath
=
`
${
REQUEST_HEADER
}${
mallInfo
?.
url
}.
$
{
TOP_DOMAIN
}
`
mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId, navData)
topBarConfig[topBarConfig.key].props.shopname = mallInfo?.s
ourceShopName || mallInfo?.s
hopName
const shopInfo = getShopInfoById(mallInfo
.s
hopId)
topBarConfig[topBarConfig.key].props.shopname = mallInfo?.shopName
const shopInfo = getShopInfoById(mallInfo
?.sourceS
hopId)
headerConfig[headerConfig.key].props.logoUrl = shopInfo?.logoUrl
}
...
...
src/pages/editor/ownMallEdit/preview.tsx
View file @
4654bf4d
...
...
@@ -26,7 +26,7 @@ import Loading from '../components/Loading'
import
{
getShopInfoById
,
GlobalConfig
}
from
'@/global/config'
import
{
getAuth
}
from
'@/utils/auth'
import
styles
from
'./index.less'
import
{
getManageContentInformationFindAllByRecommendLabel
,
postManageWebShopWebAll
}
from
'@/services/ManageV2Api'
import
{
getManageContentInformationFindAllByRecommendLabel
}
from
'@/services/ManageV2Api'
import
{
getSearchShopSelfGetCustomerCategoryTree
}
from
'@/services/SearchV2Api'
import
{
getTemplateAdornWebSelfFindAdvertsByType
,
getTemplateAdornWebSelfFindAllFirstCategory
,
getTemplateAdornWebSelfFindColumn
,
getTemplateAdornWebSelfMemberCategoryAdorn
,
getTemplateWebPageTemplateWebFindSelfTemplateDetails
}
from
'@/services/TemplateV2Api'
...
...
@@ -198,8 +198,8 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
const
mallPath
=
`
${
REQUEST_HEADER
}${
mallInfo
?.
url
}.
$
{
TOP_DOMAIN
}
`
mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId, navData)
topBarConfig[topBarConfig.key].props.shopname = mallInfo?.s
ourceShopName || mallInfo?.s
hopName
const shopInfo = getShopInfoById(mallInfo
.s
hopId)
topBarConfig[topBarConfig.key].props.shopname = mallInfo?.shopName
const shopInfo = getShopInfoById(mallInfo
?.sourceS
hopId)
headerConfig[headerConfig.key].props.logoUrl = shopInfo?.logoUrl
}
...
...
src/pages/ownMall/ownMallManager/components/templateItem/index.tsx
View file @
4654bf4d
...
...
@@ -58,7 +58,7 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
<
span
>
{
templateInfo
.
shopName
}
</
span
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
template_item_btn
,
templateInfo
.
use
===
1
?
styles
.
active
:
''
)
}
>
<
div
className=
{
cx
(
styles
.
template_item_btn
,
(
templateInfo
.
use
===
1
&&
templateInfo
.
shopId
)
?
styles
.
active
:
''
)
}
>
<
PlayCircleOutlined
/>
<
label
>
{
templateInfo
.
use
===
1
?
intl
.
formatMessage
({
id
:
'shop.template.button.state.enabling'
})
:
intl
.
formatMessage
({
id
:
'shop.template.button.state.enable'
})
}
</
label
>
</
div
>
...
...
src/pages/ownMall/ownMallManager/templateDetail/index.tsx
View file @
4654bf4d
...
...
@@ -32,6 +32,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
intl
=
useIntl
()
const
[
isMro
,
setIsMro
]
=
useState
<
boolean
>
(
false
)
const
userInfo
=
getAuth
()
const
shopId
=
detailInfo
?.
shopId
||
detailInfo
?.
sourceShopId
const
getMemberShopAll
=
async
(
environment
:
number
,
property
:
number
)
=>
{
const
params
=
{
...
...
@@ -101,20 +102,21 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const
handleLinkEdit
=
()
=>
{
if
(
detailInfo
?.
environment
===
1
)
{
// 自营商城装修
window
.
location
.
href
=
`/memberCenter/ownMallAbility/ownMallManager/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
detailInfo
?.
sourceShopId
||
detailInfo
.
shopId
}
&
property
=
$
{
detailInfo
?.
property
}
`
window
.
location
.
href
=
`/memberCenter/ownMallAbility/ownMallManager/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&shopId=
${
shopId
}
&property=
${
detailInfo
?.
property
}
`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3 || detailInfo?.environment === 2) {
// 自营商城装修
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
mobile
/
edit
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
?.
sourceShopId
||
detailInfo
.
shopId
}
&
environment
=
$
{
detailInfo
?.
environment
}
&
property
=
$
{
detailInfo
?.
property
}
`
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
mobile
/
edit
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
shopId
}
&
environment
=
$
{
detailInfo
?.
environment
}
&
property
=
$
{
detailInfo
?.
property
}
`
} else {
message.info(intl.formatMessage({ id: 'shop.template.edit.tip' }))
}
}
const handleLinkPreview = () => {
const shopId = detailInfo?.shopId || detailInfo?.sourceShopId
if(detailInfo?.environment === 1) {
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
preview
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
?.
sourceShopId
||
detailInfo
.
shopId
}
&
property
=
$
{
detailInfo
?.
property
}
`
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
preview
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
shopId
}
&
property
=
$
{
detailInfo
?.
property
}
`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3 || detailInfo?.environment === 2) {
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
mobile
/
preview
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
?.
sourceShopId
||
detailInfo
.
shopId
}
&
environment
=
$
{
detailInfo
?.
environment
}
&
property
=
$
{
detailInfo
?.
property
}
`
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
mobile
/
preview
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
shopId
}
&
environment
=
$
{
detailInfo
?.
environment
}
&
property
=
$
{
detailInfo
?.
property
}
`
} else {
message.info(intl.formatMessage({ id: 'shop.template.preview.tip' }))
}
...
...
@@ -125,7 +127,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
message.info(intl.formatMessage({ id: 'shop.template.edit.tip' }))
return
}
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
categoryNavigation
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
detailInfo
?.
sourceShopId
||
detailInfo
.
shopId
}
&
isSelf
=
1
&
property
=
$
{
detailInfo
?.
property
}
`
window.location.href = `
/
memberCenter
/
ownMallAbility
/
ownMallManager
/
template
/
categoryNavigation
?
id
=
$
{
detailInfo
.
id
}
&
template
=
$
{
detailInfo
.
fileName
}
&
shopId
=
$
{
shopId
}
&
isSelf
=
1
&
property
=
$
{
detailInfo
?.
property
}
`
}
const onChangeMroSetting = (e) => {
...
...
@@ -190,7 +192,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
</div>
)
}
<div className={cx(styles.btn,
detailInfo?.use === 1
? styles.use : '')} onClick={() => setUseModalVisible(true)}>
<div className={cx(styles.btn,
(detailInfo?.use === 1 && detailInfo?.shopId)
? styles.use : '')} onClick={() => setUseModalVisible(true)}>
<PushpinOutlined />
<label>{detailInfo?.use === 1 ? intl.formatMessage({ id: 'shop.template.button.state.using' }) : intl.formatMessage({ id: 'shop.template.button.state.use' })}</label>
</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