request->all(); //判断用户有没有绑定手机 $telExists = $this->userBindTel->check($params['user_id']); if(!$telExists){ throw new ErrorCodeException(ErrorCode::NOT_BIND_TEL_ERROR); } //获取用户收货地址 $res['address'] = [ 'address' => '南宁市良庆区五象海尔·青啤联合广场', 'area' => 'A栋八单元' , 'lat' => '22.759950637817383', 'lng' => '108.3835678100586', 'sex' => '1', 'tel' => '15677717734', 'user_name' => '李小龙', 'user_id' => '214' ]; //返回预约送达时间 数组 $res['appointment_time'] = [ '08:30 - 09:00', '09:00 - 09:30', '09:30 - 10:00', '10:00 - 10:30' ]; // $res['store_list'] = [ '50' => [ 'store_nmae' => '五金杂货铺', 'goods_list' => [ 'id' => 3765, 'goods_id' => 836, 'name' => '扳手', 'num' => 2, 'price' => '50.00', 'total' => '100.00' ] ], '99' => [ 'store_nmae' => '回味手撕鸡J009', 'goods_list' => [ [ 'id' => 3971, 'goods_id' => 1301, 'name' => '半边手撕鸡', 'num' => 4, 'price' => '90.00', 'total' => '360.00' ], [ 'id' => 3971, 'goods_id' => 1301, 'name' => '半边手撕鸡', 'num' => 4, 'price' => '90.00', 'total' => '360.00' ] ] ], ]; //获取用户优惠券 $res['coupon'] = $this->couponService->getUserAvailableCoupons('',$params['user_id'],'',2,'',''); //获取配送费 $res['distribution'] = '5.0'; //增值服务接口 $res['value_added_service'] = [ 'select' => 1, 'price' => 3.50 ]; return $this->success($res); } public function check(){ } public function undo(){ } }