diff --git a/backend/modules/goods/models/ars/Category.php b/backend/modules/goods/models/ars/Category.php index 66c431c..6c9b073 100755 --- a/backend/modules/goods/models/ars/Category.php +++ b/backend/modules/goods/models/ars/Category.php @@ -101,10 +101,11 @@ class Category extends \yii\db\ActiveRecord /** * @param int $ownId + * @param int $needDefault * @return array * 数据键值对 */ - public static function modelColumn($ownId = 0) + public static function modelColumn($ownId = 0, $needDefault = 1) { $query = self::find()->where(['is_delete' => self::IS_DELETE_NO]); if ($ownId) { @@ -112,7 +113,7 @@ class Category extends \yii\db\ActiveRecord } $data = $query->asArray()->all(); $data = GoodsManager::btree($data); - $data = GoodsManager::constructDropList($data); + $data = GoodsManager::constructDropList($data, $needDefault); return $data; }