소스 검색

师傅端基础

lizhen_gitee 8 달 전
부모
커밋
a0c3364dd0
2개의 변경된 파일1개의 추가작업 그리고 110개의 파일을 삭제
  1. 1 27
      application/common/library/Authworker.php
  2. 0 83
      application/common/model/Worker.php

+ 1 - 27
application/common/library/Authworker.php

@@ -26,21 +26,7 @@ class Authworker
     protected $config = [];
     protected $config = [];
     protected $options = [];
     protected $options = [];
     protected $allowFields = [
     protected $allowFields = [
-        'id', 'ruletype', 'nickname', 'avatar', 'gender','mobile',
-        'realname',
-        'idcard',
-        'idcard_z_image',
-        'idcard_f_image',
-        'idcard_status',
-        'worker_image',
-        'worker_status',
-        'english_status',
-        'keshi_id',
-        'hospital',
-        'goodat',
-        'level_id',
-        'info',
-        'job_status'
+        'id',  'truename', 'avatar', 'gonghao','mobile',
     ];
     ];
 
 
 
 
@@ -67,18 +53,6 @@ class Authworker
     }
     }
 
 
     /**
     /**
-     * 生成不重复的随机数字字母组合
-     */
-    function getUinqueNo($length = 8, $nos = [])
-    {
-        $newid = Random::build("alnum", $length);
-        if (in_array($newid, $nos)) {
-            $newid = $this->getUinqueNo($length, $nos);
-        }
-        return $newid;
-    }
-
-    /**
      * 获取User模型
      * 获取User模型
      * @return User
      * @return User
      */
      */

+ 0 - 83
application/common/model/Worker.php

@@ -20,93 +20,10 @@ class Worker extends Model
     protected $updateTime = false;
     protected $updateTime = false;
     // 追加属性
     // 追加属性
     protected $append = [
     protected $append = [
-        'gender_text',
-        'idcard_status_text',
-        'worker_status_text',
-        'english_status_text',
-        'status_text'
     ];
     ];
 
 
 
 
 
 
-    public function getGenderList()
-    {
-        return ['1' => __('Gender 1'), '0' => __('Gender 0')];
-    }
-
-    public function getIdcardStatusList()
-    {
-        return ['-1' => __('Idcard_status -1'), '0' => __('Idcard_status 0'), '1' => __('Idcard_status 1'), '2' => __('Idcard_status 2'), '3' => __('Idcard_status 3')];
-    }
-
-    public function getWorkerStatusList()
-    {
-        return ['-1' => __('Worker_status -1'), '0' => __('Worker_status 0'), '1' => __('Worker_status 1'), '2' => __('Worker_status 2'), '3' => __('Worker_status 3')];
-    }
-
-    public function getEnglishStatusList()
-    {
-        return ['1' => __('English_status 1'), '0' => __('English_status 0')];
-    }
-
-    public function getStatusList()
-    {
-        return ['1' => __('Status 1'), '0' => __('Status 0'), '-1' => __('Status -1')];
-    }
-
-
-    public function getGenderTextAttr($value, $data)
-    {
-        $value = $value ? $value : (isset($data['gender']) ? $data['gender'] : '');
-        $list = $this->getGenderList();
-        return isset($list[$value]) ? $list[$value] : '';
-    }
-
-
-    public function getIdcardStatusTextAttr($value, $data)
-    {
-        $value = $value ? $value : (isset($data['idcard_status']) ? $data['idcard_status'] : '');
-        $list = $this->getIdcardStatusList();
-        return isset($list[$value]) ? $list[$value] : '';
-    }
-
-
-    public function getWorkerStatusTextAttr($value, $data)
-    {
-        $value = $value ? $value : (isset($data['worker_status']) ? $data['worker_status'] : '');
-        $list = $this->getWorkerStatusList();
-        return isset($list[$value]) ? $list[$value] : '';
-    }
-
-
-    public function getEnglishStatusTextAttr($value, $data)
-    {
-        $value = $value ? $value : (isset($data['english_status']) ? $data['english_status'] : '');
-        $list = $this->getEnglishStatusList();
-        return isset($list[$value]) ? $list[$value] : '';
-    }
-
-
-    public function getStatusTextAttr($value, $data)
-    {
-        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
-        $list = $this->getStatusList();
-        return isset($list[$value]) ? $list[$value] : '';
-    }
-
-
-
-
-    public function keshi()
-    {
-        return $this->belongsTo('Keshi', 'keshi_id', 'id', [], 'LEFT')->setEagerlyType(0);
-    }
-
-
-    public function Workerlevel()
-    {
-        return $this->belongsTo('Workerlevel', 'level_id', 'id', [], 'LEFT')->setEagerlyType(0);
-    }
 
 
 
 
 }
 }