Commit 7ab72ca4 authored by GuanHua's avatar GuanHua

fix: 获取品类接口添加请求头参数

parent 8ceb2997
......@@ -41,7 +41,7 @@ export interface ShopInfo {
describe: string;
state: number;
url: string;
isDefault?: any;
isDefault: number;
}
export interface OrderMode {
......@@ -60,7 +60,7 @@ export interface SiteInfo {
name: string;
logo: string;
siteUrl: string;
symbol?: any;
symbol: string;
}
export interface Site {
......
......@@ -124,7 +124,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
const param: any = {
templateId: id
};
PublicApi.getTemplateWebCategoryWebFindEnterpriseCategoryTree(param).then(res => {
const headers: any = {
shopId
}
PublicApi.getTemplateWebCategoryWebFindEnterpriseCategoryTree(param, { headers }).then(res => {
if (res.code === 1000) {
resolve(res.data);
}
......@@ -172,8 +175,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
const shopList = GlobalConfig.web.shopInfo;
const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0];
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl;
topBarConfig[topBarConfig.key].props.shopname = webMallInfo.name;
if (webMallInfo) {
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl;
topBarConfig[topBarConfig.key].props.shopname = webMallInfo.name;
}
// 行情资讯
InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4');
......
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