diff --git a/app/admin/logic/store_product/StoreProductLogic.php b/app/admin/logic/store_product/StoreProductLogic.php index 73fb5bc1..d80c5964 100644 --- a/app/admin/logic/store_product/StoreProductLogic.php +++ b/app/admin/logic/store_product/StoreProductLogic.php @@ -189,6 +189,13 @@ class StoreProductLogic extends BaseLogic self::cate_update($two['id'], $two['pid'], $store_id, 2); self::cate_update($two['pid'], 0, $store_id, 1); } + }else{ + if ($one['pid'] == 0) { + self::cate_update($one['id'], 0, $store_id, 1); + }else{ + self::cate_update($one['id'], $one['pid'], $store_id, 2); + self::cate_update($one['pid'], 0, $store_id, 1); + } } } }