zxhxx 3 年之前
父節點
當前提交
462e7e07bf

+ 1 - 2
application/admin/controller/help/Family.php

@@ -52,8 +52,7 @@ class Family extends Backend
                 ->order($sort, $order)
                 ->paginate($limit);
             foreach ($list as $k => $v) {
-                $v->avatar = $v->avatar ? cdnurl($v->avatar, true) : letter_avatar($v->nickname);
-                $v->hidden(['password', 'salt']);
+
             }
             $result = array("total" => $list->total(), "rows" => $list->items());
 

+ 1 - 2
application/admin/controller/help/Help.php

@@ -57,8 +57,7 @@ class Help extends Backend
                 ->order($sort, $order)
                 ->paginate($limit);
             foreach ($list as $k => $v) {
-                $v->avatar = $v->avatar ? cdnurl($v->avatar, true) : letter_avatar($v->nickname);
-                $v->hidden(['password', 'salt']);
+
             }
             $result = array("total" => $list->total(), "rows" => $list->items());
 

+ 35 - 0
application/admin/controller/help/HelpApply.php

@@ -29,6 +29,41 @@ class HelpApply extends Backend
     {
         parent::import();
     }
+    /**
+     * 查看
+     */
+    public function index()
+    {
+        //设置过滤方法
+        $this->request->filter(['strip_tags', 'trim']);
+        if ($this->request->isAjax()) {
+            //如果发送的来源是Selectpage,则转发到Selectpage
+            if ($this->request->request('keyField')) {
+                $data = $this->selectpage()->getData();
+                if(!$this->request->request('keyValue')) {
+                    $data['list'] = array_merge([['id' => 0, 'title' => '无', 'pid' => 0]], $data['list']);
+                    $data['total']++;
+                }
+                return $data;
+            }
+            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
+            /**
+             * 获取企业信息
+             */
+            $where1  = is_sys_admin();
+            $list = $this->model
+                ->where($where)->where($where1)
+                ->order($sort, $order)
+                ->paginate($limit);
+            foreach ($list as $k => $v) {
+
+            }
+            $result = array("total" => $list->total(), "rows" => $list->items());
+
+            return json($result);
+        }
+        return $this->view->fetch();
+    }
     public function edit($ids=null)
     {
         if($this->request->isPost()) {

+ 34 - 0
application/admin/controller/help/HelpExt.php

@@ -27,7 +27,41 @@ class HelpExt extends Backend
         $this->view->assign("marriageList", $this->model->getMarriageList());
         $this->view->assign("medicalInsuranceList", $this->model->getMedicalInsuranceList());
     }
+    /**
+     * 查看
+     */
+    public function index()
+    {
+        //设置过滤方法
+        $this->request->filter(['strip_tags', 'trim']);
+        if ($this->request->isAjax()) {
+            //如果发送的来源是Selectpage,则转发到Selectpage
+            if ($this->request->request('keyField')) {
+                $data = $this->selectpage()->getData();
+                if(!$this->request->request('keyValue')) {
+                    $data['list'] = array_merge([['id' => 0, 'title' => '无', 'pid' => 0]], $data['list']);
+                    $data['total']++;
+                }
+                return $data;
+            }
+            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
+            /**
+             * 获取企业信息
+             */
+            $where1  = is_sys_admin();
+            $list = $this->model
+                ->where($where)->where($where1)
+                ->order($sort, $order)
+                ->paginate($limit);
+            foreach ($list as $k => $v) {
 
+            }
+            $result = array("total" => $list->total(), "rows" => $list->items());
+
+            return json($result);
+        }
+        return $this->view->fetch();
+    }
     public function import()
     {
         parent::import();