Commit 121d44d3 authored by GuanHua's avatar GuanHua

feat: 店铺和渠道页面修改

parent bff41537
......@@ -10,7 +10,7 @@ export const mallLayoutConfig = {
"background": "#FFF"
}
},
"childNodes": ["1", "3", "4", "5", "6"]
"childNodes": ["1", "3", "4", "5"]
},
}
......@@ -24,18 +24,6 @@ export const topBarConfig = {
}
}
export const topAdvertConfig = {
key: "2",
"2": {
"componentName": "Advert",
"props": {
"type": "top",
"linkdisable": true,
"advertList": []
},
},
}
export const headerConfig = {
key: "3",
"3": {
......@@ -52,10 +40,51 @@ export const mainNavConfig = {
},
}
export const bannerAdvertConfig = {
export const horizontalWrap = {
key: "5",
"5": {
"componentName": "Advert",
"componentName": "div",
"props": {
"style": {
"width": "1200px",
"margin": "0 auto",
"display": "flex",
"marginTop": "16px",
}
},
"childNodes": ["6", "7", "10"]
},
}
export const channelCategoryConfig = {
key: "6",
"6": {
"componentName": "ChannelCategory",
"props": {
categoryList: []
},
},
}
export const bannerWrap = {
key: "7",
"7": {
"componentName": "div",
"props": {
"style": {
"margin": "0 16px",
"flex": 1,
"width": 0,
}
},
"childNodes": ["8", "9"]
},
}
export const bannerAdvertConfig = {
key: "8",
"8": {
"componentName": "ChannelAdvert",
"props": {
"type": "banner",
"linkdisable": true,
......@@ -64,21 +93,34 @@ export const bannerAdvertConfig = {
},
}
export const CommonTitle1Config = {
key: "6",
"6": {
"componentName": "CommonTitle",
export const interactAdvertConfig = {
key: "9",
"9": {
"componentName": "ChannelAdvert",
"props": {
"title": "热销商品",
"type": "primary"
"type": "interact",
"linkdisable": true,
"advertList": []
}
},
}
export const channelQuickNavConfig = {
key: "10",
"10": {
"componentName": "ChannelQuickNav",
"props": {
"linkdisable": true,
}
},
}
export const serviceAdvertConfig = {
key: "16",
"16": {
"componentName": "Advert",
"componentName": "ChannelAdvert",
"props": {
"type": "service",
"linkdisable": true,
......@@ -99,158 +141,41 @@ export const CommonTitle2Config = {
},
}
export const AboutUsConfig = {
export const CompanyInfoConfig = {
key: "18",
"18": {
"componentName": "AboutUs",
"componentName": "CompanyInfo",
"props": {},
},
}
export const InformationConfig = {
key: '19',
export const AlbumConfig = {
key: "19",
"19": {
"componentName": "Information",
"componentName": "Album",
"props": {},
},
}
export const FooterConfig = {
key: '20',
export const HonroPicConfig = {
key: "20",
"20": {
"componentName": "Footer",
"componentName": "HonroPic",
"props": {},
},
}
export default {
"0": {
"componentName": "MallLayout",
"props": {
"style": {
"width": "100%",
"minHeight": "100%"
}
},
"childNodes": ["1", "2", "3", "4", "5", "7", "8", "18", "19", "20"]
},
"1": {
"componentName": "TopBar",
"props": {
linkdisable: true
},
},
"2": {
"componentName": "Advert",
"props": {
"type": "top",
"linkdisable": true,
"advertList": []
},
},
"3": {
"componentName": "Header",
"props": {},
},
"4": {
"componentName": "MainNav",
"props": {},
},
"5": {
"componentName": "Advert",
"props": {
"type": "banner",
"hasQuickNav": true,
"linkdisable": true,
"advertList": []
// "advertList": [
// {
// id: 1,
// templateId: 707,
// type: 2,
// name: '意大利进口荔枝纹牛皮会员价促销最低 9 折',
// picUrl: 'https://img.alicdn.com/imgextra/i4/81/O1CN01VT5ViO1CT8h4sY7qc_!!81-0-luban.jpg_q100.jpg_.webp',
// link: 'https://www.baidu.com',
// sort: 1,
// },
// {
// id: 2,
// templateId: 707,
// type: 2,
// name: '意大利进口荔枝纹牛皮会员价促销最低 9 折',
// picUrl: 'https://img.alicdn.com/tps/i4/TB1ICgYL.H1gK0jSZSySuttlpXa.jpg',
// link: 'https://www.baidu.com',
// sort: 2,
// }
// ]
}
},
"7": {
"componentName": "Advert",
"props": {
"type": "interact",
"linkdisable": true,
"advertList": []
},
},
"8": {
"componentName": "FloorLine",
"props": {},
"childNodes": ["9", "10"]
},
"9": {
"componentName": "FloorLine.Horizontal",
"props": {},
"childNodes": ["11", "12"]
},
"10": {
"componentName": "FloorLine.Brand",
"props": {},
},
"11": {
"componentName": "FloorLine.Category",
"props": {},
},
"12": {
"componentName": "FloorLine.Vertical",
"props": {},
"childNodes": ["13", "15"]
},
"13": {
"componentName": "FloorLine.FloorHeader",
"props": {},
"childNodes": ["14"]
},
"14": {
"componentName": "FloorLine.Banner",
"props": {
"type": "category",
},
},
"15": {
"componentName": "FloorLine.Horizontal",
"props": {},
"childNodes": ["16", "17"]
},
"16": {
"componentName": "FloorLine.Goods",
"props": {},
},
"17": {
"componentName": "FloorLine.Shops",
"props": {},
},
"18": {
"componentName": "FindMore",
"props": {},
},
"19": {
export const InformationConfig = {
key: '21',
"21": {
"componentName": "Information",
"props": {},
},
"20": {
}
export const FooterConfig = {
key: '22',
"22": {
"componentName": "Footer",
"props": {},
},
......
......@@ -16,7 +16,7 @@ export const menuData = [
},
{
"path": "/shop/infomation",
"name": "资讯",
"name": "行情资讯",
"key": "shopInfomation",
},
{
......
......@@ -4,9 +4,10 @@ import ToolBar from '../components/toolBar'
import DesignPanel from '../components/DesignPanel'
import SettingPanel from '../settingsPanel'
import config from '../configs'
import { GlobalConfig } from '@/global/config'
import { LAYOUT_TYPE } from '@/constants'
import { GetTemplateWebMemberChannelWebFindCurrMemberChannelResponse } from '@/services/TemplateApi'
import { topBarConfig, topAdvertConfig, headerConfig, mainNavConfig, bannerAdvertConfig, CommonTitle1Config, mallLayoutConfig, serviceAdvertConfig, CommonTitle2Config, AboutUsConfig, InformationConfig, FooterConfig } from './defaultData'
import { topBarConfig, headerConfig, mainNavConfig, horizontalWrap, channelCategoryConfig, bannerWrap, bannerAdvertConfig, interactAdvertConfig, channelQuickNavConfig, mallLayoutConfig, serviceAdvertConfig, CommonTitle2Config, CompanyInfoConfig, AlbumConfig, HonroPicConfig, InformationConfig, FooterConfig } from './defaultData'
import Loading from '../components/Loading'
import { menuData } from './defaultMenu'
import { PublicApi } from '@/services/api'
......@@ -24,6 +25,7 @@ interface ChannelPreviewPropsType {
* 模板名称
*/
template: string;
type: number
}
}
}
......@@ -31,7 +33,7 @@ interface ChannelPreviewPropsType {
const TemplateList = ['science']
const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
const { query: { id, template } } = props.location
const { query: { id, template, type } } = props.location
const userInfo = getAuth() || {}
const [loading, setLoading] = useState<boolean>(true)
const [theme, setTheme] = useState<string>('theme-channel-science')
......@@ -46,11 +48,11 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
getComponentsConfig()
}, [])
const findFirstAdvertsByType = () => {
const findAdvertsByType = (type: number) => {
return new Promise((resolve) => {
const params: any = {
templateId: id,
type: 1,
type,
memberId: userInfo.memberId
}
......@@ -162,27 +164,85 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
})
}
const fetchNewByLabel = (label: string) => {
// 1-头条文章 2-轮播新闻 3-图片新闻 4-推荐阅读
return new Promise((resolve, reject) => {
PublicApi.getManageContentInformationFindAllByRecommendLabel({ recommendLabel: label }).then((res: { code: number; data: unknown }) => {
if (res.code === 1000) {
resolve(res.data)
} else {
reject()
}
}).catch(() => {
reject()
})
})
}
const getChannelInfo = () => {
const shopInfo = GlobalConfig.web.shopInfo
const webMallList = shopInfo.filter((item: { environment: number; type: number }) => item.environment === 1 && item.type === 3)
return webMallList[0]
}
const getIChannelInfo = () => {
const shopInfo = GlobalConfig.web.shopInfo
const webMallList = shopInfo.filter((item: { environment: number; type: number }) => item.environment === 1 && item.type === 4)
return webMallList[0]
}
const initCategoryData = (list: any, parentKey?: string, parentName?: string) => {
if (!list) {
return []
}
const result: any = list.map((item: any) => {
let cid = `c${item.id}`
let treeName = item.title
if (parentKey) {
cid = `${parentKey}_${cid}`
treeName = `${parentName} ${treeName}`
}
const newItem: any = {
title: item.title,
name: item.title,
treeName: treeName,
key: cid,
id: item.id,
brandList: item.brandList
}
if (item.children && item.children.length > 0) {
newItem.children = initCategoryData(item.children, cid, treeName)
}
return newItem
})
return result
}
/**
* 获取全部栏目
* 获取商品品类树
*/
const fetchAllColumn = () => {
const getCategoryTree = () => {
return new Promise((resolve) => {
PublicApi.getManageContentColumnAll().then(res => {
if (res.code === 1000) {
let result = ""
const allColumn = res.data
if (allColumn && allColumn.length > 0) {
let labelList = allColumn.map((item: any) => item.name)
const showCount = 4
if (labelList.length <= showCount) {
result = labelList.join(' | ')
} else {
labelList = labelList.slice(0, showCount)
result = labelList.join(' | ') + " ..."
const headers: any = {}
const param: any = {
channelMemberId: userInfo.memberId
}
switch (Number(type)) {
case 3:
headers.type = 3
break
case 4:
headers.type = 4
break
default:
break
}
resolve(result)
PublicApi.getSearchShopChannelGetCustomerCategoryTree(param, { headers }).then(res => {
if (res.code === 1000) {
resolve(initCategoryData(res.data))
}
})
})
......@@ -192,24 +252,42 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
// 导航栏
mainNavConfig[mainNavConfig.key].props.menuData = menuData
mainNavConfig[mainNavConfig.key].props.type = LAYOUT_TYPE.channel
mainNavConfig[mainNavConfig.key].props.categoryList = []
// mainNavConfig[mainNavConfig.key].props.categoryList = []
// 一号位广告
bannerAdvertConfig[bannerAdvertConfig.key].props.advertList = await findFirstAdvertsByType()
bannerAdvertConfig[bannerAdvertConfig.key].props.advertList = await findAdvertsByType(1)
// 二号位广告
serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findSecondAdvertsByType()
interactAdvertConfig[interactAdvertConfig.key].props.advertList = await findAdvertsByType(2)
// 三号位广告
serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findAdvertsByType(3)
//店铺信息
const channelInfo: any = await fetchShopInfo()
AboutUsConfig[AboutUsConfig.key].props.shopInfo = channelInfo
headerConfig[headerConfig.key].props.logoUrl = channelInfo.logo || ""
topBarConfig[topBarConfig.key].props.shopname = channelInfo.company || ""
CompanyInfoConfig[CompanyInfoConfig.key].props.shopInfo = channelInfo || {}
channelQuickNavConfig[channelQuickNavConfig.key].props.channelInfo = channelInfo
AlbumConfig[AlbumConfig.key].props.workshopPics = channelInfo.workshopPics || []
HonroPicConfig[HonroPicConfig.key].props.honorPics = channelInfo.honorPics || []
channelCategoryConfig[channelCategoryConfig.key].props.categoryList = await getCategoryTree()
let globalChannelInfo: any = {}
switch (Number(type)) {
case 3:
globalChannelInfo = getChannelInfo()
break
case 4:
globalChannelInfo = getIChannelInfo()
break
default:
globalChannelInfo = getChannelInfo()
break
}
headerConfig[headerConfig.key].props.logo = globalChannelInfo.logoUrl || ''
headerConfig[headerConfig.key].props.channelInfo = channelInfo
topBarConfig[topBarConfig.key].props.shopname = globalChannelInfo.name || ""
// 行情资讯
InformationConfig[InformationConfig.key].props.newsList = await fetchLeadNews()
InformationConfig[InformationConfig.key].props.allColumn = await fetchAllColumn()
InformationConfig[InformationConfig.key].props.newsList = await fetchNewByLabel('4')
let initIndex = 100
let floorLineConfig: any = {}
......@@ -264,20 +342,25 @@ const ChannelPreview: React.FC<ChannelPreviewPropsType> = (props) => {
}
mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, CommonTitle2Config.key, AboutUsConfig.key, InformationConfig.key, FooterConfig.key]
mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, CommonTitle2Config.key, CompanyInfoConfig.key, AlbumConfig.key, HonroPicConfig.key, InformationConfig.key, FooterConfig.key]
const config = {
...mallLayoutConfig,
...topBarConfig,
...topAdvertConfig,
...headerConfig,
...mainNavConfig,
...horizontalWrap,
...channelCategoryConfig,
...bannerWrap,
...bannerAdvertConfig,
...CommonTitle1Config,
...interactAdvertConfig,
...channelQuickNavConfig,
...floorLineConfig,
...serviceAdvertConfig,
...CommonTitle2Config,
...AboutUsConfig,
...CompanyInfoConfig,
...AlbumConfig,
...HonroPicConfig,
...InformationConfig,
...FooterConfig
}
......
import { ComponentConfigTypes, PROPS_TYPES } from 'lingxi-editor-core';
const Album: ComponentConfigTypes = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default Album;
import { ComponentConfigTypes, PROPS_TYPES } from 'lingxi-editor-core';
const ChannelAdvert: ComponentConfigTypes = {
propsConfig: {
componentType: {
label: '广告编辑',
type: PROPS_TYPES.advert
},
sliderList: {
label: '广告编辑',
type: PROPS_TYPES.carousel,
},
},
};
export default ChannelAdvert;
import { ComponentConfigTypes, PROPS_TYPES } from 'lingxi-editor-core';
const ChannelCategory: ComponentConfigTypes = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default ChannelCategory;
import { ComponentConfigTypes, PROPS_TYPES } from 'lingxi-editor-core';
const ChannelQuickNav: ComponentConfigTypes = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default ChannelQuickNav;
import { ComponentConfigTypes, PROPS_TYPES } from 'lingxi-editor-core';
const CompanyInfo: ComponentConfigTypes = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default CompanyInfo;
import { ComponentConfigTypes, PROPS_TYPES } from 'lingxi-editor-core';
const HonroPic: ComponentConfigTypes = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default HonroPic;
import { ComponentConfigTypes, PROPS_TYPES } from 'lingxi-editor-core';
const ShopAdvert: ComponentConfigTypes = {
propsConfig: {
componentType: {
label: '广告编辑',
type: PROPS_TYPES.advert
},
sliderList: {
label: '广告编辑',
type: PROPS_TYPES.carousel,
},
},
};
export default ShopAdvert;
......@@ -14,6 +14,8 @@ import ShowCase from './ShowCase'
import MallLayout from './MallLayout'
import MainNav from './MainNav'
import Advert from './Advert'
import ChannelAdvert from './ChannelAdvert'
import ShopAdvert from './ShopAdvert'
import QuickNav from './QuickNav'
import FloorLine from './FloorLine'
import ShopFloorLine from './ShopFloorLine'
......@@ -24,6 +26,12 @@ import ShopHeader from './ShopHeader'
import FindMore from './FindMore'
import Information from './Information'
import Footer from './Footer'
import CompanyInfo from './CompanyInfo'
import Album from './Album'
import HonroPic from './HonroPic'
import ChannelQuickNav from './ChannelQuickNav'
import ChannelCategory from './ChannelCategory'
import MobileBanner from './MobileBanner'
import MobileChannelBanner from './MobileChannelBanner'
import MobileQuickNav from './MobileQuickNav'
......@@ -43,9 +51,16 @@ export default {
MallLayout,
MainNav,
Advert,
ChannelAdvert,
ShopAdvert,
QuickNav,
FindMore,
Information,
CompanyInfo,
Album,
HonroPic,
ChannelQuickNav,
ChannelCategory,
Footer,
AboutUs,
CommonTitle,
......
......@@ -56,7 +56,7 @@ interface AdvertItemType {
interface AdvertSettingPropsType {
advertList: AdvertItemType[];
onChange: Function;
type: 'top' | 'banner' | 'interact' | 'category';
type: 'top' | 'banner' | 'interact' | 'category' | 'service';
templateid: number;
categoryid?: number;
templateType: 'channel' | 'shop'
......@@ -78,6 +78,8 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
return "285*120"
case 'category':
return "500*90"
case 'service':
return "580*90"
}
}
......@@ -262,7 +264,7 @@ const AdvertSetting: React.FC<AdvertSettingPropsType> = forwardRef((props, ref)
postFn(param).then(res => {
if (res.code === 1000) {
resolve()
resolve(true)
} else {
message.error(res.message)
reject()
......
......@@ -10,7 +10,7 @@ export const mallLayoutConfig = {
"background": "#FFF"
}
},
"childNodes": ["1", "3", "4", "5", "17", "18", "6"]
"childNodes": ["1", "3", "4", "5"]
},
}
......@@ -27,7 +27,7 @@ export const topBarConfig = {
export const topAdvertConfig = {
key: "2",
"2": {
"componentName": "Advert",
"componentName": "ShopAdvert",
"props": {
"type": "top",
"linkdisable": true,
......@@ -51,14 +51,15 @@ export const mainNavConfig = {
key: "4",
"4": {
"componentName": "MainNav",
"props": {},
"props": {
},
},
}
export const bannerAdvertConfig = {
key: "5",
"5": {
"componentName": "Advert",
"componentName": "ShopAdvert",
"props": {
"type": "banner",
"linkdisable": true,
......@@ -67,21 +68,10 @@ export const bannerAdvertConfig = {
},
}
export const CommonTitle1Config = {
key: "6",
"6": {
"componentName": "CommonTitle",
"props": {
"title": "热销商品",
"type": "primary"
},
},
}
export const serviceAdvertConfig = {
key: "16",
"16": {
"componentName": "Advert",
"componentName": "ShopAdvert",
"props": {
"type": "service",
"linkdisable": true,
......@@ -90,39 +80,34 @@ export const serviceAdvertConfig = {
},
}
export const CommonTitle2Config = {
key: "17",
"17": {
"componentName": "CommonTitle",
"props": {
"title": "关于我们",
"type": "primary"
},
},
}
export const AboutUsConfig = {
export const CompanyInfoConfig = {
key: "18",
"18": {
"componentName": "AboutUs",
"props": {
"shopInfo": {}
},
"componentName": "CompanyInfo",
"props": {},
},
}
export const InformationConfig = {
key: '19',
export const AlbumConfig = {
key: "19",
"19": {
"componentName": "Information",
"componentName": "Album",
"props": {},
},
}
export const FooterConfig = {
key: '20',
export const HonroPicConfig = {
key: "20",
"20": {
"componentName": "HonroPic",
"props": {},
},
}
export const FooterConfig = {
key: '21',
"21": {
"componentName": "Footer",
"props": {},
},
......
......@@ -6,17 +6,17 @@ export const menuData = [
},
{
"path": "/shop/commodity",
"name": "商品",
"name": "现货商品",
"key": "shopCommodity",
},
{
"path": "/shop/pointsMall",
"name": "积分兑换",
"name": "询价商品",
"key": "shopPointsMall",
},
{
"path": "/shop/infomation",
"name": "资讯",
"name": "积分兑换",
"key": "shopInfomation",
},
{
......
......@@ -5,7 +5,7 @@ import DesignPanel from '../components/DesignPanel'
import SettingPanel from '../settingsPanel'
import config from '../configs'
import { LAYOUT_TYPE } from '@/constants'
import { topBarConfig, topAdvertConfig, headerConfig, mainNavConfig, bannerAdvertConfig, CommonTitle1Config, mallLayoutConfig, serviceAdvertConfig, CommonTitle2Config, AboutUsConfig, InformationConfig, FooterConfig } from './defaultData'
import { topBarConfig, topAdvertConfig, headerConfig, mainNavConfig, bannerAdvertConfig, mallLayoutConfig, serviceAdvertConfig, CompanyInfoConfig, AlbumConfig, HonroPicConfig, FooterConfig } from './defaultData'
import { menuData } from './defaultMenu'
import Loading from '../components/Loading'
import { PublicApi } from '@/services/api'
......@@ -124,13 +124,14 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
/**
* 获取店铺信息
*/
const fetchShopInfo = () => {
const fetchShopInfo = (shopId: number) => {
return new Promise((resolve) => {
const param: any = {
memberId,
roleId: memberRoleId
roleId: memberRoleId,
shopId,
}
PublicApi.getTemplateWebMemberShopWebFindByMemberIdAndRoleId(param).then(res => {
PublicApi.getTemplateWebMemberShopWebMemberShopMain(param).then(res => {
if (res.code === 1000) {
if (res.code === 1000) {
resolve(res.data)
......@@ -151,14 +152,17 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
// 二号位广告
serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findSecondAdvertsByType()
//店铺信息
const shopInfo = await fetchShopInfo()
headerConfig[headerConfig.key].props.shopInfo = shopInfo
const shopList = GlobalConfig.web.shopInfo
const webMallInfo = shopList.filter(item => item.environment === 1 && item.type === 1)[0]
const shopInfo: any = await fetchShopInfo(webMallInfo.id)
headerConfig[headerConfig.key].props.shopInfo = shopInfo
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl
topBarConfig[topBarConfig.key].props.shopname = webMallInfo.name
AboutUsConfig[AboutUsConfig.key].props.shopInfo = shopInfo
CompanyInfoConfig[CompanyInfoConfig.key].props.shopInfo = shopInfo || {}
AlbumConfig[AlbumConfig.key].props.workshopPics = shopInfo.workshopPics || []
HonroPicConfig[HonroPicConfig.key].props.honorPics = shopInfo.honorPics || []
// AboutUsConfig[AboutUsConfig.key].props.shopInfo = shopInfo
let initIndex = 100
let floorLineConfig: any = {}
const floorLineKeys: any = []
......@@ -211,7 +215,7 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
}
mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, FooterConfig.key]
mallLayoutConfig["0"].childNodes = [...mallLayoutConfig["0"].childNodes, ...floorLineKeys, serviceAdvertConfig.key, CompanyInfoConfig.key, AlbumConfig.key, HonroPicConfig.key, FooterConfig.key]
const config = {
...mallLayoutConfig,
...topBarConfig,
......@@ -219,11 +223,11 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
...headerConfig,
...mainNavConfig,
...bannerAdvertConfig,
...CommonTitle2Config,
...AboutUsConfig,
...CommonTitle1Config,
...floorLineConfig,
...serviceAdvertConfig,
...CompanyInfoConfig,
...AlbumConfig,
...HonroPicConfig,
...FooterConfig
}
setComponentConfigs(config)
......
......@@ -28,8 +28,8 @@ export const formatSpecialProps = (props: any, propsConfig: any) => {
if (funcTemplate) {
nextProps[k] = () => eval(funcTemplate);
} else {
nextProps[k] = () => {
};
// nextProps[k] = () => {
// };
}
}
} else if (isObject(v) && !isEmpty(propsConfig[k].childPropsConfig) && isEqual(keys(v), keys(propsConfig[k].childPropsConfig))) {
......@@ -134,7 +134,6 @@ export const diffProps = (restProps: any, props: any) => {
});
return props;
};
......@@ -153,9 +152,10 @@ export const getAdvertType = (type) => {
switch (type) {
case 'banner':
return 1
case 'service':
case 'interact':
return 2
case 'service':
return 3
}
}
......
......@@ -23,8 +23,8 @@ import { GlobalConfig } from '@/global/config'
import ErrorResult from './error'
import { isEmpty } from 'lodash'
import useStoreId from '@/hooks/useStoreId'
import { LAYOUT_TYPE, COMMODITY_TYPE, OrderModalType } from '@/constants'
import { OrderModalType } from '@/constants/order'
import { LAYOUT_TYPE, COMMODITY_TYPE } from '@/constants'
const Logistics_Type = {
1: '物流',
......
......@@ -16,7 +16,8 @@ import SignModal from '@/components/SignModal'
import { isEmpty } from 'lodash'
import { GlobalConfig } from '@/global/config'
import { getAuth } from '@/utils/auth'
import { LAYOUT_TYPE, OrderModalType, COMMODITY_TYPE } from '@/constants'
import { OrderModalType } from '@/constants/order'
import { LAYOUT_TYPE, COMMODITY_TYPE } from '@/constants'
import useStoreId from '@/hooks/useStoreId'
interface OrderPropsType {
......
......@@ -11,7 +11,8 @@ import { priceFormat, numFormat } from "@/utils/numberFomat"
import { useLocalStore, observer } from 'mobx-react'
import ImageBox from '@/components/ImageBox'
import { store } from '@/store'
import { LAYOUT_TYPE, OrderModalType } from '@/constants'
import { LAYOUT_TYPE } from '@/constants'
import { OrderModalType } from '@/constants/order'
import { GetSearchShopPurchaseGetPurchaseListResponse } from '@/services/SearchApi'
import { GetTemplateWebMemberChannelWebMemberChannelMainResponse } from '@/services/TemplateApi'
import { isEmpty } from 'lodash'
......
......@@ -16,13 +16,14 @@
// 渠道科技类模板
.theme-channel-science {
font-size: 14px;
--mall_main_color: #464552;
--mall_sub_color: #00B37F;
--mall_main_color: #00B37A;
--mall_main_color_opacity_2: #daf2e7;
--mall_sub_color: #daf2e7;
--mall_main_nav_hover_color: #00B37A;
--category_content_bg: #464552;
--category_content_title_text: #FFFFFF;
--category_content_title_text_hover: #FFFFFF;
--category_content_sub_title_text: rgba(255, 255, 255, 0.45);
--category_content_bg: #FFFFFF;
--category_content_title_text: #303133;
--category_content_title_text_hover: #00B37A;
--category_content_sub_title_text: #606266;
}
// 店铺科技类模板颜色配置
......
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