master
elf 2 years ago
parent 0917ad7f34
commit 2e9176a9d5

@ -12,6 +12,7 @@ use Think\Controller;
use Base\Service\GameSourceService; use Base\Service\GameSourceService;
use Base\Tool\PlistParser; use Base\Tool\PlistParser;
use Base\Tool\ApkParser; use Base\Tool\ApkParser;
use Org\SumaPay\PlatformLog;
/** /**
* 后台首页控制器 * 后台首页控制器
@ -53,6 +54,7 @@ class SourceEvent extends Controller
$gameSourceService = new GameSourceService(); $gameSourceService = new GameSourceService();
$result = $gameSourceService->sourcePack($data, $game); $result = $gameSourceService->sourcePack($data, $game);
if (!$result['status']) { if (!$result['status']) {
PlatformLog::write('添加失败, 打包失败,' . $result['message'], 'source_pack');
$this->error('添加失败, 打包失败,' . $result['message'] , U('GameSource/lists', ['type' => $data['type']])); $this->error('添加失败, 打包失败,' . $result['message'] , U('GameSource/lists', ['type' => $data['type']]));
} }
$data['plist_url'] = $result['data']['plistUrl']; $data['plist_url'] = $result['data']['plistUrl'];

@ -0,0 +1,12 @@
<?php
namespace Org\SumaPay;
use Think\Log;
class PlatformLog
{
public static function write($message, $path, $level = Log::INFO) {
$destination = C('LOG_PATH'). $path . '/' . date('y_m_d').'.log';
Log::write($message, $level, '', $destination);
}
}
Loading…
Cancel
Save