Commit f4b59f60 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents a9c264a5 f17ec721
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
"@linkseeks/design-core": "^1.0.0", "@linkseeks/design-core": "^1.0.0",
"@linkseeks/design-react": "^1.0.0", "@linkseeks/design-react": "^1.0.0",
"@linkseeks/design-react-web": "^1.0.0", "@linkseeks/design-react-web": "^1.0.0",
"@linkseeks/design-ui": "^1.0.0", "@linkseeks/design-ui": "^1.0.3",
"@turf/turf": "^6.4.0", "@turf/turf": "^6.4.0",
"@types/crypto-js": "^4.0.1", "@types/crypto-js": "^4.0.1",
"@types/js-cookie": "^2.2.6", "@types/js-cookie": "^2.2.6",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
export const mallLayoutConfig = { export const mallLayoutConfig = {
key: "0", key: "0",
"0": { "0": {
"componentName": "MallLayout", "componentName": "LocaleProvide",
"props": { "props": {
"style": { "style": {
"width": "100%", "width": "100%",
......
import { ComponentSchemaType, PROPS_TYPES } from '@linkseeks/design-core';;
const LocaleProvide: ComponentSchemaType = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
export default LocaleProvide;
...@@ -59,6 +59,7 @@ import MallHeader from './MallHeader' ...@@ -59,6 +59,7 @@ import MallHeader from './MallHeader'
import OwnMainNav from './OwnMainNav' import OwnMainNav from './OwnMainNav'
import MobileBrand from './MobileBrand' import MobileBrand from './MobileBrand'
import MallMainNav from './MallMainNav' import MallMainNav from './MallMainNav'
import LocaleProvide from './LocaleProvide'
export default { export default {
View, View,
...@@ -112,4 +113,5 @@ export default { ...@@ -112,4 +113,5 @@ export default {
MallHeader, MallHeader,
OwnMainNav, OwnMainNav,
...MobileBrand, ...MobileBrand,
LocaleProvide,
} }
...@@ -39,7 +39,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props: ...@@ -39,7 +39,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
if (id && id != record.id) { if (id && id != record.id) {
const _params: any = { const _params: any = {
shopId, shopId,
idInList: id, idInList: Array.isArray(id) ? id.join(',') : id,
current: 1, current: 1,
pageSize: 10 pageSize: 10
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
export const mallLayoutConfig = { export const mallLayoutConfig = {
key: "0", key: "0",
"0": { "0": {
"componentName": "MallLayout", "componentName": "LocaleProvide",
"props": { "props": {
"style": { "style": {
"width": "100%", "width": "100%",
......
...@@ -159,15 +159,19 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -159,15 +159,19 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findSecondAdvertsByType() serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findSecondAdvertsByType()
//店铺信息 //店铺信息
const shopList = GlobalConfig.web.shopInfo const shopList = GlobalConfig.web.shopInfo
const webMallInfo = shopList.filter(item => item.environment === 1 && item.type === 1)[0] const webMallInfo = shopList.filter(item => item.id === Number(shopId))[0]
const shopInfo: any = await fetchShopInfo(webMallInfo.id)
headerConfig[headerConfig.key].props.shopInfo = shopInfo if (webMallInfo) {
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl const shopInfo: any = await fetchShopInfo(webMallInfo.id)
topBarConfig[topBarConfig.key].props.shopname = webMallInfo.name headerConfig[headerConfig.key].props.shopInfo = shopInfo
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl
topBarConfig[topBarConfig.key].props.shopname = webMallInfo.name
CompanyInfoConfig[CompanyInfoConfig.key].props.shopInfo = shopInfo || {}
AlbumConfig[AlbumConfig.key].props.workshopPics = shopInfo.workshopPics || []
HonroPicConfig[HonroPicConfig.key].props.honorPics = shopInfo.honorPics || []
}
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 // AboutUsConfig[AboutUsConfig.key].props.shopInfo = shopInfo
let initIndex = 100 let initIndex = 100
let floorLineConfig: any = {} let floorLineConfig: any = {}
......
...@@ -2,6 +2,15 @@ import { ComponentSchemaType, PROPS_SETTING_TYPES, PROPS_TYPES } from '@linkseek ...@@ -2,6 +2,15 @@ import { ComponentSchemaType, PROPS_SETTING_TYPES, PROPS_TYPES } from '@linkseek
import { getIntl } from 'umi' import { getIntl } from 'umi'
const intl = getIntl() const intl = getIntl()
const LocaleProvide: ComponentSchemaType = {
propsConfig: {
children: {
label: '文本内容',
type: PROPS_TYPES.string,
},
},
};
const HeaderNav: {[key: string]: ComponentSchemaType} = { const HeaderNav: {[key: string]: ComponentSchemaType} = {
HeaderNav: { HeaderNav: {
propsConfig: { propsConfig: {
...@@ -134,6 +143,7 @@ const ProductContainer: ComponentSchemaType = { ...@@ -134,6 +143,7 @@ const ProductContainer: ComponentSchemaType = {
}; };
export default { export default {
LocaleProvide,
...HeaderNav, ...HeaderNav,
...SecondaryNavigation, ...SecondaryNavigation,
...SimpleCommodity, ...SimpleCommodity,
......
...@@ -95,7 +95,7 @@ const template = { ...@@ -95,7 +95,7 @@ const template = {
*/ */
const mallLayoutConfig: PageConfigType = { const mallLayoutConfig: PageConfigType = {
"0": { "0": {
"componentName": "div", "componentName": "LocaleProvide",
title: intl.formatMessage({ id: 'editor.node.tree' }), title: intl.formatMessage({ id: 'editor.node.tree' }),
"props": { "props": {
"style": { "style": {
......
...@@ -136,7 +136,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP ...@@ -136,7 +136,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
const _params = { const _params = {
// ...params, // ...params,
shopId, shopId,
idNotInList: Array.isArray(selectId) ? selectId : [selectId], idNotInList: Array.isArray(selectId) ? selectId.join(',') : selectId,
...formated ...formated
}; };
const fetchService = service || getMarketingAdornChannelGoodsListAdorn; const fetchService = service || getMarketingAdornChannelGoodsListAdorn;
......
...@@ -65,7 +65,7 @@ const CustomizeTabs: React.FC<Iprops> & { TabItem: typeof TabItem } = (props: Ip ...@@ -65,7 +65,7 @@ const CustomizeTabs: React.FC<Iprops> & { TabItem: typeof TabItem } = (props: Ip
? getMarketingAdornGoodsListAdorn ? getMarketingAdornGoodsListAdorn
: getMarketingAdornChannelGoodsListAdorn : getMarketingAdornChannelGoodsListAdorn
return service({ return service({
idInList: ids as any || [], idInList: Array.isArray(ids) ? ids.join(",") : ids,
shopId: shopId, shopId: shopId,
current: 1, current: 1,
pageSize: ids?.length, pageSize: ids?.length,
......
...@@ -24,7 +24,7 @@ export const defaultHeaderNavData = [ ...@@ -24,7 +24,7 @@ export const defaultHeaderNavData = [
export const channelLayoutConfig : PageConfigType = { export const channelLayoutConfig : PageConfigType = {
'0': { '0': {
componentName: 'MallLayout', componentName: 'LocaleProvide',
props: { props: {
style: { style: {
"width": "100%", "width": "100%",
......
...@@ -15,7 +15,7 @@ const intl = getIntl() ...@@ -15,7 +15,7 @@ const intl = getIntl()
export const channelLayoutConfig : PageConfigType = { export const channelLayoutConfig : PageConfigType = {
'0': { '0': {
componentName: 'MallLayout', componentName: 'LocaleProvide',
props: { props: {
style: { style: {
"width": "100%", "width": "100%",
......
...@@ -7,7 +7,7 @@ const intl = getIntl() ...@@ -7,7 +7,7 @@ const intl = getIntl()
export const shopLayoutConfig : PageConfigType = { export const shopLayoutConfig : PageConfigType = {
'0': { '0': {
componentName: 'MallLayout', componentName: 'LocaleProvide',
props: { props: {
style: { style: {
"width": "100%", "width": "100%",
......
...@@ -220,7 +220,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -220,7 +220,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
}) })
if (commodityIds && commodityIds.length > 0) { if (commodityIds && commodityIds.length > 0) {
const param: any = { const param: any = {
idInList: commodityIds, idInList: commodityIds.join(','),
shopId: shopId, shopId: shopId,
current: 1, current: 1,
pageSize: 80 pageSize: 80
......
...@@ -205,7 +205,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -205,7 +205,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
}) })
if (commodityIds && commodityIds.length > 0) { if (commodityIds && commodityIds.length > 0) {
const param: any = { const param: any = {
idInList: commodityIds, idInList: commodityIds.join(','),
shopId: shopId, shopId: shopId,
current: 1, current: 1,
pageSize: 80 pageSize: 80
......
...@@ -159,15 +159,18 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => { ...@@ -159,15 +159,18 @@ const ShopEdit: React.FC<ShopEditPropsType> = (props) => {
serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findSecondAdvertsByType() serviceAdvertConfig[serviceAdvertConfig.key].props.advertList = await findSecondAdvertsByType()
//店铺信息 //店铺信息
const shopList = GlobalConfig.web.shopInfo const shopList = GlobalConfig.web.shopInfo
const webMallInfo = shopList.filter(item => item.environment === 1 && item.type === 1)[0] const webMallInfo = shopList.filter(item => item.id === Number(shopId))[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
CompanyInfoConfig[CompanyInfoConfig.key].props.shopInfo = shopInfo || {} if (webMallInfo) {
AlbumConfig[AlbumConfig.key].props.workshopPics = shopInfo.workshopPics || [] const shopInfo: any = await fetchShopInfo(webMallInfo.id)
HonroPicConfig[HonroPicConfig.key].props.honorPics = shopInfo.honorPics || [] headerConfig[headerConfig.key].props.shopInfo = shopInfo
headerConfig[headerConfig.key].props.logoUrl = webMallInfo.logoUrl
topBarConfig[topBarConfig.key].props.shopname = webMallInfo.name
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 // AboutUsConfig[AboutUsConfig.key].props.shopInfo = shopInfo
let initIndex = 100 let initIndex = 100
let floorLineConfig: any = {} let floorLineConfig: any = {}
......
...@@ -10,7 +10,7 @@ const intl = getIntl(); ...@@ -10,7 +10,7 @@ const intl = getIntl();
const mallLayoutConfig: PageConfigType = { const mallLayoutConfig: PageConfigType = {
"0": { "0": {
"componentName": "MallLayout", "componentName": "LocaleProvide",
title: `${intl.formatMessage({ id: 'activePage.compoentTree'})}`, title: `${intl.formatMessage({ id: 'activePage.compoentTree'})}`,
"props": { "props": {
"style": { "style": {
......
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