Commit a31fab34 authored by GuanHua's avatar GuanHua

fix: app商城装修修改

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