Commit b3287872 authored by 前端-许冠华's avatar 前端-许冠华

Merge branch 'fix-bug-0418' into 'v2-220418'

fix: 修复H5自营商城没有品类导航装修的问题 See merge request linkseeks-design/pro-platform!212
parents c73dc6d2 3165fe56
......@@ -34,6 +34,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const [isMro, setIsMro] = useState<boolean>(false)
const userInfo = getAuth()
const shopId = detailInfo?.shopId || detailInfo?.sourceShopId
const MOBILE_ENVIROMENT = [2, 3 ,4]
const getMemberShopAll = async (environment: number, property: number) => {
const params = {
......@@ -104,7 +105,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
if (detailInfo?.environment === 1) {
// 自营商城装修
window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${shopId}&property=${detailInfo?.property}`
} else if ([2, 3, 4].includes(detailInfo?.environment)) {
} else if (MOBILE_ENVIROMENT.includes(detailInfo?.environment)) {
// 自营商城装修
window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/mobile/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${shopId}&environment=${detailInfo?.environment}&property=${detailInfo?.property}`
} else {
......@@ -116,7 +117,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
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=${shopId}&property=${detailInfo?.property}`
} else if ([2, 3, 4].includes(detailInfo?.environment)) {
} else if (MOBILE_ENVIROMENT.includes(detailInfo?.environment)) {
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' }))
......@@ -191,7 +192,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
</AuthButton>
<AuthButton btnCode='ownMallTemplate.detail.categoryrenovation' >
{
(detailInfo?.environment === 4 || detailInfo?.environment === 3) && (
MOBILE_ENVIROMENT.includes(detailInfo?.environment) && (
<div className={cx(styles.btn, styles.fit)} onClick={() => handleCategoryJump()}>
<LayoutOutlined />
<label>{intl.formatMessage({ id: 'own.template.button.mall.category.edit' })}</label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment