Commit a31fab34 authored by GuanHua's avatar GuanHua

fix: app商城装修修改

parent 4d909fbd
...@@ -41,7 +41,7 @@ export interface ShopInfo { ...@@ -41,7 +41,7 @@ export interface ShopInfo {
describe: string; describe: string;
state: number; state: number;
url: string; url: string;
isDefault: number; isDefault?: any;
} }
export interface OrderMode { export interface OrderMode {
...@@ -62,7 +62,7 @@ export interface SiteInfo { ...@@ -62,7 +62,7 @@ export interface SiteInfo {
name: string; name: string;
logo: string; logo: string;
siteUrl: string; siteUrl: string;
symbol: string; symbol?: any;
} }
export interface Site { export interface Site {
......
...@@ -6,18 +6,31 @@ ...@@ -6,18 +6,31 @@
* ********** * **********
*/ */
import SELF_CONFIG from '../../../config/base.config.json' import SELF_CONFIG from '../../../config/base.config.json'
import { RootObject } from './global' import { RootObject } from './global'
interface NewRootObject extends RootObject { interface GlobalConfigType extends RootObject {
channelRootRoute: string; channelRootRoute: string;
ichannelRootRoute: string; ichannelRootRoute: string;
} srmMallId: number | undefined,
}
const channelRootRoute = 'channel' const channelRootRoute = 'channel'
const ichannelRootRoute = 'ichannel' const ichannelRootRoute = 'ichannel'
SELF_CONFIG.channelRootRoute = channelRootRoute // 渠道商城路由根路径 SELF_CONFIG.channelRootRoute = channelRootRoute // 渠道商城路由根路径
SELF_CONFIG.ichannelRootRoute = ichannelRootRoute // 渠道自有商城路由根路径 SELF_CONFIG.ichannelRootRoute = ichannelRootRoute // 渠道自有商城路由根路径
export const GlobalConfig: NewRootObject = SELF_CONFIG const getSrmdMallId = () => {
const shopInfo = SELF_CONFIG.web.shopInfo
const webMallList = shopInfo.filter((item: any) => item.isDefault === 1 && item.type === 6)
if (webMallList && webMallList.length > 0) {
const mallItem = webMallList[0]
return mallItem.id
}
return undefined
}
SELF_CONFIG.srmMallId = getSrmdMallId()
export const GlobalConfig: GlobalConfigType = SELF_CONFIG
...@@ -13,8 +13,8 @@ interface MobileDesignPanelPropsType { ...@@ -13,8 +13,8 @@ interface MobileDesignPanelPropsType {
} }
const MobileDesignPanel: React.FC<MobileDesignPanelPropsType> = (props) => { const MobileDesignPanel: React.FC<MobileDesignPanelPropsType> = (props) => {
const { pageConfig, theme, isPreview, onlyEidt } = props; const { theme, isPreview, onlyEidt } = props;
const { pageConfig } = useSelector(['pageConfig']);
return ( return (
<div className={styles.mobileDesignContainer}> <div className={styles.mobileDesignContainer}>
......
...@@ -447,7 +447,7 @@ const appMallEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -447,7 +447,7 @@ const appMallEdit: React.FC<ShopPreviewPropsType> = (props) => {
setComponentConfigs(finalConfig) setComponentConfigs(finalConfig)
setLoading(false); setLoading(false);
// updatePageConfig(finalConfig); updatePageConfig(finalConfig);
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
......
...@@ -180,7 +180,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => { ...@@ -180,7 +180,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
pageSize: 6, pageSize: 6,
overdue: true overdue: true
}; };
PublicApi.getPurchaseInviteTenderGetInviteTenderListByEnterpriseWeb(param).then((res) => { const headers: any = {
shopId: GlobalConfig.srmMallId
}
PublicApi.getPurchaseInviteTenderGetInviteTenderListByEnterpriseWeb(param, { headers }).then((res) => {
if (res.code === 1000) { if (res.code === 1000) {
let list: any[] = res.data.data; let list: any[] = res.data.data;
list = list.map((item) => { list = list.map((item) => {
......
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