setter
parent
c3406befd3
commit
81d6fcf7a0
|
@ -33,7 +33,9 @@ class Spu extends Base
|
|||
public function index()
|
||||
{
|
||||
if ($this->request->isPost()) {
|
||||
$params = input();
|
||||
$params = input("searchParams/a");
|
||||
$params["page"] = input("page/d",1);
|
||||
$params["size"] = input("size/d",20);
|
||||
|
||||
$res = SpuRepository::getInstance()->list($params);
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ class SpuRepository extends Repository
|
|||
// $whereMap[] = ['is_activity', '=', Spu::COMMON_OFF];
|
||||
}
|
||||
|
||||
if (isset($params['saleable'])) {
|
||||
if (isset($params['saleable']) &&!empty( $params['saleable'])) {
|
||||
$whereMap[] = ['saleable', '=', $params['saleable']];
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,7 @@ class SpuRepository extends Repository
|
|||
|
||||
$whereMap[] = ['deleted_at', '=', null];
|
||||
|
||||
|
||||
$params['page'] = $params['page'] ?? 1;
|
||||
$params['size'] = $params['size'] ?? 20;
|
||||
|
||||
|
@ -113,7 +114,7 @@ class SpuRepository extends Repository
|
|||
$whereMap[] = ['activity_type', '=', $type];
|
||||
}
|
||||
|
||||
if (isset($params['saleable'])) {
|
||||
if (isset($params['saleable'])&&!empty( $params['saleable'])) {
|
||||
$whereMap[] = ['saleable', '=', $params['saleable']];
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline layui-hide">
|
||||
<label class="layui-form-label">商品属性</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="spu_type">
|
||||
|
|
Loading…
Reference in New Issue