|
|
|
@ -17,6 +17,7 @@ use BaiduBce\Services\Bos\CannedAcl;
|
|
|
|
|
use BaiduBce\Services\Bos\BosOptions;
|
|
|
|
|
use BaiduBce\Auth\SignOptions;
|
|
|
|
|
use BaiduBce\Log\LogFactory;
|
|
|
|
|
use Base\Service\GameService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 后台首页控制器
|
|
|
|
@ -170,6 +171,15 @@ class GameController extends ThinkController
|
|
|
|
|
$this->error('游戏标示不能为空!');
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
$downloadWays = $_POST['download_ways'] ?? [];
|
|
|
|
|
if (in_array(GameService::DOWNLOAD_BETA, $downloadWays)) {
|
|
|
|
|
if (empty($_POST['beta_url'])) {
|
|
|
|
|
return $this->error("请在Beta按钮开启的情况填写Beta链接");
|
|
|
|
|
}
|
|
|
|
|
if (!preg_match("/^((https|http|itms-beta)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
|
|
|
|
|
return $this->error("请填写正确的Beta链接");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$_POST['relation_game_name'] = $_POST['game_name'];
|
|
|
|
|
if ($_POST['sdk_version'] == 1) {
|
|
|
|
|
unset($_POST['ios_game_address']);
|
|
|
|
@ -203,6 +213,10 @@ class GameController extends ThinkController
|
|
|
|
|
//$_POST['material_url'] = $_POST['file_url'].$_POST['file_name'];
|
|
|
|
|
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
|
|
|
|
|
$_POST['short'] = $short;
|
|
|
|
|
|
|
|
|
|
$gameService = new GameService();
|
|
|
|
|
$_POST['download_ways'] = $gameService->getDownLoadWaysValue($downloadWays);
|
|
|
|
|
|
|
|
|
|
$game = D(self::model_name);//M('$this->$model_name','tab_');
|
|
|
|
|
$res = $game->update();
|
|
|
|
|
if (!$res) {
|
|
|
|
@ -299,15 +313,18 @@ class GameController extends ThinkController
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_POST['beta_status'] == 1 && empty($_POST['beta_url'])) {
|
|
|
|
|
return $this->error("请在Beta按钮开启的情况填写Beta链接");
|
|
|
|
|
}
|
|
|
|
|
if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|itms-beta)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
|
|
|
|
|
return $this->error("请填写正确的Beta链接");
|
|
|
|
|
$downloadWays = $_POST['download_ways'] ?? [];
|
|
|
|
|
if (in_array(GameService::DOWNLOAD_BETA, $downloadWays)) {
|
|
|
|
|
if (empty($_POST['beta_url'])) {
|
|
|
|
|
return $this->error("请在Beta按钮开启的情况填写Beta链接");
|
|
|
|
|
}
|
|
|
|
|
if (!preg_match("/^((https|http|itms-beta)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
|
|
|
|
|
return $this->error("请填写正确的Beta链接");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/*if($_POST['apply_status']==0&&$_POST['game_status']==1){
|
|
|
|
|
$this->error('游戏未审核不允许显示');//游戏添加完成
|
|
|
|
|
}*/
|
|
|
|
|
}*/
|
|
|
|
|
$_POST['introduction'] = str_replace(array("\r\n", "\r", "\n"), "~~", $_POST['introduction']);
|
|
|
|
|
|
|
|
|
|
if (!empty($_POST['display_site'])) {
|
|
|
|
@ -321,7 +338,10 @@ class GameController extends ThinkController
|
|
|
|
|
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
|
|
|
|
|
$_POST['detail_content'] = $content;
|
|
|
|
|
$_POST['pay_config'] = json_encode($_POST['pay_config']);
|
|
|
|
|
$gameService = new GameService();
|
|
|
|
|
$_POST['download_ways'] = $gameService->getDownLoadWaysValue($downloadWays);
|
|
|
|
|
$res = $game->update();
|
|
|
|
|
|
|
|
|
|
$id = $res["id"];
|
|
|
|
|
$sibling = D("Game")->find($id);
|
|
|
|
|
$map['relation_game_id'] = $sibling['relation_game_id'];
|
|
|
|
@ -356,9 +376,6 @@ class GameController extends ThinkController
|
|
|
|
|
$phone['back_map'] = $sibling['back_map'];
|
|
|
|
|
$phone['flooring_page_video'] = $sibling['flooring_page_video'];
|
|
|
|
|
$phone['flooring_page_video_cover'] = $sibling['flooring_page_video_cover'];
|
|
|
|
|
$phone['supersign_status'] = $sibling['supersign_status'];
|
|
|
|
|
$phone['beta_url'] = $_POST['beta_url'];
|
|
|
|
|
$phone['beta_status'] = $_POST['beta_status'];
|
|
|
|
|
M('Game', 'tab_')->data($phone)->where(array('id' => $another['id']))->save();
|
|
|
|
|
//同时修改代充游戏折扣
|
|
|
|
|
$set_fidel['status'] = 1;
|
|
|
|
|