<?php namespace app\api\model; use think\Model; class OrderAddress extends Model { // 自动写入时间戳字段 protected $autoWriteTimestamp = 'int'; protected $name = 'litestore_order_address'; protected $createTime = 'createtime'; protected $updateTime = '';
protected $append = [ 'mobile_hide' ]; public function getMobileHideAttr($value,$data) { $value = !empty($data['phone'])?str_replace(substr($data['phone'],3,4),'****',$data['phone']):''; return $value; }
}