123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- namespace App\Modules\Admin\Controllers\Admin;
- use App\Base\BaseController;
- use Faker\Provider\Image;
- class OrderController extends BaseController
- {
- public function paginate()
- {
- $data = $this->valid([
- "userinfo" => "",
- "status" => "",
- "page_size" => "",
- ]);
- return $this->ok([
- "total" => 1,
- "page_total" => 1,
- "list" => [
- [
- "id" => 1,
- "no" => "23456723",
- "goods_name" => "商品名称",
- "goods_sn" => "商品型号",
- "user_id" => 123,
- "email" => "[email protected]",
- "created_at" => "2023-05-05 15:44:14",
- ],
- ],
- ]);
- }
- public function store()
- {
- return $this->ok($this->mockCategory());
- }
- protected function mockCategory()
- {
- return [
- "id" => 1,
- "name" => "分类名称",
- "thumb" => "xx" . Image::imageUrl(),
- "level" => 1,
- "parent_id" => 1,
- "parent_name" => "上级名称",
- "child_category_count" => 1,
- "child_goods_count" => 1,
- "weight" => 1,
- "index_weight" => 1,
- "category_weight" => 1,
- "search_weight" => 1,
- ];
- }
- public function info()
- {
- return $this->ok($this->mockCategory());
- }
- public function del()
- {
- $data = $this->valid([
- "id" => "required",
- ]);
- return $this->ok();
- }
- }
|