IndexController.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace Themes\Pro\modunawa\app\Http\Controllers;
  3. use App\Http\Controllers\Controller;
  4. use App\Services\CallApiService;
  5. class IndexController extends Controller
  6. {
  7. private $callApiService;
  8. public function __construct(CallApiService $callApiService)
  9. {
  10. $this->callApiService = $callApiService;
  11. }
  12. public function index()
  13. {
  14. $listType1Book = $this->callApiService->callApi([
  15. 'url' => 'list-type1-book',
  16. 'data' => [
  17. 'Book' => [
  18. [
  19. 'QueryVars' => [
  20. 'QueryName' => 'pro/widget-taxo',
  21. 'SimpleFilter' => "mx.taxo_code='ma-main-slider'",
  22. 'IsntPagination' => true,
  23. ],
  24. 'PageVars' => [
  25. 'Limit' => 10
  26. ]
  27. ],
  28. [
  29. 'QueryVars' => [
  30. 'QueryName' => 'pro:shop/item-taxo',
  31. 'SimpleFilter' => "mx.item_taxo_no='best'",
  32. 'SubSimpleFilter' => "image_type = 'thumb'",
  33. 'IsntPagination' => true,
  34. ],
  35. 'PageVars' => [
  36. 'Limit' => 10
  37. ]
  38. ],
  39. [
  40. 'QueryVars' => [
  41. 'QueryName' => 'pro:shop/item-taxo',
  42. 'SimpleFilter' => "mx.item_taxo_no='weekly-best'",
  43. 'SubSimpleFilter' => "image_type = 'thumb'",
  44. 'IsntPagination' => true,
  45. ],
  46. 'PageVars' => [
  47. 'Limit' => 10
  48. ]
  49. ],
  50. [
  51. 'QueryVars' => [
  52. 'QueryName' => 'pro:shop/item-taxo',
  53. 'SimpleFilter' => "mx.item_taxo_no='with-coin'",
  54. 'SubSimpleFilter' => "image_type = 'middle'",
  55. 'IsntPagination' => true,
  56. ],
  57. 'PageVars' => [
  58. 'Limit' => 10
  59. ]
  60. ],
  61. [
  62. 'QueryVars' => [
  63. 'QueryName' => 'pro:shop/item-taxo',
  64. 'SimpleFilter' => "mx.item_taxo_no='gift-coupon'",
  65. 'SubSimpleFilter' => "image_type = 'middle'",
  66. 'IsntPagination' => true,
  67. ],
  68. 'PageVars' => [
  69. 'Limit' => 10
  70. ]
  71. ],
  72. ]
  73. ]
  74. ]);
  75. // dump($listType1Book);
  76. return view('views.index', compact('listType1Book'));
  77. }
  78. }