settter
parent
766829c406
commit
3fa64cdd51
|
@ -39,14 +39,14 @@ class CouponRepository extends Repository
|
|||
*/
|
||||
public function couponMainHasList($id, $keyword, $page, $size)
|
||||
{
|
||||
return Coupon::findList(["id" => $id], [], $page, $size, function ($q) use ($keyword) {
|
||||
return Coupon::findList(["coupon_id" => $id], ["*"], $page, $size, function ($q) use ($keyword) {
|
||||
if (!empty($keyword)) {
|
||||
return $q::hasWhere('account', function ($q) use ($keyword) {
|
||||
$q->where('nick_name', 'like', "%" . $keyword . "%")->field("nick_name,avatar_url");
|
||||
$q->where('nick_name', 'like', "%" . $keyword . "%")->field("nick_name,avatar_url,user_code");
|
||||
});
|
||||
} else {
|
||||
return $q->with(["account" => function ($query) {
|
||||
$query->field("nick_name,avatar_url");
|
||||
$query->field("nick_name,avatar_url,user_code");
|
||||
}]);
|
||||
}
|
||||
}, ["id" => "desc"]);
|
||||
|
|
|
@ -51,8 +51,7 @@
|
|||
|
||||
<!-- 操作列 -->
|
||||
<script type="text/html" id="row-operate">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="" data-title="详情" lay-event="">详情</a>
|
||||
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" data-href="/manager/coupon/info.html?id={{d.id}}" data-title="【{{ d.name }}】详情" lay-event="info">详情</a>
|
||||
</script>
|
||||
|
||||
<!-- 状态列 -->
|
||||
|
|
Loading…
Reference in New Issue