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