Commit e4cadcb1 authored by GuanHua's avatar GuanHua

feat: 店铺装修开发

parent 43c27248
......@@ -125,6 +125,14 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
<LayoutOutlined />
<label>渠道商城装修</label>
</div>
{
detailInfo?.environment === 4 && (
<div className={cx(styles.btn, styles.fit)}>
<LayoutOutlined />
<label>渠道品类导航装修</label>
</div>
)
}
<div className={cx(styles.btn, detailInfo?.use === 1 ? styles.use : '')} onClick={() => detailInfo?.use !== 1 ? setUseModalVisible(true) : {}}>
<PushpinOutlined />
<label>{detailInfo?.use === 1 ? '使用中' : '使用'}</label>
......
......@@ -7,7 +7,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { unstable_batchedUpdates as batchedUpdates } from 'react-dom';
import { ColumnsType } from 'antd/es/table';
import { GetMarketingPlatformActivityListAdornResponseDetail } from '@/services/MaketingV2Api';
import { GetMarketingAdornMerchantActivityListAdornResponseDetail } from '@/services/MarketingApi';
import StatusTag from '@/components/StatusTag';
import schema from './schema';
import styles from './activityProductDrawer.less';
......@@ -31,7 +31,7 @@ type SubmitType = {
activityName: string,
}
const columns: ColumnsType<GetMarketingPlatformActivityListAdornResponseDetail["productList"][0]> = [
const columns: ColumnsType<GetMarketingAdornMerchantActivityListAdornResponseDetail["goodsList"][0]> = [
{
title: '商品信息',
dataIndex: 'productInfo',
......@@ -91,11 +91,11 @@ const ActivityProductDrawer: React.FC<Iprops> = (props: Iprops) => {
const { visible, onCancel, fetchData = null, onOk, products = [], activityImage, mode = 'checked' } = props;
const [current, setPage] = useState<number>(1);
const [currentPageSize, setPageSize] = useState<number>(10);
const [dataSource, setDataSource] = useState<GetMarketingPlatformActivityListAdornResponseDetail[]>([]);
const [dataSource, setDataSource] = useState<GetMarketingAdornMerchantActivityListAdornResponseDetail[]>([]);
const [totalCount, setTotalCount] = useState<number>(0);
const [selectedKey, setSelectKey] = useState<number | null>(null);
const [selectedActivityProductList, setSelectedActivityProductList] = useState<GetMarketingPlatformActivityListAdornResponseDetail["productList"]>();
const [checkedProduct, setCheckedProduct] = useState<GetMarketingPlatformActivityListAdornResponseDetail["productList"]>([]);
const [selectedActivityProductList, setSelectedActivityProductList] = useState<GetMarketingAdornMerchantActivityListAdornResponseDetail["goodsList"]>();
const [checkedProduct, setCheckedProduct] = useState<GetMarketingAdornMerchantActivityListAdornResponseDetail["goodsList"]>([]);
const [loading, setLoading] = useState<boolean>(false);
const selectedRowKeys = useMemo(() => checkedProduct.map((_item) => `${_item.activityId!}-${_item.id!}`), [checkedProduct]);
......@@ -148,14 +148,14 @@ const ActivityProductDrawer: React.FC<Iprops> = (props: Iprops) => {
const onSelect = (id: number) => {
setSelectKey(id);
const target = dataSource.filter((_item) => _item.id === id)[0];
setSelectedActivityProductList(target.productList);
setSelectedActivityProductList(target.goodsList);
};
const handleOk = () => {
onOk?.(checkedProduct);
};
const handleRowSelect = (record: GetMarketingPlatformActivityListAdornResponseDetail["productList"][0], selected: boolean, selectedRows: GetMarketingPlatformActivityListAdornResponseDetail["productList"]) => {
const handleRowSelect = (record: GetMarketingAdornMerchantActivityListAdornResponseDetail["goodsList"][0], selected: boolean, selectedRows: GetMarketingAdornMerchantActivityListAdornResponseDetail["goodsList"]) => {
if (mode === 'checked') {
if (selected) {
setCheckedProduct((prev) => prev.concat(record));
......
......@@ -113,10 +113,6 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
);
}
},
{
title: '商家名称',
dataIndex: 'memberName',
},
]
const _onConfirm = () => {
......@@ -140,6 +136,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
if (selectId) {
_params.idNotInList = Array.isArray(selectId) ? selectId : [selectId]
}
console.log(_params, '_params')
const { data } = await PublicApi.getMarketingAdornGoodsListAdorn(_params);
setExpandedRowKeys(data?.data?.map((item) => item.id) || []);
return data;
......
import React, { useState, useEffect, useRef } from 'react';
import React, { useState, useEffect } from 'react';
import { history } from 'umi';
import { Input, Radio, Space, Button, Tag, Tooltip } from 'antd';
import { Button, Tooltip } from 'antd';
import cloneDeep from 'lodash/cloneDeep';
import { PlusOutlined } from '@ant-design/icons';
import { changeProps, updatePageConfig, PageConfigType } from '@lingxi-disign/core';
import StatusTag from '@/components/StatusTag'
import { PublicApi } from '@/services/api';
import { GetMarketingPlatformActivityListAdornRequest } from '@/services/MaketingV2Api';
import { GetMarketingAdornActivityGoodsAdornRequest } from '@/services/MarketingApi';
import ActivityProductDrawer from '@/pages/editor/components/drawer/activityProductDrawer/activityProductDrawer';
import ActivityImage from '@/assets/couponIcons/ActivityImage.svg';
......@@ -36,7 +35,7 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
useEffect(() => {
if (id && id != record[0]?.id) {
PublicApi.getMarketingAdornGoodsAdorn({ ids: id }).then((res) => {
PublicApi.postMarketingAdornActivityGoodsBatchAdorn({ ids: id }).then((res) => {
if (res.code === 1000) {
setRecord(res.data);
}
......@@ -46,13 +45,13 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
}
}, [id])
const fetchData = async (params: GetMarketingPlatformActivityListAdornRequest) => {
const fetchData = async (params: GetMarketingAdornActivityGoodsAdornRequest) => {
const common = {
...params,
shopId
};
const isWithActivityType = actType ? { ...common, activityType: actType } : common;
return await PublicApi.getMarketingAdornListAdorn(isWithActivityType as any);
return await PublicApi.getMarketingAdornMerchantActivityListAdorn(isWithActivityType as any);
};
const onOk = (data: any) => {
......@@ -61,42 +60,43 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
let _exData;
switch (actType) {
case 1:
_exData = { ..._data, img: _data.productImgUrl, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 2:
_exData = { ..._data, img: _data.productImgUrl, info: '直降60元', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: '直降60元', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 3:
_exData = { ..._data, img: _data.productImgUrl, info: '5折起', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: '5折起', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 4:
if (exType === 1) {
_exData = { ..._data, img: _data.productImgUrl, info: '满3件减50', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: '满3件减50', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
} else {
_exData = { ..._data, img: _data.productImgUrl, info: '满3件8折', discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: '满3件8折', discountPrice: priceFormat(_data.activityPrice), isnull: false }
}
break;
case 5:
if (exType === 1) {
_exData = { ..._data, img: _data.productImgUrl, info: '满100减10', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: '满100减10', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
} else {
_exData = { ..._data, img: _data.productImgUrl, info: '满100打5折', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: '满100打5折', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
}
break;
case 6:
_exData = { ..._data, img: _data.productImgUrl, info: `原价${_data.price}元`, isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: `原价${_data.price}元`, isnull: false }
break;
case 7:
_exData = { ..._data, img: _data.productImgUrl, info: `第2件5折`, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: `第2件5折`, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 8:
_exData = { ..._data, img: _data.productImgUrl, info: `99元4件`, discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: `99元4件`, discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 9:
_exData = {
..._data,
detail: {
title: _data.productName,
name: _data.productName,
img: _data.productImgUrl,
info: '打骨折',
originalPrice: priceFormat(_data.price),
......@@ -109,21 +109,22 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
}
break;
case 11:
_exData = { ..._data, img: _data.productImgUrl, info: `已送出 186 件`, discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: `已送出 186 件`, discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 12:
_exData = { ..._data, img: _data.productImgUrl, direction: 'column', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, direction: 'column', originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 13:
_exData = { ..._data, img: _data.productImgUrl, info: `加20元换购`, isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: `加20元换购`, isnull: false }
break;
case 14:
_exData = { ..._data, img: _data.productImgUrl, info: `10元抵100`, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: `10元抵100`, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
case 15:
_exData = {
..._data,
detail: {
name: _data.productName,
img: _data.productImgUrl,
title: _data.productName,
discountPrice: priceFormat(_data.price),
......@@ -134,11 +135,12 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
}
break;
case 16:
_exData = { ..._data, img: _data.productImgUrl, info: `已送出 186 件`, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
_exData = { ..._data, name: _data.productName, img: _data.productImgUrl, info: `已送出 186 件`, originalPrice: priceFormat(_data.price), discountPrice: priceFormat(_data.activityPrice), isnull: false }
break;
default:
break;
}
_exData.mode ='horizontal'
if (actType !== 15) {
changeProps({
title: _data.productName,
......@@ -177,6 +179,7 @@ const MarketingCardGood: React.FC<MarketingCardGoodProps> = (props: MarketingCar
componentName: 'MarketingCard.GoodsItem',
props: {
...child,
name: child.productName,
img: child.productImgUrl,
title: child.productName,
discountPrice: priceFormat(child.price),
......
......@@ -6,10 +6,8 @@
* @Description: In User Settings Edit
* @FilePath: /lingxi-business-paltform/src/pages/mobileTemplate/channelTemplateEdit/config.ts
*/
import { PROPS_SETTING_TYPES, PageConfigType } from '@lingxi-disign/core'
import { PageConfigType } from '@lingxi-disign/core'
import categoryNavTemplateDefault from '../shopTemplateEdit/img/category_template_default.png'
import styleThemeImgDefault from './imgs/style_theme_default.png'
import styleThemeImgScience from './imgs/style_theme_science.png'
import RED_PACKAGE from '../shopTemplateEdit/img/red_package.png';
export const defaultHeaderNavData = [
......@@ -194,190 +192,3 @@ export const defaultConfig: PageConfigType = {
},
},
}
export const mallLayoutConfig = {
key: "0",
"0": {
"componentName": "MallLayout",
"props": {
"style": {
"width": "100%",
"minHeight": "100%",
"background": "#F7F8FA",
"overflowX": "hidden",
"paddingBottom": "50px",
}
},
"childNodes": ["1", "2", "4", "5", "6", "7"]
},
}
export const mobileChannelHeaderNav = {
key: "1",
"1": {
"componentName": "MobileChannelHeaderNav",
"componentType": PROPS_SETTING_TYPES.mobileHeaderNav,
"title": "顶部导航栏",
"canEdit": true,
"canHide": false,
"props": {
styleTheme: 1,
dataList: [
{
name: "进货单",
content: "",
status: true,
},
{
name: "我的",
content: "",
status: true,
},
{
name: "搜索框",
content: "请输入商品名称或者品类",
status: true,
}
],
stylesThemeList: [
{
key: 0,
img: styleThemeImgDefault,
},
{
key: 1,
img: styleThemeImgScience,
}
]
},
}
}
export const divWrap = {
key: "2",
"2": {
"componentName": "div",
"props": {
"style": {
position: "relative",
marginTop: -48,
zIndex: 6,
}
},
"childNodes": ["3"]
}
}
export const mobileBanner = {
key: "3",
"3": {
"componentName": "MobileChannelBanner",
"componentType": "mobileChannelBanner",
"title": "轮播广告",
"canEdit": true,
"canHide": false,
"props": {
dataList: []
}
}
}
export const mobileChannelCategory = {
key: "4",
"4": {
"componentName": "MobileChannelCategory",
"componentType": PROPS_SETTING_TYPES.moibileChannelCategory,
"title": "商品品类",
"canEdit": false,
"canHide": false,
"props": {
dataList: []
}
}
}
export const mobileChannelGoodsCard = {
key: "5",
"5": {
"componentName": "MobileChannelGoodsCard",
"componentType": PROPS_SETTING_TYPES.mobileChannelGoodsCard,
"title": "推荐商品",
"canEdit": true,
"canHide": false,
"props": {
dataList: [
// {
// style: 0,
// title: "电气电工",
// viceTitle: "ELECTRICAL",
// },
// {
// style: 1,
// title: "机械设备",
// viceTitle: "EQUIPMENT",
// }
]
}
}
}
export const mobileChannelInformation = {
key: "6",
"6": {
"componentName": "MobileChannelInformation",
"componentType": PROPS_SETTING_TYPES.moibileChannelInformation,
"title": "行业资讯",
"canEdit": true,
"canHide": false,
"props": {
title: "行业资讯",
dataList: []
}
}
}
export const mobileBottomNavigation = {
key: "7",
"7": {
"componentName": "MobileBottomNavigation",
"componentType": PROPS_SETTING_TYPES.mobileBottomNavigation,
"title": "底部导航",
"canEdit": true,
"canHide": false,
"props": {
/** 类型:1-首页 2-积分 3-工作台 4-资讯 5-进货单 6-我的 */
dataList: [
{
name: "首页",
icon: "https://shushangyun-lingxi.oss-cn-shenzhen.aliyuncs.com/f8d1c35d735e47c187d8c0b0e12830971612351028389.png",
type: 1,
status: false,
},
{
name: "积分",
icon: "https://shushangyun-lingxi.oss-cn-shenzhen.aliyuncs.com/d4b7e96e136e4a2eade7e0d3e441eb611612351032370.png",
type: 2,
status: false,
},
{
name: "工作台",
icon: "https://shushangyun-lingxi.oss-cn-shenzhen.aliyuncs.com/f8492d51f9234c43bf631e9f2482a6751612351036609.png",
type: 3,
status: false,
},
{
name: "进货单",
icon: "https://shushangyun-lingxi.oss-cn-shenzhen.aliyuncs.com/50433de84ee046b19882e21c920b3f6b1612351040608.png",
type: 5,
status: false,
},
{
name: "我的",
icon: "https://shushangyun-lingxi.oss-cn-shenzhen.aliyuncs.com/aa76edefd91f4e82b4f8fa56e169cd3f1612351044724.png",
type: 6,
status: false,
}
]
}
}
}
......@@ -29,7 +29,6 @@ import * as EnhanceV2Api from './EnhanceV2Api';
import * as MessageV2 from './MessageV2Api';
import * as LogiticsV2 from './LogiticsV2Api';
import * as MarketingApi from './MarketingApi';
import * as MaketingV2Api from './MaketingV2Api'
import * as AfterServiceV2Api from './AfterServiceV2Api';
......@@ -73,6 +72,5 @@ export const PublicApi = {
...MessageV2,
...LogiticsV2,
...MarketingApi,
...MaketingV2Api,
...AfterServiceV2Api,
}
......@@ -31,7 +31,6 @@ const tokenList = [
{ name: 'MessageV2', token: '69a667ec9861e8bdc25b89238d0b908a2123d9fce26e72fec3cdf6cd0b1f2681', categoryIds: [0], }, // 消息中心v2
{ name: 'LogiticsV2', token: '732fb8e33970ff5dee830423a630e8e85c3ef3293abba7581b16749dfce8608b', categoryIds: [0], }, // 物流能力v2
{ name: 'Marketing', token: 'd952d25c4e8272a6dff69245dbddf983dc886521e2623464e476922fc95f43af', categoryIds: [0], }, // 营销能力
{ name: 'MaketingV2', token: 'f6d5cee2383ca203dfa2882b84dfa02a1d79de3c3ad892b42f030437fdc5ea21', categoryIds: [0] }, // 营销活动v2
{ name: 'AfterServiceV2', token: '58748fc89dcdb33ec5cac520c00293ba92abca362a8ddb979df589effd0db9bd', categoryIds: [0], }, // 售后能力V2
]
......
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