浏览代码

wesmiler ECY 画画交易平台

APPLE 2 年之前
父节点
当前提交
e9e03a654c
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8 4
      application/cmgadm/controller/shop/Goods.php

+ 8 - 4
application/cmgadm/controller/shop/Goods.php

@@ -55,11 +55,15 @@ class Goods extends Backend
             {
                 return $this->selectpage();
             }
+            $filter =  $this->request->get("filter", '');
+            $filter = $filter? json_decode($filter, true) : [];
+
+                if(isset($filter['stuid']) && $filter['stuid']){
+                    $filter['stuid'] = Studio::where(['title'=>$filter['stuid']])->value('id');
+                    $_GET['filter'] = urlencode(json_encode($filter, 256));
+                }
+                var_dump($this->request->get('filter'));
             list($where, $sort, $order, $offset, $limit) = $this->buildparams();
-            var_dump($where);
-            if(isset($where['stuid']) && $where['stuid']){
-                $where['stuid'] = Studio::where(['title'=>$where['stuid']])->value('id');
-            }
 
             $total = $this->model                    
                     ->where($where)