You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <?php
  2. namespace App\Http\Controllers\Weixin;
  3. use App\Http\Controllers\Weixin\CommonController;
  4. use Illuminate\Http\Request;
  5. use App\Common\ReturnCode;
  6. class GoodsBrandController extends BaseController
  7. {
  8. public function __construct()
  9. {
  10. parent::__construct();
  11. }
  12. //商品品牌详情
  13. public function brandDetail($id)
  14. {
  15. $postdata['id'] = $id;
  16. $url = env('APP_API_URL') . "/goodsbrand_detail";
  17. $res = curl_request($url, $postdata, 'GET');
  18. $data['post'] = $res['data'];
  19. if (!$data['post']) {
  20. $this->error_jump(ReturnCode::NO_FOUND, route('weixin'), 3);
  21. }
  22. return view('weixin.goods_brand.brandDetail', $data);
  23. }
  24. //商品品牌列表
  25. public function brandList(Request $request)
  26. {
  27. //商品列表
  28. $postdata['limit'] = 10;
  29. $postdata['offset'] = 0;
  30. $url = env('APP_API_URL') . "/goodsbrand_list";
  31. $res = curl_request($url, $postdata, 'GET');
  32. $data['list'] = $res['data']['list'];
  33. return view('weixin.goods_brand.brandList', $data);
  34. }
  35. }