Commit c5ffa9e8 authored by GuanHua's avatar GuanHua

fix: 自营商城装修商城id问题

parent e3e08214
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
"@linkseeks/design-core": "^1.0.0", "@linkseeks/design-core": "^1.0.0",
"@linkseeks/design-react": "^1.0.2", "@linkseeks/design-react": "^1.0.2",
"@linkseeks/design-react-web": "^1.0.0", "@linkseeks/design-react-web": "^1.0.0",
"@linkseeks/design-ui": "^1.0.10", "@linkseeks/design-ui": "^1.0.11",
"@linkseeks/god": "^1.0.0", "@linkseeks/god": "^1.0.0",
"@linkseeks/umi-plugin-yapi": "1.0.1", "@linkseeks/umi-plugin-yapi": "1.0.1",
"@turf/turf": "^6.4.0", "@turf/turf": "^6.4.0",
......
...@@ -26,7 +26,7 @@ import Loading from '../components/Loading' ...@@ -26,7 +26,7 @@ import Loading from '../components/Loading'
import { GlobalConfig } from '@/global/config' import { 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'
...@@ -42,7 +42,8 @@ interface ShopEditPropsType { ...@@ -42,7 +42,8 @@ interface ShopEditPropsType {
* 模板名称 * 模板名称
*/ */
template: string; template: string;
shopId: number shopId: number,
property: string,
} }
} }
} }
...@@ -50,7 +51,7 @@ interface ShopEditPropsType { ...@@ -50,7 +51,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({})
...@@ -176,14 +177,33 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -176,14 +177,33 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
}); });
}; };
const getMemberSelfMallInfo = async () => {
const params = {
siteId: GlobalConfig.global.siteInfo.id,
environment: 1,
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 {}
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
//商城信息 // 商城信息
const shopList = GlobalConfig.web.shopInfo const mallInfo: any = await getMemberSelfMallInfo()
const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0]
// 导航栏 // 导航栏
const navData: any = await getOwnMallNavData(); const navData: any = await getOwnMallNavData();
const mallPath = `${REQUEST_HEADER}${webMallInfo?.url}.${TOP_DOMAIN}` 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)
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()
...@@ -197,8 +217,8 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -197,8 +217,8 @@ 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 topBarConfig[topBarConfig.key].props.shopname = mallInfo?.name
headerConfig[headerConfig.key].props.logoUrl = webMallInfo?.logoUrl headerConfig[headerConfig.key].props.logoUrl = mallInfo?.logoUrl
// 行情资讯 // 行情资讯
InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4'); InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4');
......
...@@ -26,7 +26,7 @@ import Loading from '../components/Loading' ...@@ -26,7 +26,7 @@ import Loading from '../components/Loading'
import { GlobalConfig } from '@/global/config' import { 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'
...@@ -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({})
...@@ -174,19 +175,34 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -174,19 +175,34 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
}); });
}; };
const getMemberSelfMallInfo = async () => {
const params = {
siteId: GlobalConfig.global.siteInfo.id,
environment: 1,
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 {}
}
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
// 导航栏 // 商城信息
const navData = await getOwnMallNavData(); const mallInfo: any = await getMemberSelfMallInfo()
//商城信息
const shopList = GlobalConfig.web.shopInfo
const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0]
if(!isEmpty(navData)) { // 导航栏
mainNavConfig[mainNavConfig.key].props.menuData = navData; const navData: any = await getOwnMallNavData();
} else { const mallPath = `${REQUEST_HEADER}${mallInfo?.url}.${TOP_DOMAIN}`
const mallPath = `${REQUEST_HEADER}${webMallInfo?.url}.${TOP_DOMAIN}` mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId, navData)
mainNavConfig[mainNavConfig.key].props.menuData = mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId);;
}
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()
...@@ -199,8 +215,8 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -199,8 +215,8 @@ 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 topBarConfig[topBarConfig.key].props.shopname = mallInfo?.name
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl headerConfig[headerConfig.key].props.logoUrl = mallInfo?.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 : [],
......
...@@ -8,6 +8,9 @@ import UseModal from '../components/useModal' ...@@ -8,6 +8,9 @@ import UseModal from '../components/useModal'
import { Environment_Status } from '@/constants' import { Environment_Status } from '@/constants'
import styles from './index.less' import styles from './index.less'
import { getTemplateWebPageTemplateWebFindSelfTemplateDetails, postTemplateWebPageTemplateWebUseSelfTemplate } from '@/services/TemplateV2Api' import { getTemplateWebPageTemplateWebFindSelfTemplateDetails, postTemplateWebPageTemplateWebUseSelfTemplate } from '@/services/TemplateV2Api'
import { postManageWebShopWebAll } from '@/services/ManageV2Api'
import { getAuth } from '@/utils/auth'
import { GlobalConfig } from '@/global/config'
interface TemplateDetailPropsType { interface TemplateDetailPropsType {
location: { location: {
...@@ -24,18 +27,44 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -24,18 +27,44 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
const [useModalVisible, setUseModalVisible] = useState<boolean>(false) const [useModalVisible, setUseModalVisible] = useState<boolean>(false)
const [confirmLoading, setConfirmLoading] = useState(false) const [confirmLoading, setConfirmLoading] = useState(false)
const intl = useIntl() const intl = useIntl()
const userInfo = getAuth()
const getMemberShopAll = async (environment: number, property: number) => {
const params = {
siteId: GlobalConfig.global.siteInfo.id,
environment,
type: 1,
hasMemberType: 1,
memberId: userInfo.memberId,
roleId: userInfo.memberRoleId,
}
const res = await postManageWebShopWebAll(params)
message.destroy()
if (res.code === 1000 && res.data && Array.isArray(res.data) && res.data.length > 0) {
console.log(res.data.filter((item) => item.self === 1 && item.property === property), 'selfMalllist')
const selfMall = res.data.filter((item) => item.self === 1 && item.property === property)[0]
if (selfMall) {
return selfMall.id
}
}
}
useEffect(() => { useEffect(() => {
fetchDetail() fetchDetail()
}, []) }, [])
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) {
setDetailInfo(res.data) const shopId = await getMemberShopAll(res.data.environment, res.data.property)
setDetailInfo({
...res.data,
selfShopId: shopId,
})
} }
}) })
} }
...@@ -62,10 +91,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -62,10 +91,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.selfShopId || 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.selfShopId || 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' }))
} }
...@@ -73,9 +102,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -73,9 +102,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.selfShopId || 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.selfShopId || 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' }))
} }
...@@ -86,7 +115,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => { ...@@ -86,7 +115,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.selfShopId || detailInfo.shopId}&isSelf=1&property=${detailInfo?.property}`
} }
return ( return (
......
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