/// <summary> /// 删除商品图片 /// </summary> public ActionResult DelProductImage(int pImgId = -1) { ProductImageInfo productImageInfo = AdminProducts.GetProductImageById(pImgId); if (productImageInfo == null || productImageInfo.StoreId != WorkContext.StoreId) { return(Content("0")); } AdminProducts.DeleteProductImageById(pImgId); AddStoreAdminLog("删除商品图片", "删除商品图片,商品图片ID:" + pImgId); return(Content("1")); }
/// <summary> /// 设置图片为商品主图 /// </summary> public ActionResult SetProductMianImage(int pImgId = -1) { ProductImageInfo productImageInfo = AdminProducts.GetProductImageById(pImgId); if (productImageInfo == null || productImageInfo.StoreId != WorkContext.StoreId) { return(Content("0")); } AdminProducts.SetProductMainImage(pImgId); AddStoreAdminLog("设置商品主图", "设置商品主图,商品图片ID:" + pImgId); return(Content("1")); }
/// <summary> /// 改变商品图片的排序 /// </summary> public ActionResult ChangeProductImageDisplayOrder(int pImgId = -1, int displayOrder = 0) { ProductImageInfo productImageInfo = AdminProducts.GetProductImageById(pImgId); if (productImageInfo == null || productImageInfo.StoreId != WorkContext.StoreId) { return(Content("0")); } AdminProducts.ChangeProductImageDisplayOrder(pImgId, displayOrder); AddStoreAdminLog("修改商品图片顺序", "修改商品图片顺序,商品图片ID:" + pImgId); return(Content("1")); }