|
|
@@ -275,11 +275,15 @@ class GoodsCategoryService extends BaseService
|
|
|
*/
|
|
|
public function options()
|
|
|
{
|
|
|
- $map = [['mark', '=', 1], ['status', '=', 1]];
|
|
|
+ $type = request()->post('type',0);
|
|
|
+ $map = ['type'=>$type,'status'=>1,'mark'=>1];
|
|
|
+ if($type<=0){
|
|
|
+ unset($map['type']);
|
|
|
+ }
|
|
|
$list = $this->model->where($map)
|
|
|
->orderBy('sort', 'desc')
|
|
|
->orderBy('id', 'asc')
|
|
|
- ->select(['id', 'name', 'pid', 'icon'])
|
|
|
+ ->select(['id', 'name','type', 'pid', 'icon'])
|
|
|
->get()
|
|
|
->toArray();
|
|
|
|