提交 027ae50a 作者: 龚洪江

修复:商品自定义编辑

上级 3a9111c1
#请求接口地址 #请求接口地址
VITE_REQUEST_BASE_URL='https://www.iuav.shop' #VITE_REQUEST_BASE_URL='https://www.iuav.shop'
#测试服 #测试服
#VITE_REQUEST_BASE_URL='https://test.iuav.shop' VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn' #VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='/api' #VITE_REQUEST_BASE_URL='/api'
#旧版接口地址 #旧版接口地址
......
...@@ -73,7 +73,6 @@ const RichText: React.FC<PropsType> = ({ ...@@ -73,7 +73,6 @@ const RichText: React.FC<PropsType> = ({
onChange(editor.getHtml() || ''); onChange(editor.getHtml() || '');
} }
}; };
// 及时销毁 editor ,重要!
useEffect(() => { useEffect(() => {
return () => { return () => {
if (editor == null) return; if (editor == null) return;
......
...@@ -201,7 +201,7 @@ const GoodsAddOrEditOrDetail = () => { ...@@ -201,7 +201,7 @@ const GoodsAddOrEditOrDetail = () => {
const goodsSpecVO: specEntity[] = specData.reduce((pre: any, cur: specEntity) => { const goodsSpecVO: specEntity[] = specData.reduce((pre: any, cur: specEntity) => {
cur.customizeInfo = cur.customizeInfo?.reduce((cusPre: any, cusCur: customizeEntity) => { cur.customizeInfo = cur.customizeInfo?.reduce((cusPre: any, cusCur: customizeEntity) => {
const bol: boolean = goodsSpecCopy.some((i: specEntity) => { const bol: boolean = goodsSpecCopy.some((i: specEntity) => {
return i.customizeInfo?.some((i: customizeEntity) => i.id === cusCur.id); return i.customizeInfo?.some((i: customizeEntity) => i.productSpec === cusCur.id);
}); });
cusPre = [ cusPre = [
...cusPre, ...cusPre,
......
...@@ -179,7 +179,7 @@ const GoodsList = () => { ...@@ -179,7 +179,7 @@ const GoodsList = () => {
//编辑商品 //编辑商品
const toEditGoods = (id: number) => { const toEditGoods = (id: number) => {
navigate({ navigate({
pathname: '/mallManage/mallGoods/add', pathname: '/mallManage/mallGoods/edit',
search: `id=${id}`, search: `id=${id}`,
}); });
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论