master
wangxinglong 2021-12-17 17:47:40 +08:00
parent 585fb77e6f
commit 4d0e9951a4
1 changed files with 9 additions and 2 deletions

View File

@ -113,8 +113,8 @@ class Consumer extends Base
$flowArray = $accountRepo->getBusinessFlowCodeArray($account->user_code);
}
}
$res['list']->each(function ($item)use($params,$flowArray){
$time = time();
$res['list']->each(function ($item) use ($params, $flowArray, $time) {
unset($item->square);
$distance = (get_distance($params["lat"], $params["lng"], $item["lat"],$item["lng"]));
if ($distance >= 1000) {
@ -131,6 +131,13 @@ class Consumer extends Base
$item->businessName = $item->business_name;
$item->cover = $this->request->domain().$item->image_url;
$item->couponName = $item->name;
//到期状态 到期前7天!!!!!!!!没做完
// $weekTIme = 7 * 86400;
// $endTime = strtotime($item->end_time);
// if ($endTime > ($time - $weekTIme) && $endTime < $time) {
// $item->couponName
// }
});
return $this->json(0, 'success', $res);