1
0

提交代码

This commit is contained in:
2020-08-06 14:45:56 +08:00
commit 9d0d5f4be9
361 changed files with 36445 additions and 0 deletions

43
app/Helpers/helpers.php Normal file
View File

@@ -0,0 +1,43 @@
<?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;
// }
// }