ContactsOther.php 657 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace addons\qingdongams\model;
  3. use think\Model;
  4. /**
  5. *联系人其他信息表
  6. */
  7. class ContactsOther Extends Model {
  8. // 表名,不含前缀
  9. protected $name = 'qingdongams_contacts_other';
  10. // 开启自动写入时间戳字段
  11. protected $autoWriteTimestamp = false;
  12. public static function getOther($params){
  13. $other = self::where(['id' => $params['id']])->value('otherdata');
  14. if($other){
  15. $other=json_decode($other,true);
  16. }else{
  17. $other=[];
  18. }
  19. $params = array_merge($params, $other);
  20. $params = Form::getDataDetail(Form::CONTACTS_TYPE, $params);
  21. return $params;
  22. }
  23. }