Przeglądaj źródła

删除无用方法

lizhen_gitee 9 miesięcy temu
rodzic
commit
d150214496
1 zmienionych plików z 0 dodań i 40 usunięć
  1. 0 40
      application/common/controller/Apic.php

+ 0 - 40
application/common/controller/Apic.php

@@ -94,8 +94,6 @@ class Apic
         $this->_initialize();
         //日志
         $this->request_log();
-        //用户活跃
-//        $this->user_active();
 
         // 前置操作方法
         if ($this->beforeActionList) {
@@ -184,33 +182,6 @@ class Apic
         Lang::load(APP_PATH . $this->request->module() . '/lang/' . $lang . '/' . str_replace('.', '/', $name) . '.php');
     }
 
-    //结果集信息里,多个字段需要翻译
-    protected function list_lang($list,$field){
-        if(!$list || empty($list)){
-            return $list;
-        }
-        foreach($list as $vo => $info){
-            $list[$vo] = $this->info_lang($info,$field);
-        }
-        return $list;
-    }
-    //单条信息里,多个字段需要翻译
-    protected function info_lang($data,$field){
-        if(!$data || empty($data)){
-            return $data;
-        }
-        foreach($data as $key => $val){
-            if(in_array($key,$field)){
-                if($this->lang == 'en'){
-                    $data[$key] = $data[$key.'_en'];
-                    unset($data[$key.'_en']);
-                }else{
-                    unset($data[$key.'_en']);
-                }
-            }
-        }
-        return $data;
-    }
 
     /**
      * 操作成功返回的数据
@@ -230,17 +201,6 @@ class Apic
         }
         $this->result($msg, $data, $code, $type, $header);
     }
-    //find查询出来的结果如果为空数组,强制转换object
-    protected function success_find($msg = '', $data = null, $code = 1, $type = null, array $header = [])
-    {
-        if(empty($msg)){
-            $msg = '操作成功';
-        }
-        if(is_null($data) || $data === []){
-            $data = (object)[];
-        }
-        $this->result($msg, $data, $code, $type, $header);
-    }
 
     /**
      * 操作失败返回的数据