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