|
|
@ -229,6 +229,10 @@ class GameSourceService {
|
|
|
|
$gameSourceUrl = $this->getGameSourceUrl($gameSource);
|
|
|
|
$gameSourceUrl = $this->getGameSourceUrl($gameSource);
|
|
|
|
if ($gameSource == null || !file_exists($gameSourceUrl)) {
|
|
|
|
if ($gameSource == null || !file_exists($gameSourceUrl)) {
|
|
|
|
M('apply', 'tab_')->where(['id' => $apply['id']])->setField('enable_status', -1);
|
|
|
|
M('apply', 'tab_')->where(['id' => $apply['id']])->setField('enable_status', -1);
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'status' => false,
|
|
|
|
|
|
|
|
'message' => '打包失败,原包或原包路径不存在!',
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 检测是否存在投放申请,存在则更改投放申请信息,否则进行渠道打包 */
|
|
|
|
/* 检测是否存在投放申请,存在则更改投放申请信息,否则进行渠道打包 */
|
|
|
@ -351,6 +355,7 @@ class GameSourceService {
|
|
|
|
'base_uri' => C('PACKAGE_CHUNK_URL'),
|
|
|
|
'base_uri' => C('PACKAGE_CHUNK_URL'),
|
|
|
|
'timeout' => 30.0,
|
|
|
|
'timeout' => 30.0,
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
try {
|
|
|
|
$response = $client->post('/upload', [
|
|
|
|
$response = $client->post('/upload', [
|
|
|
|
'verify' => false,
|
|
|
|
'verify' => false,
|
|
|
|
'form_params' => [
|
|
|
|
'form_params' => [
|
|
|
@ -364,7 +369,13 @@ class GameSourceService {
|
|
|
|
if (!$result) {
|
|
|
|
if (!$result) {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
'status' => false,
|
|
|
|
'status' => false,
|
|
|
|
'message' => '请求打包失败',
|
|
|
|
'message' => '请求异常',
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'status' => false,
|
|
|
|
|
|
|
|
'message' => '请求异常: ' . $e->getMessage(),
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $result;
|
|
|
|
return $result;
|
|
|
|