CartController.php 890 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace App\Modules\Pc\Controllers;
  3. use App\Base\BaseController;
  4. use Faker\Provider\Image;
  5. class CartController extends BaseController
  6. {
  7. public function index()
  8. {
  9. return $this->ok([
  10. "total" => 1,
  11. "page_total" => 1,
  12. "list" => [
  13. [
  14. "id" => 1,
  15. "goods_id" => 1,
  16. "thumb" => Image::imageUrl(),
  17. "goods_name" => 1,
  18. "sn" => "型号-xxxx",
  19. "count" => 1,
  20. ],
  21. ],
  22. ]);
  23. }
  24. public function del()
  25. {
  26. return $this->ok();
  27. }
  28. public function ask()
  29. {
  30. return $this->ok([
  31. "id" => 1,
  32. "thumb" => Image::imageUrl(),
  33. "name" => "商品名称",
  34. "url" => "http://baidu.com/xxxx",
  35. ]);
  36. }
  37. }