ZLW-PC\Administrator
7 years ago
5 changed files with 131 additions and 4 deletions
-
37app/Http/Controllers/Weixin/CollectGoodsController.php
-
31app/Http/Controllers/Weixin/UserController.php
-
2resources/views/weixin/user/index.blade.php
-
61resources/views/weixin/user/userGoodsHistory.blade.php
-
4routes/web.php
@ -0,0 +1,37 @@ |
|||
<?php |
|||
namespace App\Http\Controllers\Weixin; |
|||
|
|||
use App\Http\Controllers\Weixin\CommonController; |
|||
use Illuminate\Http\Request; |
|||
|
|||
class CollectGoodsController extends CommonController |
|||
{ |
|||
public function __construct() |
|||
{ |
|||
parent::__construct(); |
|||
} |
|||
|
|||
//商品列表
|
|||
public function goodslist(Request $request) |
|||
{ |
|||
if($request->input('typeid', '') != ''){$data['typeid'] = $request->input('typeid');} |
|||
if($request->input('tuijian', '') != ''){$data['tuijian'] = $request->input('tuijian');} |
|||
if($request->input('keyword', '') != ''){$data['keyword'] = $request->input('keyword');} |
|||
if($request->input('status', '') != ''){$data['status'] = $request->input('status');} |
|||
if($request->input('is_promote', '') != ''){$data['is_promote'] = $request->input('is_promote');} |
|||
if($request->input('orderby', '') != ''){$data['orderby'] = $request->input('orderby');} |
|||
if($request->input('max_price', '') != ''){$data['max_price'] = $request->input('max_price');}else{$data['max_price'] = 99999;} |
|||
if($request->input('min_price', '') != ''){$data['min_price'] = $request->input('min_price');}else{$data['min_price'] = 0;} |
|||
|
|||
//商品列表
|
|||
$postdata = array( |
|||
'limit' => 10, |
|||
'offset' => 0 |
|||
); |
|||
$url = env('APP_API_URL')."/goods_list"; |
|||
$goods_list = curl_request($url,$postdata,'GET'); |
|||
$data['goods_list'] = $goods_list['data']['list']; |
|||
|
|||
return view('weixin.goods.goodslist', $data); |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue