Commit a7e6b56b authored by 卢均锐's avatar 卢均锐

Merge branch 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-system into v2

* 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-system: fix: 修改引入文件路径
parents b8d2b8a8 efb2bb2a
......@@ -111,7 +111,7 @@ const router = [
// path: '/home',
// name: 'home',
// component: '@/pages/home',
// icon: 'BarChartOutlined'
// // icon: 'BarChartOutlined'
// },
// ...routeList,
// merchantMarketingRoute,
......
import React, { useEffect, useRef, useState } from 'react';
import StatusTag from '@/components/StatusTag';
import { CloseOutlined, PlusOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons';
import { Input, Tag, Space } from 'antd';
// eslint-disable-next-line @typescript-eslint/camelcase
import { unstable_batchedUpdates } from 'react-dom';
import { priceFormat } from '@/utils/numberFomat';
import styles from './product.less';
import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag';
interface Iprops {
......@@ -14,7 +14,7 @@ interface Iprops {
productName: string,
productImgUrl: string,
id: number
activityId: number
activityId?: number
price: number
activityList: {
name: string,
......@@ -23,7 +23,7 @@ interface Iprops {
}[],
/** 是否有标签 */
isWithLabels?: boolean,
activityImage: string,
activityImage?: string,
label?: string[],
onLabelChange?: ((data: { id: number, activityId: number, label: string[] }) => void) | null
}
......
......@@ -96,7 +96,7 @@ const EditPanel = () => {
},
},
suggestProduct: {
type: selectedInfo.props.type,
type: selectedInfo.props.type || 1,
num: selectedInfo.props.num || 50,
title: selectedInfo.props.title,
},
......
......@@ -2,10 +2,7 @@ import React, { useContext, useMemo, useState } from 'react';
import { useToggle } from '@umijs/hooks';
import { useSelector } from '@lingxi-disign/react';
import { context } from '../../common/context/context';
import { Product } from '@/pages/marketing/marketingActivitiesManagement/activePage/fixtures/components/ProductPanel';
import ActivityProductDrawer from '@/pages/marketing/marketingActivitiesManagement/activePage/fixtures/components/ActivityAreaSetting/activityProductDrawer';
import { PublicApi } from '@/services/api';
import { GetMarketingAdornPlatformActivityListAdornRequest } from '@/services/MaketingV2Api';
import { Product } from '@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/ProductPanel';
import CommodityDrawer from '@/pages/pageCustomized/components/drawers/commodityDrawer';
......
......@@ -2,8 +2,8 @@ import React, { useContext, useMemo, useState } from 'react';
import { useToggle } from '@umijs/hooks';
import { useSelector } from '@lingxi-disign/react';
import { context } from '../../common/context/context';
import { Product } from '@/pages/marketing/marketingActivitiesManagement/activePage/fixtures/components/ProductPanel';
import ActivityProductDrawer from '@/pages/marketing/marketingActivitiesManagement/activePage/fixtures/components/ActivityAreaSetting/activityProductDrawer';
import { Product } from '@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/ProductPanel';
import ActivityProductDrawer from '@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/ActivityAreaSetting/activityProductDrawer';
import { PublicApi } from '@/services/api';
import { GetMarketingAdornPlatformActivityListAdornRequest } from '@/services/MaketingV2Api';
......
......@@ -89,6 +89,9 @@ const CustomizeTabs: React.FC<Iprops> & { TabItem: typeof TabItem } = (props: Ip
/** @toReview获取商品详情和获取品牌,传递复杂类型用get请求不太合理 */
const getProduct = async (ids: number[]) => {
if (ids?.length === 0) {
return null;
}
return PublicApi.getMarketingAdornGoodsListAdorn({
idInList: ids as any,
shopId: shopId,
......@@ -98,6 +101,9 @@ const CustomizeTabs: React.FC<Iprops> & { TabItem: typeof TabItem } = (props: Ip
};
const getBrand = async (ids: number[]) => {
if (ids?.length === 0) {
return null;
}
const postData = {
idInList: ids,
shopId: shopId,
......@@ -117,7 +123,7 @@ const CustomizeTabs: React.FC<Iprops> & { TabItem: typeof TabItem } = (props: Ip
};
const sorted = ["flashSale", "saleRanking", "brand", "suggestProduct"];
const queue = sorted.map((_item) => {
return mapToAsync[_item](postData[_item]);
return mapToAsync[_item](postData?.[_item] || []);
});
const result = await Promise.all(queue);
const dataSourceRes = {};
......
......@@ -8,9 +8,9 @@ import configs from './common/schema';
import useGetLayout from './common/hooks/useGetLayout';
import { EditPanel } from './components/EditPanel';
import { FixtureContentProvider } from './common/context/context';
import MobileDesignPanel from '@/pages/marketing/marketingActivitiesManagement/activePage/fixtures/components/MobileDesignPanel';
import Toolbar from '@/pages/marketing/marketingActivitiesManagement/activePage/fixtures/components/Toolbar';
import ToolbarSubmit from '@/pages/marketing/marketingActivitiesManagement/activePage/fixtures/components/Toolbar/toolbarSubmit';
import MobileDesignPanel from '@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/MobileDesignPanel';
import Toolbar from '@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/Toolbar';
import ToolbarSubmit from '@/pages/marketingManage/marketing/marketingActivitiesManagement/activePage/fixtures/components/Toolbar/toolbarSubmit';
import { PublicApi } from '@/services/api';
import { usePageStatus } from '@/hooks/usePageStatus';
......@@ -82,6 +82,7 @@ const CategoryNavigation = () => {
};
const tabItemData = {};
const tabItemChild = pageConfig[_nodeKey].childNodes;
console.log(tabItemChild);
tabItemChild.forEach(element => {
const { otherProps: { type }, props, childNodes } = pageConfig[element];
const rest = type === 'suggestProduct' ? { type: props.type, num: props.num } : {};
......@@ -102,6 +103,7 @@ const CategoryNavigation = () => {
});
console.log(result);
const postData = { style: 0, category: result };
// return;
const { data, code } = await PublicApi.postTemplateAdornAppEnterpriseSave({
templateId: id,
categoryAdornContent: postData as any,
......
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