|
@@ -14,7 +14,22 @@ class Category extends Common
|
|
|
public function lists(){
|
|
|
$category = Db::name('shopro_category')->where('parent_id', 1)->where('status','normal')->order('weigh', 'desc')->order('id', 'desc')->select();
|
|
|
$category = list_domain_image($category,['image']);
|
|
|
- $this->success('商城分类', $category);
|
|
|
+
|
|
|
+ $data[] = [
|
|
|
+ 'id' => 0,
|
|
|
+ 'name' => '全部',
|
|
|
+ 'parent_id' => 0,
|
|
|
+ 'style' => null,
|
|
|
+ 'image' => '',
|
|
|
+ 'description' => '',
|
|
|
+ 'status' => 'normal',
|
|
|
+ 'weigh' => 0,
|
|
|
+ 'createtime' => 0,
|
|
|
+ 'updatetime' => 0,
|
|
|
+ ];
|
|
|
+ $data = array_merge($data,$category);
|
|
|
+
|
|
|
+ $this->success('商城分类', $data);
|
|
|
}
|
|
|
|
|
|
//没用到
|