Commit 20761551 authored by GuanHua's avatar GuanHua

feat: app渠道商城装修页面开发

parent 54e70697
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14,6 +14,10 @@ const MobileChannelHeaderNav: ComponentConfigTypes = { ...@@ -14,6 +14,10 @@ const MobileChannelHeaderNav: ComponentConfigTypes = {
label: '编辑', label: '编辑',
type: PROPS_TYPES.mobileChannelGoodsCard type: PROPS_TYPES.mobileChannelGoodsCard
}, },
styleType: {
label: "样式",
type: PROPS_TYPES.objectArray
}
}, },
}; };
......
...@@ -19,18 +19,16 @@ export const promptCommodityColumn = [ ...@@ -19,18 +19,16 @@ export const promptCommodityColumn = [
{ {
title: "商品名称", title: "商品名称",
dataIndex: "name", dataIndex: "name",
width: 280, width: 300,
ellipsis: true, ellipsis: true,
}, },
{ {
title: "品类", title: "品类",
render: (_, record) => record.customerCategory ? record.customerCategory.name : "", // render: (_, record) => record.customerCategory.name
ellipsis: true,
}, },
{ {
title: "品牌", title: "品牌",
render: (_, record) => record.brand ? record.brand.name : "", // render: (_, record) => record.brand.name
ellipsis: true,
}, },
{ {
title: "价格", title: "价格",
...@@ -39,4 +37,76 @@ export const promptCommodityColumn = [ ...@@ -39,4 +37,76 @@ export const promptCommodityColumn = [
}, },
] ]
export default promptCommodityColumn
export const integralCommodityColumn = [
{
title: "商品图片",
dataIndex: "mainPic",
render: (mainPic: string) => showMainPic(mainPic)
},
{
title: "商品名称",
dataIndex: "name",
width: 300,
ellipsis: true,
},
{
title: "需要积分",
dataIndex: "min",
render: (_, record) => `${numFormat(record.min)}`
},
]
export const shopColumn = [
{
title: "店铺图片",
dataIndex: "logo",
render: (logo: string) => showMainPic(logo)
},
{
title: "店铺名称",
dataIndex: "memberName",
width: 300,
ellipsis: true,
},
]
export const brandColumn = [
{
title: "品牌logo",
dataIndex: "logoUrl",
render: (imageUrl: string) => showMainPic(imageUrl)
},
{
title: "品牌名称",
dataIndex: "name",
width: 360,
ellipsis: true,
},
]
export const informationColumn = [
{
title: "资讯图片",
dataIndex: "imageUrl",
render: (imageUrl: string) => showMainPic(imageUrl)
},
{
title: "资讯标题",
dataIndex: "title",
width: 360,
ellipsis: true,
},
]
const tableColumn = {
1: promptCommodityColumn,
2: shopColumn,
3: brandColumn,
4: informationColumn
}
export default tableColumn
...@@ -34,9 +34,6 @@ export const formProduct: ISchema = { ...@@ -34,9 +34,6 @@ export const formProduct: ISchema = {
"x-component-props": { "x-component-props": {
placeholder: '请选择品类', placeholder: '请选择品类',
className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ?? className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
queryParams: {
storeId: 2,
},
fetchSearch: PublicApi.getProductSelectGetSelectCategory, fetchSearch: PublicApi.getProductSelectGetSelectCategory,
style: { style: {
width: 160 width: 160
...@@ -48,10 +45,7 @@ export const formProduct: ISchema = { ...@@ -48,10 +45,7 @@ export const formProduct: ISchema = {
"x-component": 'SearchSelect', "x-component": 'SearchSelect',
"x-component-props": { "x-component-props": {
placeholder: '请选择品牌', placeholder: '请选择品牌',
queryParams: { fetchSearch: PublicApi.getProductSelectGetSelectPlatformBrand,
storeId: 2,
},
fetchSearch: PublicApi.getSearchMobileShopStoreGetBrand,
style: { style: {
width: 160 width: 160
} }
......
@import "../../../../../../global//styles/utils.less"; @import "../../../../../../global/styles/utils.less";
@import "../../common.less"; @import "../../common.less";
.selectBtn { .selectBtn {
......
@import "../../../../../../global//styles/utils.less"; @import "../../../../../../global/styles/utils.less";
@import "../../common.less"; @import "../../common.less";
.selectBtn { .selectBtn {
......
import React, { useState } from 'react' import React, { useState } from 'react'
import cx from 'classnames' import cx from 'classnames'
import { SelectedInfoType, changeProps } from 'lingxi-editor-core' import { SelectedInfoType, changeProps, PROPS_TYPES } from 'lingxi-editor-core'
import styles from './index.less' import styles from './index.less'
interface StyleSettingsPropsType { interface StyleSettingsPropsType {
...@@ -24,16 +24,30 @@ const StyleSettings: React.FC<StyleSettingsPropsType> = ({ selectedInfo }) => { ...@@ -24,16 +24,30 @@ const StyleSettings: React.FC<StyleSettingsPropsType> = ({ selectedInfo }) => {
} }
} }
return ( const renderSettingItem = () => {
<div className={styles.styleSettings}> const { props: initProps, propsConfig } = selectedInfo || {};
<div className={styles.styleList}> const componentType = propsConfig?.componentType
{
(selectProps && selectProps.stylesThemeList) && selectProps.stylesThemeList.map(item => ( if (componentType) {
switch (componentType.type) {
case PROPS_TYPES.mobileHeaderNav:
return (selectProps && selectProps.stylesThemeList) && selectProps.stylesThemeList.map(item => (
<div className={cx(styles.styleItem, selectKey === item.key ? styles.active : {})} key={item.key} onClick={() => handleChangeStyleTheme(item.key)}> <div className={cx(styles.styleItem, selectKey === item.key ? styles.active : {})} key={item.key} onClick={() => handleChangeStyleTheme(item.key)}>
<img className={styles.themeImg} src={item.img} title={item.key} /> <img className={styles.themeImg} src={item.img} title={item.key} />
</div> </div>
)) ))
} case PROPS_TYPES.mobileChannelGoodsCard:
return 'mobileChannelGoodsCard'
default:
return null
}
}
}
return (
<div className={styles.styleSettings}>
<div className={styles.styleList}>
{renderSettingItem()}
</div> </div>
</div> </div>
) )
......
...@@ -369,13 +369,14 @@ const CommodityDetail = (props) => { ...@@ -369,13 +369,14 @@ const CommodityDetail = (props) => {
setSelectCommodityUnitPriceId(item.commodityUnitPriceAndPicId) setSelectCommodityUnitPriceId(item.commodityUnitPriceAndPicId)
setCurrentPriceRange(sortUnitPrice(item.unitPrice)) setCurrentPriceRange(sortUnitPrice(item.unitPrice))
setAttrAndValList(item) setAttrAndValList(item)
if(getAuth()) { setStockCount(item.stockCount)
let productId: number = item.id // if(getAuth()) {
if (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) { // let productId: number = item.id
productId = item.commodityUnitPriceAndPicId // if (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) {
} // productId = item.commodityUnitPriceAndPicId
getStockCountByProductId(productId) // }
} // getStockCountByProductId(productId)
// }
} }
} }
...@@ -386,17 +387,17 @@ const CommodityDetail = (props) => { ...@@ -386,17 +387,17 @@ const CommodityDetail = (props) => {
* 根据商品skuid获取商品库存数量 * 根据商品skuid获取商品库存数量
* @param productId * @param productId
*/ */
const getStockCountByProductId = (productId: number) => { // const getStockCountByProductId = (productId: number) => {
const param: any = { // const param: any = {
productId, // productId,
shopId: storeId, // shopId: storeId,
} // }
PublicApi.getWarehouseStockByProductId(param).then((res => { // PublicApi.getWarehouseStockByProductId(param).then((res => {
if (res.code === 1000) { // if (res.code === 1000) {
setStockCount(res.data) // setStockCount(res.data)
} // }
})) // }))
} // }
const judgeArrisCommon = (list, otherList) => { const judgeArrisCommon = (list, otherList) => {
if (list.length === otherList.length) { if (list.length === otherList.length) {
......
...@@ -220,6 +220,8 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => { ...@@ -220,6 +220,8 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
if(channelInfo.memberId) { if(channelInfo.memberId) {
const categoryList = await getCustomerCategoryTreeById(channelInfo.memberId) const categoryList = await getCustomerCategoryTreeById(channelInfo.memberId)
mobileChannelCategory[mobileChannelCategory.key].props.dataList = categoryList mobileChannelCategory[mobileChannelCategory.key].props.dataList = categoryList
mobileChannelGoodsCard[mobileChannelGoodsCard.key].props.channelMemberId = channelInfo.memberId
} }
if(appConfig?.advertBO) { if(appConfig?.advertBO) {
......
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