【优化】取消后台sku上传在无图的情况下限制jpg格式的问题。

This commit is contained in:
jianweie
2023-07-04 15:40:05 +08:00
parent a28acaa88e
commit 898ad991cd

View File

@@ -242,7 +242,7 @@ namespace CoreCms.Net.Repository
obj.points = oldObj.points; obj.points = oldObj.points;
obj.isDefalut = true; obj.isDefalut = true;
obj.isDel = false; obj.isDel = false;
if (string.IsNullOrEmpty(obj.images) || !obj.images.Contains(".jpg")) if (string.IsNullOrEmpty(obj.images))
{ {
obj.images = goods.image; obj.images = goods.image;
} }
@@ -514,7 +514,7 @@ namespace CoreCms.Net.Repository
{ {
p.isDefalut = child.isDefalut; p.isDefalut = child.isDefalut;
if (!string.IsNullOrEmpty(child.images) && child.images.Contains(".jpg")) if (!string.IsNullOrEmpty(child.images))
{ {
p.images = child.images; p.images = child.images;
} }
@@ -614,7 +614,7 @@ namespace CoreCms.Net.Repository
obj.points = p.points; obj.points = p.points;
obj.isDefalut = p.isDefalut; obj.isDefalut = p.isDefalut;
obj.images = p.images; obj.images = p.images;
if (string.IsNullOrEmpty(p.images) || !p.images.Contains(".jpg")) if (string.IsNullOrEmpty(p.images))
{ {
obj.images = oldModel.image; obj.images = oldModel.image;
} }
@@ -671,7 +671,7 @@ namespace CoreCms.Net.Repository
obj.images = newObj.images; obj.images = newObj.images;
obj.isDefalut = true; obj.isDefalut = true;
obj.isDel = false; obj.isDel = false;
if (string.IsNullOrEmpty(newObj.images) || !newObj.images.Contains(".jpg")) if (string.IsNullOrEmpty(newObj.images))
{ {
obj.images = oldModel.image; obj.images = oldModel.image;
} }
@@ -703,7 +703,7 @@ namespace CoreCms.Net.Repository
obj.spesDesc = ""; obj.spesDesc = "";
obj.isDefalut = true; obj.isDefalut = true;
obj.isDel = false; obj.isDel = false;
if (string.IsNullOrEmpty(newObj.images) || !newObj.images.Contains(".jpg")) if (string.IsNullOrEmpty(newObj.images))
{ {
obj.images = oldModel.image; obj.images = oldModel.image;
} }