Commit ed2dd049 authored by GuanHua's avatar GuanHua

fix: 装修预览页面

parent 5578ac36
......@@ -140,22 +140,23 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
})
}
// const getCategoryTree = () => {
// return new Promise((resolve) => {
// const param: any = {
// templateId: id,
// categoryId,
// memberId,
// roleId: memberRoleId
// }
const getCategoryTree = () => {
return new Promise((resolve) => {
const param: any = {
memberId,
}
const headers: any = {
shopId
}
// PublicApi.getTemplateAdornWebSelfMemberCategoryAdorn(param).then(res => {
// if (res.code === 1000) {
// resolve(res.data)
// }
// })
// })
// }
PublicApi.getSearchShopSelfGetCustomerCategoryTree(param, { headers }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
})
}
const fetchNewByLabel = (label: string) => {
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
......@@ -186,7 +187,7 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
mainNavConfig[mainNavConfig.key].props.menuData = getDefaultMenuData(mallPath, memberId);
}
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop
mainNavConfig[mainNavConfig.key].props.categoryList = []
mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree()
// 一号位广告
oneBannerConfig[oneBannerConfig.key].props.advertList = await findAdvertsByType(1)
......
......@@ -139,22 +139,23 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
})
}
// const getCategoryTree = () => {
// return new Promise((resolve) => {
// const param: any = {
// templateId: id,
// categoryId,
// memberId,
// roleId: memberRoleId
// }
const getCategoryTree = () => {
return new Promise((resolve) => {
const param: any = {
memberId,
}
const headers: any = {
shopId
}
// PublicApi.getTemplateAdornWebSelfMemberCategoryAdorn(param).then(res => {
// if (res.code === 1000) {
// resolve(res.data)
// }
// })
// })
// }
PublicApi.getSearchShopSelfGetCustomerCategoryTree(param, { headers }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
})
})
}
const fetchNewByLabel = (label: string) => {
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
......@@ -180,7 +181,7 @@ const OwnMallEdit: React.FC<ShopEditPropsType> = (props) => {
mainNavConfig[mainNavConfig.key].props.menuData = menuData;
}
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.shop
mainNavConfig[mainNavConfig.key].props.categoryList = []
mainNavConfig[mainNavConfig.key].props.categoryList = await getCategoryTree()
// 一号位广告
oneBannerConfig[oneBannerConfig.key].props.advertList = await findAdvertsByType(1)
......
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