在新增和修改模板中或多或少的需要使用PHP代码,但是在整个模板中写处理方法不太现实!所以我们就需要修改公共方法!
公共方法路径:\core\framework\function\core.php 没有效果或找不到方法 修改如下:
\core\framework\function\corenew.php
/**
* 加星字符串
* @param type $data
* @param type $type
*/
function showStar($data, $type = 'mobile') {
if ($type == 'mobile') {
$data = substr($data, 0, 4) . '****' . substr($data, strlen($data) - 4, strlen($data));
}
if ($type == 'card') {
$data = substr($data, 0, 4) . '****' . substr($data, strlen($data) - 4, strlen($data));
}
return $data;
}
关键字词:

