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 = {
label: '编辑',
type: PROPS_TYPES.mobileChannelGoodsCard
},
styleType: {
label: "样式",
type: PROPS_TYPES.objectArray
}
},
};
......
......@@ -19,18 +19,16 @@ export const promptCommodityColumn = [
{
title: "商品名称",
dataIndex: "name",
width: 280,
width: 300,
ellipsis: true,
},
{
title: "品类",
render: (_, record) => record.customerCategory ? record.customerCategory.name : "",
ellipsis: true,
// render: (_, record) => record.customerCategory.name
},
{
title: "品牌",
render: (_, record) => record.brand ? record.brand.name : "",
ellipsis: true,
// render: (_, record) => record.brand.name
},
{
title: "价格",
......@@ -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 = {
"x-component-props": {
placeholder: '请选择品类',
className: 'fixed-ant-selected-down', // 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
queryParams: {
storeId: 2,
},
fetchSearch: PublicApi.getProductSelectGetSelectCategory,
style: {
width: 160
......@@ -48,10 +45,7 @@ export const formProduct: ISchema = {
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请选择品牌',
queryParams: {
storeId: 2,
},
fetchSearch: PublicApi.getSearchMobileShopStoreGetBrand,
fetchSearch: PublicApi.getProductSelectGetSelectPlatformBrand,
style: {
width: 160
}
......
@import "../../../../../../global//styles/utils.less";
@import "../../../../../../global/styles/utils.less";
@import "../../common.less";
.selectBtn {
......
@import "../../../../../../global//styles/utils.less";
@import "../../../../../../global/styles/utils.less";
@import "../../common.less";
.selectBtn {
......
import React, { useState } from 'react'
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'
interface StyleSettingsPropsType {
......@@ -24,16 +24,30 @@ const StyleSettings: React.FC<StyleSettingsPropsType> = ({ selectedInfo }) => {
}
}
return (
<div className={styles.styleSettings}>
<div className={styles.styleList}>
{
(selectProps && selectProps.stylesThemeList) && selectProps.stylesThemeList.map(item => (
const renderSettingItem = () => {
const { props: initProps, propsConfig } = selectedInfo || {};
const componentType = propsConfig?.componentType
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)}>
<img className={styles.themeImg} src={item.img} title={item.key} />
</div>
))
case PROPS_TYPES.mobileChannelGoodsCard:
return 'mobileChannelGoodsCard'
default:
return null
}
}
}
return (
<div className={styles.styleSettings}>
<div className={styles.styleList}>
{renderSettingItem()}
</div>
</div>
)
......
......@@ -369,13 +369,14 @@ const CommodityDetail = (props) => {
setSelectCommodityUnitPriceId(item.commodityUnitPriceAndPicId)
setCurrentPriceRange(sortUnitPrice(item.unitPrice))
setAttrAndValList(item)
if(getAuth()) {
let productId: number = item.id
if (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) {
productId = item.commodityUnitPriceAndPicId
}
getStockCountByProductId(productId)
}
setStockCount(item.stockCount)
// if(getAuth()) {
// let productId: number = item.id
// if (layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) {
// productId = item.commodityUnitPriceAndPicId
// }
// getStockCountByProductId(productId)
// }
}
}
......@@ -386,17 +387,17 @@ const CommodityDetail = (props) => {
* 根据商品skuid获取商品库存数量
* @param productId
*/
const getStockCountByProductId = (productId: number) => {
const param: any = {
productId,
shopId: storeId,
}
PublicApi.getWarehouseStockByProductId(param).then((res => {
if (res.code === 1000) {
setStockCount(res.data)
}
}))
}
// const getStockCountByProductId = (productId: number) => {
// const param: any = {
// productId,
// shopId: storeId,
// }
// PublicApi.getWarehouseStockByProductId(param).then((res => {
// if (res.code === 1000) {
// setStockCount(res.data)
// }
// }))
// }
const judgeArrisCommon = (list, otherList) => {
if (list.length === otherList.length) {
......
......@@ -220,6 +220,8 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
if(channelInfo.memberId) {
const categoryList = await getCustomerCategoryTreeById(channelInfo.memberId)
mobileChannelCategory[mobileChannelCategory.key].props.dataList = categoryList
mobileChannelGoodsCard[mobileChannelGoodsCard.key].props.channelMemberId = channelInfo.memberId
}
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