Commit 04431beb authored by GuanHua's avatar GuanHua

fix: 自营商城模板装修页面修改

parent 4cb597cf
...@@ -23,13 +23,14 @@ import { ...@@ -23,13 +23,14 @@ import {
} from './defaultData' } from './defaultData'
import { getDefaultMenuData } from './defaultMenu' import { getDefaultMenuData } from './defaultMenu'
import Loading from '../components/Loading' import Loading from '../components/Loading'
import { GlobalConfig } from '@/global/config' import { getShopInfoById, GlobalConfig } from '@/global/config'
import { getAuth } from '@/utils/auth' import { getAuth } from '@/utils/auth'
import styles from './index.less' import styles from './index.less'
import { getManageContentInformationFindAllByRecommendLabel } from '@/services/ManageV2Api' import { getManageContentInformationFindAllByRecommendLabel, postManageWebShopWebAll } from '@/services/ManageV2Api'
import { getSearchShopSelfGetCustomerCategoryTree } from '@/services/SearchV2Api' import { getSearchShopSelfGetCustomerCategoryTree } from '@/services/SearchV2Api'
import { getTemplateAdornWebSelfFindAdvertsByType, getTemplateAdornWebSelfFindAllFirstCategory, getTemplateAdornWebSelfFindColumn, getTemplateAdornWebSelfMemberCategoryAdorn } from '@/services/TemplateV2Api' import { getTemplateAdornWebSelfFindAdvertsByType, getTemplateAdornWebSelfFindAllFirstCategory, getTemplateAdornWebSelfFindColumn, getTemplateAdornWebSelfMemberCategoryAdorn } from '@/services/TemplateV2Api'
import useBrickAsync from '../hooks/useBrickAsync' import useBrickAsync from '../hooks/useBrickAsync'
import { getTemplateWebPageTemplateWebFindSelfTemplateDetails } from '@/services/TemplateApi'
interface ShopEditPropsType { interface ShopEditPropsType {
location: { location: {
...@@ -42,7 +43,8 @@ interface ShopEditPropsType { ...@@ -42,7 +43,8 @@ interface ShopEditPropsType {
* 模板名称 * 模板名称
*/ */
template: string; template: string;
shopId: number shopId: number,
property: string,
} }
} }
} }
...@@ -50,7 +52,7 @@ interface ShopEditPropsType { ...@@ -50,7 +52,7 @@ interface ShopEditPropsType {
const TemplateList = ['science'] const TemplateList = ['science']
const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
const { query: { id, template, shopId } } = props.location const { query: { id, template, shopId, property } } = props.location
const [loading, setLoading] = useState<boolean>(true) const [loading, setLoading] = useState<boolean>(true)
const [theme, setTheme] = useState<string>('theme-ownmall-science') const [theme, setTheme] = useState<string>('theme-ownmall-science')
const [componentConfigs, setComponentConfigs] = useState({}) const [componentConfigs, setComponentConfigs] = useState({})
...@@ -177,15 +179,33 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -177,15 +179,33 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
}); });
}; };
const getComponentsConfig = async () => { const getMemberSelfMallInfo = async () => {
//商城信息 const param: any = {
const shopList = GlobalConfig.web.shopInfo id
const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0] }
const res = await getTemplateWebPageTemplateWebFindSelfTemplateDetails(param)
if (res.code === 1000) {
return res.data
}
return undefined
}
const getComponentsConfig = async () => {
// 商城信息
const mallInfo: any = await getMemberSelfMallInfo()
// 导航栏 // 导航栏
const navData: any = await getOwnMallNavData(); const navData: any = await getOwnMallNavData();
const mallPath = `${REQUEST_HEADER}${webMallInfo?.url}.${TOP_DOMAIN}`
if (mallInfo) {
const mallPath = `${REQUEST_HEADER}${mallInfo?.url}.${TOP_DOMAIN}`
mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId, navData) mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId, navData)
topBarConfig[topBarConfig.key].props.shopname = mallInfo?.sourceShopName || mallInfo?.shopName
const shopInfo = getShopInfoById(mallInfo.shopId)
headerConfig[headerConfig.key].props.logoUrl = shopInfo?.logoUrl
}
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop
mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree() mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree()
...@@ -198,8 +218,6 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -198,8 +218,6 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
// 四号位广告 // 四号位广告
fourBannerConfig[fourBannerConfig.key].props.advertList = await findAdvertsByType(4) fourBannerConfig[fourBannerConfig.key].props.advertList = await findAdvertsByType(4)
topBarConfig[topBarConfig.key].props.shopname = webMallInfo?.name
headerConfig[headerConfig.key].props.logoUrl = webMallInfo?.logoUrl
// 行情资讯 // 行情资讯
InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4'); InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4');
......
...@@ -23,12 +23,12 @@ import { ...@@ -23,12 +23,12 @@ import {
} from './defaultData' } from './defaultData'
import { getDefaultMenuData } from './defaultMenu' import { getDefaultMenuData } from './defaultMenu'
import Loading from '../components/Loading' import Loading from '../components/Loading'
import { GlobalConfig } from '@/global/config' import { getShopInfoById, GlobalConfig } from '@/global/config'
import { getAuth } from '@/utils/auth' import { getAuth } from '@/utils/auth'
import styles from './index.less' import styles from './index.less'
import { getManageContentInformationFindAllByRecommendLabel } from '@/services/ManageV2Api' import { getManageContentInformationFindAllByRecommendLabel, postManageWebShopWebAll } from '@/services/ManageV2Api'
import { getSearchShopSelfGetCustomerCategoryTree } from '@/services/SearchV2Api' import { getSearchShopSelfGetCustomerCategoryTree } from '@/services/SearchV2Api'
import { getTemplateAdornWebSelfFindAdvertsByType, getTemplateAdornWebSelfFindAllFirstCategory, getTemplateAdornWebSelfFindColumn, getTemplateAdornWebSelfMemberCategoryAdorn } from '@/services/TemplateV2Api' import { getTemplateAdornWebSelfFindAdvertsByType, getTemplateAdornWebSelfFindAllFirstCategory, getTemplateAdornWebSelfFindColumn, getTemplateAdornWebSelfMemberCategoryAdorn, getTemplateWebPageTemplateWebFindSelfTemplateDetails } from '@/services/TemplateV2Api'
interface ShopEditPropsType { interface ShopEditPropsType {
location: { location: {
...@@ -41,7 +41,8 @@ interface ShopEditPropsType { ...@@ -41,7 +41,8 @@ interface ShopEditPropsType {
* 模板名称 * 模板名称
*/ */
template: string; template: string;
shopId: number shopId: number,
property: number
} }
} }
} }
...@@ -49,7 +50,7 @@ interface ShopEditPropsType { ...@@ -49,7 +50,7 @@ interface ShopEditPropsType {
const TemplateList = ['science'] const TemplateList = ['science']
const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
const { query: { id, template, shopId } } = props.location const { query: { id, template, shopId, property } } = props.location
const [loading, setLoading] = useState<boolean>(true) const [loading, setLoading] = useState<boolean>(true)
const [theme, setTheme] = useState<string>('theme-ownmall-science') const [theme, setTheme] = useState<string>('theme-ownmall-science')
const [componentConfigs, setComponentConfigs] = useState({}) const [componentConfigs, setComponentConfigs] = useState({})
...@@ -175,19 +176,33 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -175,19 +176,33 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
}); });
}; };
const getMemberSelfMallInfo = async () => {
const param: any = {
id
}
const res = await getTemplateWebPageTemplateWebFindSelfTemplateDetails(param)
if (res.code === 1000) {
return res.data
}
return undefined
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
// 商城信息
const mallInfo: any = await getMemberSelfMallInfo()
// 导航栏 // 导航栏
const navData = await getOwnMallNavData(); const navData: any = await getOwnMallNavData();
//商城信息
const shopList = GlobalConfig.web.shopInfo
const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0]
if(!isEmpty(navData)) { if (mallInfo) {
mainNavConfig[mainNavConfig.key].props.menuData = navData; const mallPath = `${REQUEST_HEADER}${mallInfo?.url}.${TOP_DOMAIN}`
} else { mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId, navData)
const mallPath = `${REQUEST_HEADER}${webMallInfo?.url}.${TOP_DOMAIN}`
mainNavConfig[mainNavConfig.key].props.menuData = mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId);; topBarConfig[topBarConfig.key].props.shopname = mallInfo?.sourceShopName || mallInfo?.shopName
const shopInfo = getShopInfoById(mallInfo.shopId)
headerConfig[headerConfig.key].props.logoUrl = shopInfo?.logoUrl
} }
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop
mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree() mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree()
...@@ -200,9 +215,6 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -200,9 +215,6 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
// 四号位广告 // 四号位广告
fourBannerConfig[fourBannerConfig.key].props.advertList = await findAdvertsByType(4) fourBannerConfig[fourBannerConfig.key].props.advertList = await findAdvertsByType(4)
topBarConfig[topBarConfig.key].props.shopname = webMallInfo.name
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl
// 行情资讯 // 行情资讯
InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4'); InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4');
......
/* /*
* @Author: ghua * @Author: ghua
* @Date: 2021-02-22 17:02:20 * @Date: 2021-02-22 17:02:20
* @LastEditTime: 2021-03-01 11:37:34 * @LastEditTime: 2022-02-16 18:45:16
* @LastEditors: Please set LastEditors * @LastEditors: GHua
* @Description: app渠道商城装修 * @Description: app渠道商城装修
* @FilePath: /lingxi-business-paltform/src/pages/mobileTemplate/channelTemplateEdit/index.tsx * @FilePath: /lingxi-business-paltform/src/pages/mobileTemplate/channelTemplateEdit/index.tsx
*/ */
...@@ -56,7 +56,7 @@ import MobileSettingPanel from '../../editor/mobileSettingPanel'; ...@@ -56,7 +56,7 @@ import MobileSettingPanel from '../../editor/mobileSettingPanel';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import styles from './index.less'; import styles from './index.less';
import { getMarketingAdornActivityGoodsAdorn, getMarketingAdornGoodsListAdorn, postMarketingCouponActivityPageSelectDetail } from '@/services/MarketingV2Api'; import { getMarketingAdornActivityGoodsAdorn, getMarketingAdornGoodsListAdorn, postMarketingCouponActivityPageSelectDetail } from '@/services/MarketingV2Api';
import { getManageMemberInformationListAdorn } from '@/services/ManageV2Api'; import { getManageMemberInformationListAdorn, postManageWebShopWebAll } from '@/services/ManageV2Api';
import { getSearchCommodityTemplateGetBrandList, getSearchCommodityTemplateGetFirstCategoryListByMemberId } from '@/services/SearchV2Api'; import { getSearchCommodityTemplateGetBrandList, getSearchCommodityTemplateGetFirstCategoryListByMemberId } from '@/services/SearchV2Api';
import { getTemplateAdornAppSelfFind } from '@/services/TemplateV2Api'; import { getTemplateAdornAppSelfFind } from '@/services/TemplateV2Api';
import useBrickAsync from '@/pages/editor/hooks/useBrickAsync' import useBrickAsync from '@/pages/editor/hooks/useBrickAsync'
...@@ -75,6 +75,7 @@ interface ShopPreviewPropsType { ...@@ -75,6 +75,7 @@ interface ShopPreviewPropsType {
type: number; type: number;
shopId: number; shopId: number;
environment: number; environment: number;
property: number,
}; };
}; };
} }
...@@ -83,7 +84,7 @@ const TemplateList = ['science']; ...@@ -83,7 +84,7 @@ const TemplateList = ['science'];
const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => { const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
const { const {
query: { id, template, type, shopId, environment = 4 }, query: { id, template, shopId, environment = 4, property },
} = props.location; } = props.location;
const [loading, setLoading] = useState<boolean>(true); const [loading, setLoading] = useState<boolean>(true);
const [theme, setTheme] = useState<string>('theme-mall-science'); const [theme, setTheme] = useState<string>('theme-mall-science');
...@@ -199,16 +200,35 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => { ...@@ -199,16 +200,35 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
return label return label
} }
const getMemberSelfMallInfo = async () => {
const params = {
siteId: GlobalConfig.global.siteInfo.id,
environment: Number(environment),
type: 1,
hasMemberType: 1,
memberId: memberId,
roleId: memberRoleId,
}
const res = await postManageWebShopWebAll(params)
message.destroy()
if (res.code === 1000 && res.data && Array.isArray(res.data) && res.data.length > 0) {
const selfMall = res.data.filter((item) => item.self === 1 && item.property === Number(property))[0]
if (selfMall) {
return selfMall
}
}
return undefined
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
try { try {
const appConfig = await getAppConfig(); const appConfig = await getAppConfig();
// 商城信息 // 商城信息
const shopList = GlobalConfig.web.shopInfo const mallInfo = await getMemberSelfMallInfo()
const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0]
const _mallLayoutConfig: any = cloneDeep(channelLayoutConfig); const _mallLayoutConfig: any = cloneDeep(channelLayoutConfig);
const allState = { const allState = {
channelName: webMallInfo?.name, channelName: mallInfo ? mallInfo.name : '',
categoryList: await getFirstCategoryList(), categoryList: await getFirstCategoryList(),
navList: appConfig?.navList ? appConfig?.navList.details : [], navList: appConfig?.navList ? appConfig?.navList.details : [],
advert: appConfig?.advert ? appConfig?.advert.details : [], advert: appConfig?.advert ? appConfig?.advert.details : [],
......
/* /*
* @Author: ghua * @Author: ghua
* @Date: 2021-02-22 17:02:20 * @Date: 2021-02-22 17:02:20
* @LastEditTime: 2021-03-01 11:37:34 * @LastEditTime: 2022-02-16 18:45:23
* @LastEditors: Please set LastEditors * @LastEditors: GHua
* @Description: app渠道商城装修 * @Description: app渠道商城装修
* @FilePath: /lingxi-business-paltform/src/pages/mobileTemplate/channelTemplateEdit/index.tsx * @FilePath: /lingxi-business-paltform/src/pages/mobileTemplate/channelTemplateEdit/index.tsx
*/ */
...@@ -55,7 +55,7 @@ import { LAYOUT_TYPE } from '@/constants'; ...@@ -55,7 +55,7 @@ import { LAYOUT_TYPE } from '@/constants';
import { getAuth } from '@/utils/auth'; import { getAuth } from '@/utils/auth';
import styles from './index.less'; import styles from './index.less';
import { getMarketingAdornActivityGoodsAdorn, getMarketingAdornChannelGoodsListAdorn } from '@/services/MarketingV2Api'; import { getMarketingAdornActivityGoodsAdorn, getMarketingAdornChannelGoodsListAdorn } from '@/services/MarketingV2Api';
import { getManageContentInformationPage } from '@/services/ManageV2Api'; import { getManageContentInformationPage, postManageWebShopWebAll } from '@/services/ManageV2Api';
import { getSearchCommodityTemplateGetBrandList, getSearchCommodityTemplateGetFirstCategoryListByMemberId } from '@/services/SearchV2Api'; import { getSearchCommodityTemplateGetBrandList, getSearchCommodityTemplateGetFirstCategoryListByMemberId } from '@/services/SearchV2Api';
import { getTemplateAdornAppSelfFind } from '@/services/TemplateV2Api'; import { getTemplateAdornAppSelfFind } from '@/services/TemplateV2Api';
...@@ -72,6 +72,8 @@ interface ShopPreviewPropsType { ...@@ -72,6 +72,8 @@ interface ShopPreviewPropsType {
template: string; template: string;
type: number; type: number;
shopId: number; shopId: number;
environment: number,
property: number,
}; };
}; };
} }
...@@ -80,7 +82,7 @@ const TemplateList = ['science']; ...@@ -80,7 +82,7 @@ const TemplateList = ['science'];
const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => { const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => {
const { const {
query: { id, template, type, shopId }, query: { id, template, type, shopId, environment, property },
} = props.location; } = props.location;
const [loading, setLoading] = useState<boolean>(true); const [loading, setLoading] = useState<boolean>(true);
const [theme, setTheme] = useState<string>('theme-mall-science'); const [theme, setTheme] = useState<string>('theme-mall-science');
...@@ -186,16 +188,35 @@ const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => { ...@@ -186,16 +188,35 @@ const OwnMallTempletePreview: React.FC<ShopPreviewPropsType> = props => {
return ''; return '';
}; };
const getMemberSelfMallInfo = async () => {
const params = {
siteId: GlobalConfig.global.siteInfo.id,
environment: Number(environment),
type: 1,
hasMemberType: 1,
memberId: memberId,
roleId: memberRoleId,
}
const res = await postManageWebShopWebAll(params)
message.destroy()
if (res.code === 1000 && res.data && Array.isArray(res.data) && res.data.length > 0) {
const selfMall = res.data.filter((item) => item.self === 1 && item.property === Number(property))[0]
if (selfMall) {
return selfMall
}
}
return undefined
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
try { try {
const appConfig = await getAppConfig(); const appConfig = await getAppConfig();
// 商城信息 // 商城信息
const shopList = GlobalConfig.web.shopInfo const mallInfo = await getMemberSelfMallInfo()
const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0]
const _mallLayoutConfig: any = cloneDeep(channelLayoutConfig); const _mallLayoutConfig: any = cloneDeep(channelLayoutConfig);
const allState = { const allState = {
channelName: webMallInfo?.name, channelName: mallInfo ? mallInfo.name : '',
categoryList: await getFirstCategoryList(), categoryList: await getFirstCategoryList(),
navList: appConfig?.navList ? appConfig?.navList.details : [], navList: appConfig?.navList ? appConfig?.navList.details : [],
advert: appConfig?.advert ? appConfig?.advert.details : [], advert: appConfig?.advert ? appConfig?.advert.details : [],
......
...@@ -10,6 +10,7 @@ import styles from './index.less' ...@@ -10,6 +10,7 @@ import styles from './index.less'
import { getTemplateWebPageTemplateWebFindSelfTemplateDetails, postTemplateWebPageTemplateWebOpenMro, postTemplateWebPageTemplateWebUseSelfTemplate } from '@/services/TemplateV2Api' import { getTemplateWebPageTemplateWebFindSelfTemplateDetails, postTemplateWebPageTemplateWebOpenMro, postTemplateWebPageTemplateWebUseSelfTemplate } from '@/services/TemplateV2Api'
import { getManageShopOpenMro } from '@/services/ManageV2Api' import { getManageShopOpenMro } from '@/services/ManageV2Api'
import { postManageWebShopWebAll, PostManageWebShopWebAllResponse } from '@/services/ManageV2Api' import { postManageWebShopWebAll, PostManageWebShopWebAllResponse } from '@/services/ManageV2Api'
import { getAuth } from '@/utils/auth' import { getAuth } from '@/utils/auth'
import { GlobalConfig } from '@/global/config' import { GlobalConfig } from '@/global/config'
...@@ -46,11 +47,6 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -46,11 +47,6 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
if (res.code === 1000 && res.data && Array.isArray(res.data) && res.data.length > 0) { if (res.code === 1000 && res.data && Array.isArray(res.data) && res.data.length > 0) {
const list = res.data.filter((item) => item.self === 1 && item.property === property) const list = res.data.filter((item) => item.self === 1 && item.property === property)
setMallList(list) setMallList(list)
if (list && list.length === 1) {
return list[0].id
} else {
return undefined
}
} }
} }
...@@ -68,12 +64,14 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -68,12 +64,14 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
} }
}, [detailInfo]); }, [detailInfo]);
const fetchDetail = () => { const fetchDetail = async () => {
const param: any = { const param: any = {
id id
} }
getTemplateWebPageTemplateWebFindSelfTemplateDetails(param).then(res => {
getTemplateWebPageTemplateWebFindSelfTemplateDetails(param).then(async (res) => {
if (res.code === 1000) { if (res.code === 1000) {
await getMemberShopAll(res.data.environment, res.data.property)
setDetailInfo(res.data) setDetailInfo(res.data)
} }
}) })
...@@ -103,10 +101,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -103,10 +101,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const handleLinkEdit = () => { const handleLinkEdit = () => {
if(detailInfo?.environment === 1) { if(detailInfo?.environment === 1) {
// 自营商城装修 // 自营商城装修
window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}` window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo?.sourceShopId || detailInfo.shopId}&property=${detailInfo?.property}`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3 || detailInfo?.environment === 2) { } 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.shopId}&environment=${detailInfo?.environment}` 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}`
} else { } else {
message.info(intl.formatMessage({ id: 'shop.template.edit.tip' })) message.info(intl.formatMessage({ id: 'shop.template.edit.tip' }))
} }
...@@ -114,9 +112,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -114,9 +112,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const handleLinkPreview = () => { const handleLinkPreview = () => {
if(detailInfo?.environment === 1) { if(detailInfo?.environment === 1) {
window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}` window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/preview?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo?.sourceShopId || detailInfo.shopId}&property=${detailInfo?.property}`
} else if(detailInfo?.environment === 4 || detailInfo?.environment === 3 || detailInfo?.environment === 2) { } 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.shopId}&environment=${detailInfo?.environment}` 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}`
} else { } else {
message.info(intl.formatMessage({ id: 'shop.template.preview.tip' })) message.info(intl.formatMessage({ id: 'shop.template.preview.tip' }))
} }
...@@ -127,7 +125,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -127,7 +125,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
message.info(intl.formatMessage({ id: 'shop.template.edit.tip' })) message.info(intl.formatMessage({ id: 'shop.template.edit.tip' }))
return return
} }
window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/categoryNavigation?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo.shopId}&isSelf=1` window.location.href = `/memberCenter/ownMallAbility/ownMallManager/template/categoryNavigation?id=${detailInfo.id}&template=${detailInfo.fileName}&shopId=${detailInfo?.sourceShopId || detailInfo.shopId}&isSelf=1&property=${detailInfo?.property}`
} }
const onChangeMroSetting = (e) => { const onChangeMroSetting = (e) => {
...@@ -167,7 +165,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -167,7 +165,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
</div> </div>
<div className={styles.template_info_line}> <div className={styles.template_info_line}>
<label>{intl.formatMessage({ id: 'shop.template.form.label.shopName' })}</label> <label>{intl.formatMessage({ id: 'shop.template.form.label.shopName' })}</label>
<span>{detailInfo?.shopName}</span> <span>{detailInfo?.sourceShopName || detailInfo?.shopName}</span>
</div> </div>
</div> </div>
</div> </div>
......
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