diff --git a/app/Http/Controllers/Api/UserAddressController.php b/app/Http/Controllers/Api/UserAddressController.php index df07d4c..9459a93 100644 --- a/app/Http/Controllers/Api/UserAddressController.php +++ b/app/Http/Controllers/Api/UserAddressController.php @@ -101,18 +101,14 @@ class UserAddressController extends CommonController $data['id'] = $request->input('id',null); $data['name'] = $request->input('name',null); $data['mobile'] = $request->input('mobile',null); - $data['country'] = $request->input('country',null); $data['province'] = $request->input('province',null); $data['city'] = $request->input('city',null); $data['district'] = $request->input('district',null); $data['address'] = $request->input('address',null); - if($request->input('telphone',null)!==null){$data['telphone'] = $request->input('telphone');} - if($request->input('zipcode',null)!==null){$data['zipcode'] = $request->input('zipcode');} - if($request->input('email',null)!==null){$data['email'] = $request->input('email');} - if($request->input('best_time',null)!==null){$data['best_time'] = $request->input('best_time');} + if($request->input('country',null)!==null){$data['country'] = $request->input('country');} if($request->input('is_default',null)!==null){$data['is_default'] = $request->input('is_default');} - if($data['id']===null || $data['name']===null || $data['mobile']===null || $data['address']===null || $data['country']===null || $data['province']===null || $data['city']===null || $data['district']===null) + if($data['id']===null || $data['name']===null || $data['mobile']===null || $data['address']===null || $data['province']===null || $data['city']===null || $data['district']===null) { return ReturnData::create(ReturnData::PARAMS_ERROR); } diff --git a/app/Http/Controllers/Weixin/GoodsController.php b/app/Http/Controllers/Weixin/GoodsController.php index 89d8762..a4ca78a 100644 --- a/app/Http/Controllers/Weixin/GoodsController.php +++ b/app/Http/Controllers/Weixin/GoodsController.php @@ -11,8 +11,32 @@ class GoodsController extends CommonController parent::__construct(); } + //商品详情 + public function goodsDetail(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.goodsDetail', $data); + } + //商品列表 - public function goodslist(Request $request) + public function goodsList(Request $request) { if($request->input('typeid', '') != ''){$data['typeid'] = $request->input('typeid');} if($request->input('tuijian', '') != ''){$data['tuijian'] = $request->input('tuijian');} @@ -32,6 +56,6 @@ class GoodsController extends CommonController $goods_list = curl_request($url,$postdata,'GET'); $data['goods_list'] = $goods_list['data']['list']; - return view('weixin.goods.goodslist', $data); + return view('weixin.goods.goodsList', $data); } } \ No newline at end of file diff --git a/app/Http/Model/UserAddress.php b/app/Http/Model/UserAddress.php index 9263302..ee3effd 100644 --- a/app/Http/Model/UserAddress.php +++ b/app/Http/Model/UserAddress.php @@ -134,7 +134,7 @@ class UserAddress extends BaseModel $model->user_id = $user_id; $model->is_default = isset($is_default) ? $is_default : 0; - if(isset($name)){$model->name = $country;} + if(isset($name)){$model->name = $name;} if(isset($country)){$model->country = $country;} if(isset($province)){$model->province = $province;} if(isset($city)){$model->city = $city;} diff --git a/resources/views/weixin/address/userAddressUpdate.blade.php b/resources/views/weixin/address/userAddressUpdate.blade.php index 986f8da..b73f5ae 100644 --- a/resources/views/weixin/address/userAddressUpdate.blade.php +++ b/resources/views/weixin/address/userAddressUpdate.blade.php @@ -26,6 +26,7 @@ .adr-form-group select{padding:5px;margin-right:10px;} .bottoma{display:block;font-size:18px;padding:10px;color:white;background-color: #f23030;text-align:center;} +