Commit 042464df authored by GuanHua's avatar GuanHua

feat: app店铺模板装修

parent fe3f8ec9
...@@ -16,7 +16,7 @@ interface ToolBarPropsType { ...@@ -16,7 +16,7 @@ interface ToolBarPropsType {
} }
const ToolBar: React.FC<ToolBarPropsType> = (props) => { const ToolBar: React.FC<ToolBarPropsType> = (props) => {
const { type = 1, title = "首页", showActions, templateId } = props const { type = 1, title = "首页", showActions, templateId, layoutType } = props
const [saveLoading, setSaveLoading] = useState<boolean>(false) const [saveLoading, setSaveLoading] = useState<boolean>(false)
const { componentConfigs } = useSelector<ComponentConfigsType, STATE_PROPS>(['componentConfigs']) const { componentConfigs } = useSelector<ComponentConfigsType, STATE_PROPS>(['componentConfigs'])
...@@ -39,72 +39,66 @@ const ToolBar: React.FC<ToolBarPropsType> = (props) => { ...@@ -39,72 +39,66 @@ const ToolBar: React.FC<ToolBarPropsType> = (props) => {
const handleSave = useCallback(() => { const handleSave = useCallback(() => {
const param: any = { const param: any = {
templateId: Number(templateId), templateId: Number(templateId),
appEnterpriseBO: {},
} }
Object.keys(componentConfigs).forEach(key => { if(layoutType === LAYOUT_TYPE.shop) {
const componentConfigsItem = componentConfigs[key] param.appStoreBO = {}
if(componentConfigsItem.componentType) { Object.keys(componentConfigs).forEach(key => {
switch(componentConfigsItem.componentType) { const componentConfigsItem = componentConfigs[key]
case PROPS_TYPES.mobileHeaderNav: if(componentConfigsItem.componentType) {
param.appEnterpriseBO.topBO = { switch(componentConfigsItem.componentType) {
style: componentConfigsItem.props.styleTheme || 0, case PROPS_TYPES.mobileShopHeaderNav:
status: true, param.appStoreBO.backdropBO = {
topDetailsBOList: componentConfigsItem.props.dataList || [] status: false,
} backdrop: componentConfigsItem.props.backdrop || ''
break }
case PROPS_TYPES.mobileBanner: break
param.appEnterpriseBO.advertBO = { case PROPS_TYPES.mobileBanner:
status: componentConfigsItem.props.visible || true, param.appStoreBO.advertBO = {
advertDetailsBOList: componentConfigsItem.props.dataList || [] status: false,
} advertDetailsBOList: componentConfigsItem.props.dataList || []
break }
case PROPS_TYPES.mobileQuickNav: break
param.appEnterpriseBO.functionBO = { case PROPS_TYPES.mobileQuickNav:
status: componentConfigsItem.props.visible || true, param.appStoreBO.functionBO = {
functionDetailsBO: componentConfigsItem.props.dataList || [] status: false,
} functionDetailsBO: componentConfigsItem.props.dataList || []
break }
case PROPS_TYPES.mobileShowCase: break
param.appEnterpriseBO.showcaseBO = { case PROPS_TYPES.mobileShopCommodity:
style: componentConfigsItem.props.styleTheme || 0, param.appStoreBO.productBO = {
status: componentConfigsItem.props.visible || true, status: false,
showcaseDetailsBO: componentConfigsItem.props.dataList || [] title: componentConfigsItem.props.title,
} productIdList: componentConfigsItem.props.productIdList,
break }
case PROPS_TYPES.mobileRecommentShops: break
param.appEnterpriseBO.storeBO = { default:
status: componentConfigsItem.props.visible || true, break
storeIdList: componentConfigsItem.props.dataList ? componentConfigsItem.props.dataList.map(item => item.selectId) : [] }
}
break
case PROPS_TYPES.mobileQuality:
param.appEnterpriseBO.excellentBO = {
status: componentConfigsItem.props.visible || true,
excellentDetailsBO: componentConfigsItem.props.dataList || []
}
break
case PROPS_TYPES.mobileBottomNavigation:
param.appEnterpriseBO.bottomBO = {
status: true,
bottomDetailsBOList: componentConfigsItem.props.dataList || []
}
break
default:
break
} }
} })
})
} else if(layoutType=== LAYOUT_TYPE.channel) {
param.appChannelBO = {}
}
console.log(JSON.stringify(param), "param") console.log(JSON.stringify(param), "param")
saveAppEnterprise(param) saveAppEnterprise(param)
}, [componentConfigs]) }, [componentConfigs])
const saveAppEnterprise = (param) => { const saveAppEnterprise = (param) => {
PublicApi.postTemplateAdornAppEnterpriseSave(param).then(res => { let postFn
if(res.code === 1000) { if(layoutType=== LAYOUT_TYPE.shop) {
message.destroy() postFn = PublicApi.postTemplateAdornAppStoreSave
message.success("保存成功") } else if(layoutType=== LAYOUT_TYPE.channel) {
} postFn = PublicApi.postTemplateAdornAppChannelSave
}) }
if(postFn) {
postFn(param).then(res => {
if(res.code === 1000) {
message.destroy()
message.success("保存成功")
}
})
}
} }
return ( return (
......
...@@ -51,14 +51,6 @@ const RedirectTypeList = [ ...@@ -51,14 +51,6 @@ const RedirectTypeList = [
label: '积分详情', label: '积分详情',
}, },
{ {
value: 3,
label: '店铺主页',
},
{
value: 4,
label: '资讯详情',
},
{
value: 5, value: 5,
label: '不跳转', label: '不跳转',
}, },
......
import React, { useState, useEffect } from 'react' import React, { useState } from 'react'
import { Button, Input, Select, Checkbox, message } from 'antd' import { PlusOutlined } from '@ant-design/icons'
import { PlusOutlined, DeleteOutlined } from '@ant-design/icons'
import { changeProps } from 'lingxi-editor-core'
import { ReactSortable } from "react-sortablejs"
import ImageBox from '@/components/ImageBox' import ImageBox from '@/components/ImageBox'
import cx from 'classnames' import { changeProps } from 'lingxi-editor-core'
import isEmpty from 'lodash/isEmpty'
import ModalTable from '@/components/ModalTable'
import UploadImage from '@/components/UploadImage' import UploadImage from '@/components/UploadImage'
import { PublicApi } from '@/services/api'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { numFormat, priceFormat } from '@/utils/numberFomat'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { formProduct, basicSchema } from './contant/schema'
import tableColumn from './contant/column'
import arrowRightIcon from '@/assets/icons/arrow_right.png' import arrowRightIcon from '@/assets/icons/arrow_right.png'
import arrowLeftIcon from '@/assets/icons/arrow_left.png' import arrowLeftIcon from '@/assets/icons/arrow_left.png'
import arrowUpIcon from '@/assets/icons/arrow_up.png'
import arrowDownIcon from '@/assets/icons/arrow_down.png'
import sortIcon from '@/assets/icons/sort_icon.png'
import styles from './index.less' import styles from './index.less'
interface DataItemType {
sort: number,
id: number,
name: string,
img: string,
type: number,
expand: boolean,
selectInfo?: any
}
interface BannerPropsType { interface BannerPropsType {
dataList: DataItemType[], backdrop: string,
visible: boolean,
}
const RedirectTypeList = [
{
value: 1,
label: '商品详情',
},
{
value: 2,
label: '积分详情',
},
{
value: 3,
label: '店铺主页',
},
{
value: 4,
label: '资讯详情',
},
{
value: 5,
label: '不跳转',
},
]
const modalWidthMap = {
1: 960,
2: 960,
3: 600,
4: 600
} }
const HeadBackground: React.FC<BannerPropsType> = (props) => { const HeadBackground: React.FC<BannerPropsType> = (props) => {
const { dataList, visible } = props const { backdrop } = props
const [list, setList] = useState<DataItemType[]>([]) const [expandState, setExpandState] = useState<boolean>(true)
const [modalVisible, setModalVisible] = useState<boolean>(false)
const [currentInfo, setCurrentInfo] = useState<DataItemType>()
const [productRowSelection, productRowCtl] = useRowSelectionTable({type: 'radio'})
useEffect(() => {
initDataList()
}, [dataList])
const initDataList = () => {
if(dataList) {
const newDataList = dataList.map((item: DataItemType, index: number) => {
item.sort = index + 1
item.expand = item.expand || false
return item
})
setList(newDataList)
}
}
const handleExpand = async (sort: number, expand: boolean) => {
const newList = [...list]
for(const item of newList) {
if (item.sort === sort) {
item.expand = expand
// 获取当前选择链接的信息
if(item.id && !item.selectInfo) {
item.selectInfo = await getSelectInfo(item)
}
} else {
item.expand = false
}
}
setList(newList)
}
/**
* 根据选中的类型和id获取信息
* @param data
*/
const getSelectInfo = (data: DataItemType) => {
return new Promise((resolve) => {
let getFn: any = null
const param: any = {}
switch(data.type) {
case 1:
case 2:
param.commodityId = data.id
getFn = PublicApi.getSearchMobileShopStoreGetCommodityDetail
break
default:
break
}
getFn && getFn(param).then(res => {
resolve(res.data)
})
})
}
const sortUp = (index: number, item: DataItemType) => {
const newList = JSON.parse(JSON.stringify(list))
const tempItem = JSON.parse(JSON.stringify(item))
const temp = newList[index - 1]
newList[index - 1] = item
newList[index - 1].id = temp.id
newList[index] = temp
newList[index].id = tempItem.id
setList(newList)
changeProps({
props:Object.assign({...props}, {dataList: newList })
})
}
const sortDown = (index: number, item: DataItemType) => {
const newList = JSON.parse(JSON.stringify(list))
const temp = newList[index + 1]
const tempItem = JSON.parse(JSON.stringify(item))
newList[index + 1] = item
newList[index + 1].id = temp.id
newList[index] = temp
newList[index].id = tempItem.id
setList(newList)
changeProps({
props:Object.assign({...props}, {dataList: newList })
})
}
const handleIconChange = (url: string, sort: number) => {
const newList = [...list]
newList.map(item => {
if (item.sort === sort) {
item.img = url
}
})
setList(newList)
changeProps({
props:Object.assign({ ...props }, { dataList: newList })
})
}
/**
* 显示隐藏模块
*/
const handleHideChange = (e) => {
const checked = e.target.checked
changeProps({
props:Object.assign({ ...props }, { visible: !checked })
})
}
/**
* 根据id删除某一项
* @param id
*/
const handleClickItem = (sort: number) => {
const newList = [...list]
const result = newList.filter(item => item.sort !== sort)
setList(result)
changeProps({
props:Object.assign({ ...props }, { dataList: result })
})
}
/**
* 修改跳转类型
*/
const handleTypeChange = (type: number, sort: number) => {
const newList = [...list]
newList.map(item => {
if (item.sort === sort) {
item.type = type
item.selectInfo = null
}
})
setList(newList)
changeProps({
props:Object.assign({ ...props }, { dataList: newList })
})
}
/**
* 修改名称
* @param value
* @param id
*/
const handleNameChange = (value: string, sort: number) => {
const newList = [...list]
newList.map(item => {
if (item.sort === sort) {
item.name = value
}
})
setList(newList)
changeProps({
props:Object.assign({ ...props }, { dataList: newList })
})
}
/**
* 添加广告
*/
const handleAddItem = () => {
const newList = [...list]
const newItem: DataItemType = {
sort: newList.length + 1,
id: 0,
expand: true,
img: "",
type: 0,
name: ""
}
handleExpand(newItem.id, true)
setList([...newList, newItem])
changeProps({
props:Object.assign({ ...props }, { dataList: [...newList, newItem] })
})
}
/** const handleBackdropChange = (url: string) => {
* 删除跳转选项
* @param sort
*/
const handleDeleteSelectItem = (sort: number) => {
const newList = [...list]
newList.map(item => {
if (item.sort === sort) {
item.id = 0,
item.selectInfo = null
}
})
setList(newList)
changeProps({ changeProps({
props:Object.assign({ ...props }, { dataList: newList }) props:Object.assign({ ...props }, { backdrop: url })
}) })
} }
/**
* 根据类型显示选择的信息
* @param type 1-商品详情 2-积分详情 3-店铺主页 4-资讯详情 5-不跳转
*/
const renderSelectItemByType = (type: number, item: DataItemType) => {
switch(type) {
case 1:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.mainPic} />
<div className={styles.selectInfo}>
<div className={styles.selectInfo_name}>{item.selectInfo.name}</div>
<div className={styles.selectInfo_price}>{priceFormat(item.selectInfo.min)}</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
case 2:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.mainPic} />
<div className={cx(styles.selectInfo, styles.integral)}>
<div className={styles.selectInfo_name}>{item.selectInfo.name}</div>
<div className={styles.selectInfo_price}>{numFormat(item.selectInfo.min)} 积分</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
case 3:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.logo} />
<div className={cx(styles.selectInfo, styles.shop)}>
<div className={styles.selectInfo_name}>{item.selectInfo.memberName}</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
case 4:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.imageUrl} />
<div className={cx(styles.selectInfo, styles.information)}>
<div className={styles.selectInfo_name}>{item.selectInfo.title}</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
default:
return null
}
}
/**
* 打开选择模态框
* @param sort
* @param type
*/
const handleOpenSelectModal = (item: DataItemType) => {
setCurrentInfo(item)
setModalVisible(true)
}
const handleModalOk = async () => {
const selectResult = productRowCtl.selectRow[0]
if (!selectResult) {
message.info("请选择")
return null
}
const newList = [...list]
newList.map(item => {
if (item.sort === currentInfo?.sort) {
item.id = selectResult.id
item.selectInfo = selectResult
}
})
setList(newList)
changeProps({
props:Object.assign({ ...props }, { dataList: newList })
})
setModalVisible(false)
}
const handleModalCancel = async () => {
setModalVisible(false)
}
/**
* 获取模态框数据
* @param param
*/
const fetchTableList = async (param: any) => {
const params: any = {
...param,
}
let getFn: any = null
switch(currentInfo?.type) {
case 1:
params.priceTypeList = [1]
params.idNotInList = [currentInfo.id]
getFn = PublicApi.postSearchMobileShopEnterpriseGetCommodityList
break
case 2:
params.priceTypeList = [3]
params.idNotInList = [currentInfo.id]
getFn = PublicApi.postSearchMobileShopScoreGetCommodityList
break
case 3:
params.idList = [currentInfo.id]
getFn = PublicApi.getTemplateWebMemberShopWebPageByIdNotIn
break
case 4:
params.idList = [currentInfo.id]
getFn = PublicApi.getManageContentInformationPageByIdNotIn
break
default:
break
}
const res = getFn ? await getFn(params, {ctlType: 'none'}) : await new Promise((resolve) => resolve({data: [], totolCount: 0}))
return res.data
}
/**
* 根据类型显示文案
* @param type
*/
const showTextByType = (type: number) => {
switch(type) {
case 1:
return "商品"
case 2:
return "商品"
case 3:
return "店铺"
case 4:
return "资讯"
default:
return ""
}
}
return ( return (
<div className={styles.setting}> <div className={styles.setting}>
{/* <div className={styles.hideModule}> {/* <div className={styles.hideModule}>
<Checkbox checked={!visible} onChange={handleHideChange}>隐藏整个模块</Checkbox> <Checkbox checked={!visible} onChange={handleHideChange}>隐藏整个模块</Checkbox>
</div> */} </div> */}
<ReactSortable <div className={styles.setting_line}>
list={list} <div className={styles.setting_line_main}>
setList={(newList) => { <div className={styles.setting_line_name} >
setList(newList) <div style={{ flex: 1 }} onClick={() => setExpandState(!expandState)}>
if(!isEmpty(newList)) {
changeProps({
props:Object.assign({ ...props }, { dataList: newList })
})
}
}}
handle=".draghandle"
>
{list.map((item, index) => (
<div className={styles.setting_line} key={`setting_${index}`}>
<div className={styles.setting_line_main}>
<div className={styles.setting_line_name} >
<div style={{ flex: 1 }} onClick={() => handleExpand(item.sort, !item.expand)}>
{
item.expand ? <img className={styles.icon} src={arrowLeftIcon} /> : <img className={styles.icon} src={arrowRightIcon} />
}
<span>{item.name}</span>
</div>
<div className={styles.setting_line_operation}>
<Button type="link" disabled={index === 0} onClick={() => sortUp(index, item)} className={styles.setting_line_operation_btn} icon={<img className={styles.setting_line_operation_btn_icon} src={arrowUpIcon} />}></Button>
<Button type="link" disabled={index === list.length - 1} onClick={() => sortDown(index, item)} className={styles.setting_line_operation_btn} icon={<img className={styles.setting_line_operation_btn_icon} src={arrowDownIcon} />}></Button>
<Button type="link" className={cx(styles.setting_line_operation_btn, "draghandle")} icon={<img className={styles.setting_line_operation_btn_icon} src={sortIcon} />}></Button>
</div>
</div>
{ {
!!item.expand && ( expandState ? <img className={styles.icon} src={arrowLeftIcon} /> : <img className={styles.icon} src={arrowRightIcon} />
<div className={styles.setting_line_addItem}>
<div className={styles.deleteItem} >
<label onClick={() => handleClickItem(item.sort)}>
<DeleteOutlined className={styles.deleteItem_icon} />
<span>删除入口</span>
</label>
</div>
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>名称:</div>
<div className={styles.setting_line_addItem_line_brief}>
<Input value={item.name} onChange={(e) => handleNameChange(e.target.value, item.sort)} />
</div>
</div>
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>图片:</div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.uploadIconWrap}>
<ImageBox className={styles.uploadPreview} width={90} height={90} imgUrl={item.img} />
<UploadImage
fileMaxSize={200}
onChange={(url) => handleIconChange(url, item.sort)}
listType="text"
>
<div className={styles.uploadIconBtn}>
<PlusOutlined className={styles.uploadIconBtnIcon} />
<span>点击上传</span>
</div>
</UploadImage>
</div>
<label className={styles.uploadIconTip}>图片建议尺寸:1920*750</label>
<label className={styles.uploadIconTip}>大小:不超过200k</label>
</div>
</div>
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>跳转类型:</div>
<div className={styles.setting_line_addItem_line_brief}>
<Select style={{ width: '100%' }} value={item.type || undefined} onChange={(value) => handleTypeChange(value, item.sort)}>
{
RedirectTypeList.map(item => (<Select.Option value={item.value} key={`redirect_type_${item.value}`}>{item.label}</Select.Option>))
}
</Select>
</div>
</div>
{
item.type !== 5 && (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>跳转{showTextByType(item.type)}</div>
<div className={styles.setting_line_addItem_line_brief}>
<Button className={styles.selectBtn} icon={<PlusOutlined />} onClick={() => handleOpenSelectModal(item)}>选择{showTextByType(item.type)}</Button>
</div>
</div>
)
}
{
item.selectInfo ? renderSelectItemByType(item.type, item) : null
}
</div>
)
} }
<span>背景图</span>
</div> </div>
</div> </div>
))}
</ReactSortable>
<Button className={styles.selectBtn} icon={<PlusOutlined />} onClick={handleAddItem}>添加广告</Button>
<ModalTable
modalTitle={`选择${showTextByType(currentInfo?.type || 1)}`}
width={modalWidthMap[currentInfo?.type || 1]}
confirm={handleModalOk}
cancel={handleModalCancel}
scroll={{ y: 400 }}
visible={modalVisible}
columns={tableColumn[currentInfo?.type || 1]}
rowSelection={productRowSelection}
fetchTableData={params => fetchTableList(params)}
formilyProps={
{ {
ctx: { expandState && (
schema: currentInfo?.type === 1 ? formProduct : basicSchema, <div className={styles.setting_line_addItem}>
components: { ModalSearch: Search, SearchSelect, Submit } , <div className={styles.setting_line_addItem_line}>
effects: ($, actions) => { <div className={styles.setting_line_addItem_line_label}>名称:</div>
actions.reset() <div className={styles.setting_line_addItem_line_brief}>
useStateFilterSearchLinkageEffect( 背景图
$, </div>
actions, </div>
'name', <div className={styles.setting_line_addItem_line}>
FORM_FILTER_PATH, <div className={styles.setting_line_addItem_line_label}>图片:</div>
); <div className={styles.setting_line_addItem_line_brief}>
} <div className={styles.uploadIconWrap}>
} <ImageBox className={styles.uploadPreview} width={90} height={90} imgUrl={backdrop} />
<UploadImage
fileMaxSize={200}
onChange={(url) => handleBackdropChange(url)}
listType="text"
>
<div className={styles.uploadIconBtn}>
<PlusOutlined className={styles.uploadIconBtnIcon} />
<span>点击上传</span>
</div>
</UploadImage>
</div>
<label className={styles.uploadIconTip}>图片建议尺寸:1920*750</label>
<label className={styles.uploadIconTip}>大小:不超过200k</label>
</div>
</div>
</div>
)
} }
} </div>
resetModal={{ </div>
destroyOnClose: true
}}
tableProps={{
rowKey: 'id',
onRow: (record) => ({
onClick: () => {
productRowCtl.setSelectRow([record]);
productRowCtl.setSelectedRowKeys([record.id]);
},
})
}}
/>
</div> </div>
) )
} }
......
...@@ -29,50 +29,27 @@ interface QuickNavPropsType { ...@@ -29,50 +29,27 @@ interface QuickNavPropsType {
visible: boolean, visible: boolean,
} }
// 跳转类型:1-商品 2-分类 3-积分兑换 4-公司介绍 5-成为会员 12-外部链接(可多个)
const RedirectTypeList = [ const RedirectTypeList = [
{ {
value: 1, value: 1,
label: '找现货', label: '商品',
}, },
{ {
value: 2, value: 2,
label: '找供应', label: '分类',
}, },
{ {
value: 3, value: 3,
label: '发布求购', label: '积分兑换',
}, },
{ {
value: 4, value: 4,
label: '求购列表', label: '公司介绍',
}, },
{ {
value: 5, value: 5,
label: '换积分', label: '成为会员',
},
{
value: 6,
label: '找店铺',
},
{
value: 7,
label: '看资讯',
},
{
value: 8,
label: '授信申请',
},
{
value: 9,
label: '人气店铺',
},
{
value: 10,
label: '求购动态',
},
{
value: 11,
label: '最新成交',
}, },
{ {
value: 12, value: 12,
...@@ -234,6 +211,26 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => { ...@@ -234,6 +211,26 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
} }
/** /**
* 修改广告链接
* @param value
* @param id
*/
const handleUrlChange = (value: string, id: number) => {
console.log(value, "value")
const newList = [...list]
newList.map(item => {
if (item.id === id) {
item.url = `https://${value}`
}
})
setList(newList)
changeProps({
props:Object.assign({ ...props }, { dataList: newList })
})
}
/**
* 添加广告 * 添加广告
*/ */
const handleAddItem = () => { const handleAddItem = () => {
...@@ -253,6 +250,14 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => { ...@@ -253,6 +250,14 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
}) })
} }
const judgedItemNotInList = (item, type: number) => {
if(item.value === type) {
return true
}
return list.every(listItem => listItem.type !== item.value)
}
return ( return (
<div className={styles.setting}> <div className={styles.setting}>
{/* <div className={styles.hideModule}> {/* <div className={styles.hideModule}>
...@@ -308,11 +313,21 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => { ...@@ -308,11 +313,21 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
<div className={styles.setting_line_addItem_line_brief}> <div className={styles.setting_line_addItem_line_brief}>
<Select style={{ width: '100%' }} value={item.type || undefined} onChange={(value) => handleTypeChange(value, item.id)}> <Select style={{ width: '100%' }} value={item.type || undefined} onChange={(value) => handleTypeChange(value, item.id)}>
{ {
RedirectTypeList.map(item => (<Select.Option value={item.value} key={`redirect_type_${item.value}`}>{item.label}</Select.Option>)) RedirectTypeList.map(selectItem => judgedItemNotInList(selectItem, item.type) && (<Select.Option value={selectItem.value} key={`redirect_type_${selectItem.value}`}>{selectItem.label}</Select.Option>))
} }
</Select> </Select>
</div> </div>
</div> </div>
{
item.type === 12 && (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>链接地址:</div>
<div className={styles.setting_line_addItem_line_brief}>
<Input addonBefore="https://" value={item.url} onChange={(e) => handleUrlChange(e.target.value, item.id)} />
</div>
</div>
)
}
<div className={styles.setting_line_addItem_line}> <div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>图标:</div> <div className={styles.setting_line_addItem_line_label}>图标:</div>
<div className={styles.setting_line_addItem_line_brief}> <div className={styles.setting_line_addItem_line_brief}>
...@@ -340,7 +355,9 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => { ...@@ -340,7 +355,9 @@ const QuickNav: React.FC<QuickNavPropsType> = (props) => {
</div> </div>
))} ))}
</ReactSortable> </ReactSortable>
<Button className={styles.selectBtn} icon={<PlusOutlined />} onClick={handleAddItem}>添加功能模块</Button> {
list.length <=5 && <Button className={styles.selectBtn} icon={<PlusOutlined />} onClick={handleAddItem}>添加功能模块</Button>
}
</div> </div>
) )
} }
......
import React from 'react'
import { numFormat, priceFormat } from '@/utils/numberFomat'
import ImageBox from '@/components/ImageBox'
const showMainPic = (mainPic: string) => <ImageBox width={32} height={32} imgUrl={mainPic} />
export const promptCommodityColumn = [
{
title: 'ID',
dataIndex: 'id',
key: 'id',
width: 80,
},
{
title: "商品图片",
dataIndex: "mainPic",
render: (mainPic: string) => showMainPic(mainPic)
},
{
title: "商品名称",
dataIndex: "name",
width: 280,
ellipsis: true,
},
{
title: "品类",
render: (_, record) => record.customerCategory ? record.customerCategory.name : "",
ellipsis: true,
},
{
title: "品牌",
render: (_, record) => record.brand ? record.brand.name : "",
ellipsis: true,
},
{
title: "价格",
dataIndex: "min",
render: (_, record) => ${priceFormat(record.min)}`
},
]
export default promptCommodityColumn
import { ISchema } from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { PublicApi } from '@/services/api'
export const formProduct: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
customerCategoryId: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品类',
className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
queryParams: {
storeId: 2,
},
fetchSearch: PublicApi.getProductSelectGetSelectCategory,
style: {
width: 160
}
}
},
brandId: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品牌',
queryParams: {
storeId: 2,
},
fetchSearch: PublicApi.getSearchMobileShopStoreGetBrand,
style: {
width: 160
}
}
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
export const basicSchema: ISchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
},
},
}
}
@import "../../../../../../global//styles/utils.less";
@import "../../common.less";
.selectBtn {
display: block;
width: 100%;
background-color: #FAFBFC;
border: 1px dashed #D8DDE6;
}
.uploadPreview {
border: 1px solid #EBECF0;
}
import React, { useState, useEffect } from 'react'
import { Button, Input, Select, Checkbox, message } from 'antd'
import { PlusOutlined, DeleteOutlined } from '@ant-design/icons'
import { changeProps } from 'lingxi-editor-core'
import { ReactSortable } from "react-sortablejs"
import ImageBox from '@/components/ImageBox'
import cx from 'classnames'
import isEmpty from 'lodash/isEmpty'
import ModalTable from '@/components/ModalTable'
import UploadImage from '@/components/UploadImage'
import { PublicApi } from '@/services/api'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { numFormat, priceFormat } from '@/utils/numberFomat'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { formProduct, basicSchema } from './contant/schema'
import promptCommodityColumn from './contant/column'
import arrowRightIcon from '@/assets/icons/arrow_right.png'
import arrowLeftIcon from '@/assets/icons/arrow_left.png'
import arrowUpIcon from '@/assets/icons/arrow_up.png'
import arrowDownIcon from '@/assets/icons/arrow_down.png'
import sortIcon from '@/assets/icons/sort_icon.png'
import styles from './index.less'
interface DataItemType {
sort: number,
id: number,
name: string,
img: string,
type: number,
expand: boolean,
selectInfo?: any
}
interface BannerPropsType {
dataList: DataItemType[],
productIdList: number[],
storeId: number,
title: string,
}
const RedirectTypeList = [
{
value: 1,
label: '商品详情',
},
{
value: 2,
label: '积分详情',
},
{
value: 5,
label: '不跳转',
},
]
const modalWidthMap = {
1: 960,
2: 960,
3: 600,
4: 600
}
const RecommendCommodity: React.FC<BannerPropsType> = (props) => {
const { dataList, title, storeId, productIdList } = props
const [expandState, setExpandState] = useState<boolean>(true)
const [list, setList] = useState<DataItemType[]>([])
const [modalVisible, setModalVisible] = useState<boolean>(false)
const [currentInfo, setCurrentInfo] = useState<DataItemType>()
const [recommendTitle, setRecommendTitle] = useState<string>(title)
const [productRowSelection, productRowCtl] = useRowSelectionTable()
/**
* 根据选中的类型和id获取信息
* @param data
*/
const getSelectInfo = (data: DataItemType) => {
return new Promise((resolve) => {
let getFn: any = null
const param: any = {}
switch(data.type) {
case 1:
case 2:
param.commodityId = data.id
getFn = PublicApi.getSearchMobileShopStoreGetCommodityDetail
break
default:
break
}
getFn && getFn(param).then(res => {
resolve(res.data)
})
})
}
/**
* 修改名称
* @param value
* @param id
*/
const handleNameChange = (value: string) => {
setRecommendTitle(value)
changeProps({
props:Object.assign({ ...props }, { title: value })
})
}
/**
* 删除跳转选项
* @param sort
*/
const handleDeleteSelectItem = (sort: number) => {
const newList = [...list]
newList.map(item => {
if (item.sort === sort) {
item.id = 0,
item.selectInfo = null
}
})
setList(newList)
changeProps({
props:Object.assign({ ...props }, { dataList: newList })
})
}
/**
* 根据类型显示选择的信息
* @param type 1-商品详情 2-积分详情 3-店铺主页 4-资讯详情 5-不跳转
*/
const renderSelectItemByType = (type: number, item: DataItemType) => {
switch(type) {
case 1:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.mainPic} />
<div className={styles.selectInfo}>
<div className={styles.selectInfo_name}>{item.selectInfo.name}</div>
<div className={styles.selectInfo_price}>{priceFormat(item.selectInfo.min)}</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
case 2:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.mainPic} />
<div className={cx(styles.selectInfo, styles.integral)}>
<div className={styles.selectInfo_name}>{item.selectInfo.name}</div>
<div className={styles.selectInfo_price}>{numFormat(item.selectInfo.min)} 积分</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
case 3:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.logo} />
<div className={cx(styles.selectInfo, styles.shop)}>
<div className={styles.selectInfo_name}>{item.selectInfo.memberName}</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
case 4:
return (
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}></div>
<div className={styles.setting_line_addItem_line_brief}>
<div className={styles.selectInfoBox}>
<ImageBox direction="column" width={60} height={60} imgUrl={item.selectInfo.imageUrl} />
<div className={cx(styles.selectInfo, styles.information)}>
<div className={styles.selectInfo_name}>{item.selectInfo.title}</div>
</div>
<div className={styles.selectInfoBox_delete} onClick={() => handleDeleteSelectItem(item.sort)}>
<DeleteOutlined />
</div>
</div>
</div>
</div>
)
default:
return null
}
}
/**
* 打开选择模态框
* @param sort
* @param type
*/
const handleOpenSelectModal = () => {
setModalVisible(true)
}
const handleModalOk = async () => {
const selectResult = productRowCtl.selectRow
if (!selectResult || isEmpty(selectResult)) {
message.info("请选择")
return null
}
// const newList = [...list]
// newList.map(item => {
// if (item.sort === currentInfo?.sort) {
// item.id = selectResult.id
// item.selectInfo = selectResult
// }
// })
// setList(newList)
changeProps({
props:Object.assign({ ...props }, { productIdList: productRowCtl.selectedRowKeys })
})
setModalVisible(false)
}
const handleModalCancel = async () => {
setModalVisible(false)
}
/**
* 获取模态框数据
* @param param
*/
const fetchTableList = async (param: any) => {
const params: any = {
...param,
priceTypeList: [1],
idNotInList: productIdList,
storeId
}
const res = await PublicApi.postSearchMobileShopStoreGetCommodityList(params, {ctlType: 'none'})
return res.data
}
return (
<div className={styles.setting}>
{/* <div className={styles.hideModule}>
<Checkbox checked={!visible} onChange={handleHideChange}>隐藏整个模块</Checkbox>
</div> */}
<div className={styles.setting_line}>
<div className={styles.setting_line_main}>
<div className={styles.setting_line_name} >
<div style={{ flex: 1 }} onClick={() => setExpandState(!expandState)}>
{
expandState ? <img className={styles.icon} src={arrowLeftIcon} /> : <img className={styles.icon} src={arrowRightIcon} />
}
<span>{title}</span>
</div>
</div>
{
expandState && (
<div className={styles.setting_line_addItem}>
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>名称:</div>
<div className={styles.setting_line_addItem_line_brief}>
<Input value={recommendTitle} onChange={(e) => handleNameChange(e.target.value)} />
</div>
</div>
<div className={styles.setting_line_addItem_line}>
<div className={styles.setting_line_addItem_line_label}>推荐商品:</div>
<div className={styles.setting_line_addItem_line_brief}>
<Button className={styles.selectBtn} icon={<PlusOutlined />} onClick={() => handleOpenSelectModal()}>选择商品</Button>
</div>
</div>
{/* {
item.selectInfo ? renderSelectItemByType(item.type, item) : null
} */}
</div>
)
}
</div>
</div>
<ModalTable
modalTitle="选择商品"
width={960}
confirm={handleModalOk}
cancel={handleModalCancel}
scroll={{ y: 400 }}
visible={modalVisible}
columns={promptCommodityColumn}
rowSelection={productRowSelection}
fetchTableData={params => fetchTableList(params)}
formilyProps={
{
ctx: {
schema: basicSchema,
components: { ModalSearch: Search, SearchSelect, Submit } ,
effects: ($, actions) => {
actions.reset()
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
}
}
}
}
resetModal={{
destroyOnClose: true
}}
tableProps={{
rowKey: 'id',
onRow: (record) => ({
onClick: () => {
if(!productRowCtl.selectRow.includes(record)) {
productRowCtl.setSelectRow([...productRowCtl.selectRow, record]);
productRowCtl.setSelectedRowKeys([...productRowCtl.selectRow.map(item => item.id), record.id]);
} else {
productRowCtl.setSelectRow(productRowCtl.selectRow.filter(selectRowItem => selectRowItem.id !== record.id));
productRowCtl.setSelectedRowKeys(productRowCtl.selectedRowKeys.filter(selectedRowKeysItem => selectedRowKeysItem !== record.id))
}
},
})
}}
/>
</div>
)
}
export default RecommendCommodity
...@@ -3,6 +3,8 @@ import { SelectedInfoType, clearSelectedStatus, PROPS_TYPES } from 'lingxi-edito ...@@ -3,6 +3,8 @@ import { SelectedInfoType, clearSelectedStatus, PROPS_TYPES } from 'lingxi-edito
import HeaderNav from './components/headerNav' import HeaderNav from './components/headerNav'
import Banner from './components/banner' import Banner from './components/banner'
import QuickNav from './components/quickNav' import QuickNav from './components/quickNav'
import HeadBackground from './components/headBackground'
import RecommendCommodity from './components/recommendCommodity'
import BottomNavigation from './components/bottomNavigation' import BottomNavigation from './components/bottomNavigation'
import styles from './index.less' import styles from './index.less'
...@@ -19,6 +21,10 @@ const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => { ...@@ -19,6 +21,10 @@ const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => {
if (componentType) { if (componentType) {
switch (componentType.type) { switch (componentType.type) {
case PROPS_TYPES.mobileShopHeaderNav:
return <HeadBackground {...initProps} />
case PROPS_TYPES.mobileShopCommodity:
return <RecommendCommodity {...initProps} />
case PROPS_TYPES.mobileHeaderNav: case PROPS_TYPES.mobileHeaderNav:
return <HeaderNav {...initProps} /> return <HeaderNav {...initProps} />
case PROPS_TYPES.mobileBanner: case PROPS_TYPES.mobileBanner:
......
...@@ -5,7 +5,6 @@ import SettingList from '../../../../components/SettingList' ...@@ -5,7 +5,6 @@ import SettingList from '../../../../components/SettingList'
import GoodsItem from './GoodsItem' import GoodsItem from './GoodsItem'
import SettingPanel from '../../../../components/SettingPanel' import SettingPanel from '../../../../components/SettingPanel'
import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons' import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons'
import { GetTemplatePlatformFindGoodsListResponseDetail } from '@/services/TemplateApi'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import { filterProps } from '../../../../utils' import { filterProps } from '../../../../utils'
import styles from './index.less' import styles from './index.less'
...@@ -37,7 +36,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => { ...@@ -37,7 +36,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
const { templateid, categoryid, goodsList = [], templateType } = props const { templateid, categoryid, goodsList = [], templateType } = props
const [current, setCurrent] = useState<number>(1) const [current, setCurrent] = useState<number>(1)
const [pageSize, setPageSize] = useState<number>(10) const [pageSize, setPageSize] = useState<number>(10)
const [noSelectGoods, setNoSelectGoods] = useState<GetTemplatePlatformFindGoodsListResponseDetail[]>([]) const [noSelectGoods, setNoSelectGoods] = useState<any[]>([])
const [selectList, setSelectList] = useState<any>([]) const [selectList, setSelectList] = useState<any>([])
const [selectGoodsList, setSelectGoodsList] = useState<any>(goodsList) const [selectGoodsList, setSelectGoodsList] = useState<any>(goodsList)
const [goodsIds, setGoodsIds] = useState<any>([]) const [goodsIds, setGoodsIds] = useState<any>([])
...@@ -240,7 +239,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => { ...@@ -240,7 +239,7 @@ const GoodsSetting: React.FC<GoodsSettingPropsType> = (props) => {
postFn(param).then(res => { postFn(param).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve() resolve(true)
} else { } else {
reject() reject()
} }
......
...@@ -21,6 +21,7 @@ export const mobileShopHeaderNav = { ...@@ -21,6 +21,7 @@ export const mobileShopHeaderNav = {
key: "1", key: "1",
"1": { "1": {
"componentName": "MobileShopHeaderNav", "componentName": "MobileShopHeaderNav",
"componentType": PROPS_TYPES.mobileShopHeaderNav,
"title": "背景图编辑", "title": "背景图编辑",
"canEdit": true, "canEdit": true,
"canHide": false, "canHide": false,
......
...@@ -25,7 +25,7 @@ import { ...@@ -25,7 +25,7 @@ import {
import Loading from '../../editor/components/Loading' import Loading from '../../editor/components/Loading'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import { LAYOUT_TYPE } from '@/constants' import { LAYOUT_TYPE } from '@/constants'
import { GetTemplateAdornAppStoreFindResponse } from '@/services/TemplateApi' import { GetTemplateAdornAppStoreFindResponse, GetTemplateWebMemberShopWebFindByMemberIdAndRoleIdResponse } from '@/services/TemplateApi'
// import { GlobalConfig } from '@/global/config' // import { GlobalConfig } from '@/global/config'
import MobileSettingPanel from '../../editor/mobileSettingPanel' import MobileSettingPanel from '../../editor/mobileSettingPanel'
import { getAuth } from '@/utils/auth' import { getAuth } from '@/utils/auth'
...@@ -67,7 +67,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -67,7 +67,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
/** /**
* 获取店铺信息 * 获取店铺信息
*/ */
const fetchShopInfo = () => { const fetchShopInfo = (): Promise<GetTemplateWebMemberShopWebFindByMemberIdAndRoleIdResponse> => {
return new Promise((resolve) => { return new Promise((resolve) => {
const param: any = { const param: any = {
memberId, memberId,
...@@ -191,73 +191,35 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -191,73 +191,35 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
const getComponentsConfig = async () => { const getComponentsConfig = async () => {
try { try {
// const appConfig = await getAppShopConfig() const appConfig = await getAppShopConfig()
// console.log(appConfig, "appConfig") console.log(appConfig, "appConfig")
//店铺信息 //店铺信息
const shopInfo = await fetchShopInfo() const shopInfo = await fetchShopInfo()
mobileShopHeaderNav[mobileShopHeaderNav.key].props.shopInfo = shopInfo mobileShopHeaderNav[mobileShopHeaderNav.key].props.shopInfo = shopInfo
// if(appConfig?.topBO) {
// // 顶部导航
// mobileHeaderNav[mobileHeaderNav.key].props.styleTheme = appConfig?.topBO.style
// mobileHeaderNav[mobileHeaderNav.key].props.dataList = appConfig?.topBO.topDetailsBOList
// }
// if(appConfig?.advertBO) { mobileShopCommodityList[mobileShopCommodityList.key].props.storeId = shopInfo.id
// // 轮播广告
// mobileBanner[mobileBanner.key].props = {
// visible: appConfig.advertBO.status,
// dataList: appConfig.advertBO.advertDetailsBOList
// }
// }
// if(appConfig?.functionBO) { if(appConfig?.backdropBO) {
// // 功能入口 mobileShopHeaderNav[mobileShopHeaderNav.key].props.backdrop = appConfig?.backdropBO.backdrop
// mobileQuickNav[mobileQuickNav.key].props = { }
// visible: appConfig.functionBO.status,
// dataList: appConfig.functionBO.functionDetailsBO,
// }
// }
// if(appConfig?.showcaseBO) {
// // 橱窗推荐
// mobileShowCase[mobileShowCase.key].props = {
// visible: appConfig?.showcaseBO.status,
// dataList: appConfig?.showcaseBO.showcaseDetailsBO,
// }
// }
// if(appConfig?.storeBO) {
// const storeBOParam = {
// current: 1,
// pageSize: 100,
// idList: appConfig?.storeBO.storeIdList || [],
// }
// console.log(storeBOParam, "storeBOParam")
// const storeBORes = await getRecommendShopList(storeBOParam)
// // 推荐店铺 if(appConfig?.advertBO) {
// mobileRecommendShops[mobileRecommendShops.key].props = { mobileBanner[mobileBanner.key].props.dataList = appConfig?.advertBO.advertDetailsBOList
// visible: appConfig?.storeBO.status, }
// dataList: getStoreBOList(storeBORes),
// }
// }
// if(appConfig?.excellentBO) { if(appConfig?.functionBO) {
// // 优质推荐 mobileQuickNav[mobileQuickNav.key].props.dataList = appConfig?.functionBO.functionDetailsBO
// mobileQuality[mobileQuality.key].props = { }
// visible: appConfig?.excellentBO.status,
// dataList: await getExcellentDetailsBO(appConfig?.excellentBO.excellentDetailsBO),
// }
// }
// if(appConfig?.bottomBO) { if(appConfig?.productBO) {
// // 底部导航 mobileShopCommodityList[mobileShopCommodityList.key].props = {
// mobileBottomNavigation[mobileBottomNavigation.key].props = { title: appConfig.productBO.title,
// visible: appConfig?.bottomBO.status, productIdList: appConfig.productBO.productIdList
// dataList: appConfig?.bottomBO.bottomDetailsBOList, }
// } } else {
// } mobileShopCommodityList[mobileShopCommodityList.key].props.title = '热销商品'
}
const config = { const config = {
...mallLayoutConfig, ...mallLayoutConfig,
......
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