审查视图

application/api/model/OrderAddress.php 539 字节
李忠强 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?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 = '';
李忠强 authored
16 17 18 19 20 21 22 23 24
    protected $append = [
        'mobile_hide'
    ];

    public function getMobileHideAttr($value,$data)
    {
        $value = !empty($data['phone'])?str_replace(substr($data['phone'],3,4),'****',$data['phone']):'';
        return $value;
    }
李忠强 authored
25
}