提交 421640a4 作者: 龚洪江

修复:商品编辑主图编辑问题

上级 15561bc7
#请求接口地址
VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api'
#旧版接口地址
......
......@@ -131,7 +131,7 @@ const ConfigurePriceModal: React.FC<ModalProps & selfProps> = ({
form={cfgPriceForm}
initialValues={{ leaseTerm: 0 }}
>
{goodsType && (
{goodsType === 1 && (
<Form.Item
label='租期'
name='leaseTerm'
......
......@@ -65,12 +65,6 @@ export function MenuView() {
// 设置当前选中的项目
setOpenKeys([getRoutePid(routerList, location.pathname).toString()]);
// 设置当前选中的项目的subMenu
console.log(
'当前选中menu-->',
getRouteID(routerList, location.pathname),
location.pathname,
routerList,
);
setSelectedKeys([getRouteID(routerList, location.pathname).toString()]);
}, []);
return (
......
......@@ -173,7 +173,11 @@ const GoodsAddOrEditOrDetail = () => {
{
imgType: 0,
imgUrl: values.mainImg[0].url,
id: goodsDetail ? values.mainImg[0].id : undefined,
id: goodsDetail
? goodsDetail.images.some((i) => i.id === values.mainImg[0].id)
? values.mainImg[0].id
: undefined
: undefined,
},
];
//副图
......@@ -182,11 +186,7 @@ const GoodsAddOrEditOrDetail = () => {
...values.subImg.map((v: any) => ({
imgType: 1,
imgUrl: v.url,
id: goodsDetail
? goodsDetail.images.some((i) => i.id === v.id)
? v.id
: undefined
: undefined,
id: goodsDetail ? goodsDetail.images.some((i) => i.id === v.id) : undefined,
})),
);
}
......
......@@ -50,13 +50,13 @@ import CourseManageView from '~/pages/mallManage/courseManage';
// const ActivityList = React.lazy(() => import('src/pages/activityManage/activityList')); //活动管理
//商品管理
// const ServiceListView = React.lazy(() => import('~/pages/mallManage/serviceManage/serviceList')); //服务列表
// const ServiceDetailView = React.lazy(
// () => import('~/pages/mallManage/serviceManage/serviceDetail'),
// ); //服务详情
// const ServiceIntroduceView = React.lazy(
// () => import('~/pages/mallManage/serviceManage/serviceIntroduce'),
// ); //服务介绍
const ServiceListView = React.lazy(() => import('~/pages/mallManage/serviceManage/serviceList')); //服务列表
const ServiceDetailView = React.lazy(
() => import('~/pages/mallManage/serviceManage/serviceDetail'),
); //服务详情
const ServiceIntroduceView = React.lazy(
() => import('~/pages/mallManage/serviceManage/serviceIntroduce'),
); //服务介绍
const RentListView = React.lazy(() => import('~/pages/mallManage/rentGoods/rentList')); //租赁列表
const RentAddOrEditOrDetailView = React.lazy(
() => import('~/pages/mallManage/rentGoods/rentAddOrEditOrDetail'),
......@@ -236,35 +236,35 @@ export const routerList: Array<RouteObjectType> = [
title: '课程管理',
},
},
// {
// path: '/mallManage/serviceList',
// element: withLoadingComponent(<ServiceListView />),
// meta: {
// id: 10110,
// icon: <SmileOutlined />,
// title: '服务管理',
// },
// },
// {
// path: '/mallManage/serviceDetail',
// element: withLoadingComponent(<ServiceDetailView />),
// meta: {
// id: 10120,
// icon: <SmileOutlined />,
// title: '服务详情',
// hidden: true,
// },
// },
// {
// path: '/mallManage/serviceIntroduce',
// element: withLoadingComponent(<ServiceIntroduceView />),
// meta: {
// id: 10120,
// icon: <SmileOutlined />,
// title: '服务介绍',
// hidden: true,
// },
// },
{
path: '/mallManage/serviceList',
element: withLoadingComponent(<ServiceListView />),
meta: {
id: 10110,
icon: <SmileOutlined />,
title: '服务管理',
},
},
{
path: '/mallManage/serviceDetail',
element: withLoadingComponent(<ServiceDetailView />),
meta: {
id: 10120,
icon: <SmileOutlined />,
title: '服务详情',
hidden: true,
},
},
{
path: '/mallManage/serviceIntroduce',
element: withLoadingComponent(<ServiceIntroduceView />),
meta: {
id: 10120,
icon: <SmileOutlined />,
title: '服务介绍',
hidden: true,
},
},
{
path: '/mallManage/rentGoods',
element: withLoadingComponent(<RentListView />),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论