|
|
@ -51,18 +51,7 @@ class SourceEvent extends Controller
|
|
|
|
$data['bao_name'] = $packageName;
|
|
|
|
$data['bao_name'] = $packageName;
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $data['game_id']])->find();
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $data['game_id']])->find();
|
|
|
|
$gameSourceService = new GameSourceService();
|
|
|
|
$gameSourceService = new GameSourceService();
|
|
|
|
|
|
|
|
$result = $gameSourceService->sourcePack($data, $game);
|
|
|
|
$gameSourceData = array_merge(
|
|
|
|
|
|
|
|
$data,
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'plist_url' => '',
|
|
|
|
|
|
|
|
'org_plist_url' => '',
|
|
|
|
|
|
|
|
'file_url' => '',
|
|
|
|
|
|
|
|
'original_url' => '',
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$result = $gameSourceService->sourcePack($gameSourceData, $game);
|
|
|
|
|
|
|
|
if (!$result['status']) {
|
|
|
|
if (!$result['status']) {
|
|
|
|
$this->error('添加失败' , U('GameSource/lists', ['type' => $data['type']]));
|
|
|
|
$this->error('添加失败' , U('GameSource/lists', ['type' => $data['type']]));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -127,17 +116,7 @@ class SourceEvent extends Controller
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $data['game_id']])->find();
|
|
|
|
$game = M('game', 'tab_')->where(['id' => $data['game_id']])->find();
|
|
|
|
|
|
|
|
|
|
|
|
$gameSourceService = new GameSourceService();
|
|
|
|
$gameSourceService = new GameSourceService();
|
|
|
|
|
|
|
|
$result = $gameSourceService->sourcePack($data, $game, $game_source);
|
|
|
|
$gameSourceData = array_merge(
|
|
|
|
|
|
|
|
$data,
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
'plist_url' => $game_source['plist_url'],
|
|
|
|
|
|
|
|
'org_plist_url' => $game_source['org_plist_url'],
|
|
|
|
|
|
|
|
'file_url' => $game_source['file_url'],
|
|
|
|
|
|
|
|
'original_url' => $game_source['original_url'],
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
$result = $gameSourceService->sourcePack($gameSourceData, $game);
|
|
|
|
|
|
|
|
if (!$result['status']) {
|
|
|
|
if (!$result['status']) {
|
|
|
|
if ($from == "dev") {
|
|
|
|
if ($from == "dev") {
|
|
|
|
$this->error('修改失败', U('Developers/source'));
|
|
|
|
$this->error('修改失败', U('Developers/source'));
|
|
|
|