删除多余文件,更换类目录

This commit is contained in:
liaofei 2019-11-22 18:54:01 +08:00
parent 59966e170a
commit a292f130f4
6 changed files with 4 additions and 88 deletions

View File

@ -1,25 +0,0 @@
<?php
/**
* Created by CRMEB.
* User: 136327134@qq.com
* Date: 2019/4/12 11:19
*/
namespace crmeb\services;
/**
* 错误码统一存放类
* Class ApiErrorCode
* @package crmeb\services
*/
class ApiErrorCode
{
const SUCCESS = [200, 'SUCCESS'];
const ERROR = [400, '操作失败'];
const ERR_LOGIN = [40010, '登陆过期'];
}

View File

@ -1,59 +0,0 @@
<?php
/**
*
* @author: xaboy<365615158@qq.com>
* @day: 2018/01/23
*/
namespace crmeb\services;
class ExportService
{
public static function exportCsv($list, $filename, $header = [], $br = '_')
{
$tableStr = count($header) > 0 ? '"' . implode('","', $header) . '"' . PHP_EOL : '';
$tableStr .= self::tidyCsvStr($list, str_repeat($br, 99));
ob_end_clean();
ob_start();
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=" . $filename . ".csv");
header('Content-Type:application/download');
exit(iconv('UTF-8', "GB2312//IGNORE", $tableStr));
}
private static function tidyCsvStr($list, $br = '')
{
$tableStr = '';
foreach ($list as $row) {
if (is_array($row)) {
$max = 1;
foreach ($row as $k => $item) {
if (is_array($item)) {
if ($max < ($l = count($item))) $max = $l;
} else
$row[$k] = [$item];
}
for ($i = 0; $i <= $max; $i++) {
$exportRow = [];
if ($max == $i) {
if ($br == '')
continue;
else
$exportRow = array_fill(0, count($row), $br);
} else {
foreach ($row as $item) {
$exportRow[] = isset($item[$i]) && !empty($item[$i]) ? $item[$i] : ' ';
}
}
$tableStr .= '"' . implode('","', $exportRow) . '"," "' . PHP_EOL;
}
$tableStr = rtrim($tableStr, PHP_EOL);
} else {
$tableStr .= implode('', ['"', $row, '"', ',']);
}
$tableStr .= PHP_EOL;
}
return $tableStr;
}
}

View File

@ -19,7 +19,7 @@ class ExpressService
public static function query($no, $type = '')
{
$appCode = SystemConfigService::config('system_express_app_code');
$appCode = sysConfig('system_express_app_code');
if (!$appCode) return false;
$res = HttpService::getRequest(self::$api['query'], compact('no', 'type'), ['Authorization:APPCODE ' . $appCode]);
$result = json_decode($res, true) ?: false;

View File

@ -1,6 +1,6 @@
<?php
namespace crmeb\services;
namespace crmeb\utils;
use crmeb\traits\LogicTrait;
use EasyWeChat\Core\Exceptions\RuntimeException;

View File

@ -1,6 +1,6 @@
<?php
namespace crmeb\services;
namespace crmeb\utils;
use EasyWeChat\MiniProgram\AccessToken;
use Pimple\Container;

View File

@ -1,6 +1,6 @@
<?php
namespace crmeb\services;
namespace crmeb\utils;
use EasyWeChat\Core\AbstractAPI;
use EasyWeChat\Core\AccessToken;