master
wangxinglong 2021-12-17 10:36:04 +08:00
parent ec4c429819
commit cd5ea3d614
2 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,9 @@ class Consumer extends Base
$res = $repo->findCouponMainList($whereMap,[], $params['page'], $params['size'], function ($q) use($lngRange, $latRange, $params) {
return $q->when(!empty($lngRange) && !empty($latRange), function($query) use($lngRange, $latRange){
return $q->with(["business"=>function($q){
return $q->field("business_subtitle,code");
}])->when(!empty($lngRange) && !empty($latRange), function($query) use($lngRange, $latRange){
$query->where(function ($queryB) use($lngRange) {
$queryB->whereOr($lngRange);
})->where($latRange);

View File

@ -40,9 +40,11 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
{field: 'name', title: '名称'},
{field: 'type_name', title: '优惠券类型'},
{templet: '#row-received_map', title: '领取位置'},
{field: 'received_time', title: '领取时间'},
{field: 'money', title: '金额'},
{field: 'business_name', title: '商家名称'},
{templet: '#row-sign_map', title: '签到位置'},
{field: 'verificate_time', title: '签到时间'},
{templet: '#row-state', title: '状态'},
]],
done: function () {