From cd5ea3d614d70da3e552b13f3903495f9e8fa3bf Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Fri, 17 Dec 2021 10:36:04 +0800 Subject: [PATCH] setter --- app/controller/api/Consumer.php | 4 +++- public/static/manager/js/consumer/info.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controller/api/Consumer.php b/app/controller/api/Consumer.php index 3df38e7..b117878 100644 --- a/app/controller/api/Consumer.php +++ b/app/controller/api/Consumer.php @@ -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); diff --git a/public/static/manager/js/consumer/info.js b/public/static/manager/js/consumer/info.js index 8f784a3..808396b 100644 --- a/public/static/manager/js/consumer/info.js +++ b/public/static/manager/js/consumer/info.js @@ -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 () {