44 lines
978 B
PHP
44 lines
978 B
PHP
<?php
|
|
use Encore\Admin\Config\ConfigModel;
|
|
|
|
if(!function_exists('deliver_list')){
|
|
function deliver_list()
|
|
{
|
|
$deliver_list = ConfigModel::where('name','deliver_list')->value('value');
|
|
$array = preg_split('/[\r\n]+/', trim($deliver_list, "\r\n"));
|
|
if(strpos($deliver_list, ':')){
|
|
$options = [];
|
|
foreach ($array as $val) {
|
|
[$k, $v] = explode(':', $val, 2);
|
|
$options[$k] = $v;
|
|
}
|
|
} else {
|
|
$options = $array;
|
|
}
|
|
|
|
return $options;
|
|
}
|
|
}
|
|
|
|
if(!function_exists('get_deliver_name')){
|
|
function get_deliver_name($value)
|
|
{
|
|
$deliver_list = deliver_list();
|
|
|
|
return $deliver_list[$value]??'未知';
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// if(!function_exists('getMobileType')){
|
|
// function getMobileType($mobile)
|
|
// {
|
|
// if(preg_match('#([\d])\1{2}$#', $mobile)){
|
|
// return 'AAA';
|
|
// }
|
|
// return 1;
|
|
// }
|
|
// }
|
|
|