force_update 更新接口

master
tpingzhang 5 years ago
parent 643c8b996a
commit 4f2d66a940

@ -2486,13 +2486,14 @@ class UserController extends BaseController
$data['and_file_size'] = !empty($game_source['file_size']) ? $game_source['file_size'] : 0;
$data['and_version_code'] = !empty($game_source['version']) ? $game_source['version'] : 0;
$data['and_version_name'] = !empty($game_source['version']) ? $game_source['version'] : '';
$host = 'http://' . $_SERVER['HTTP_HOST'];
$host = C('DL_DOMAIN');
} else {
$data['ios_remark'] = !empty($remark) ? $remark : [];
$data['ios_file_size'] = !empty($game_source['file_size']) ? $game_source['file_size'] : 0;
$data['ios_version_code'] = !empty($game_source['version']) ? $game_source['version'] : 0;
$data['ios_version_name'] = !empty($game_source['version']) ? $game_source['version'] : '';
$host = 'https://' . $_SERVER['HTTP_HOST'];
$host = C('DL_DOMAIN');
}
if ($request['promote_id'] > 0) {
//渠道包
@ -2519,7 +2520,7 @@ class UserController extends BaseController
} else {
$data['game_url'] = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php?s=/Home/Home/promitionofregestion/pid/' . $request['promote_id'] . '/gid/' . $game_info['relation_game_id'];
$data['game_url'] = C('DL_DOMAIN') . '/index.php?s=/Home/Home/promitionofregestion/pid/' . $request['promote_id'] . '/gid/' . $game_info['relation_game_id'];
$file_url = strpos($apply_info['pack_url'],'http') ===false ?$host . ltrim($apply_info['pack_url'], '.') : $apply_info['pack_url'];
$pfile_url = strpos($apply_info['plist_url'],'http') ===false ?$host . ltrim($apply_info['plist_url'], '.') : $apply_info['plist_url'];
}
@ -2531,7 +2532,7 @@ class UserController extends BaseController
}
} else {
//原包
$data['game_url'] = 'http://' . $_SERVER['HTTP_HOST'] . '/mobile.php?s=/Game/detail/id/' . $request['game_id'];
$data['game_url'] = C('DL_DOMAIN') . '/mobile.php?s=/Game/detail/id/' . $request['game_id'];
$file_url = strpos($game_source['file_url'],'http') ===false ? $host . ltrim($game_source['file_url'], '.') : $game_source['file_url'];
$pfile_url = strpos($game_source['plist_url'],'http')===false ? $host . ltrim($game_source['plist_url'], '.') : $game_source['plist_url'];
@ -2539,7 +2540,7 @@ class UserController extends BaseController
if ($game_info['sdk_version'] == 1) {
$data['and_file_url'] = $file_url;
} else {
$data['ios_file_url'] = $pfile_url;
$data['ios_file_url'] = "itms-services://?action=download-manifest&url=" . $pfile_url;
}
echo base64_encode(json_encode(array('code' => 200, 'msg' => '请求成功', 'data' => $data)));
}

Loading…
Cancel
Save