diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php
index c7fbef940..b4fe3dbb1 100644
--- a/Application/Admin/Controller/GameController.class.php
+++ b/Application/Admin/Controller/GameController.class.php
@@ -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;
diff --git a/Application/Admin/View/Game/add.html b/Application/Admin/View/Game/add.html
index 1fc3cd195..c1ac8fa69 100644
--- a/Application/Admin/View/Game/add.html
+++ b/Application/Admin/View/Game/add.html
@@ -408,16 +408,39 @@
- 超级签Token: |
-
-
- |
+ 超级签Token: |
+
+
+ |
- 超级签URL: |
-
-
- |
+ 超级签URL: |
+
+
+ |
+
+
+ Beta版本链接: |
+
+
+ |
+
+
+
+ 下载方式 |
+
+
+
+
+
+
+ |
@@ -1284,9 +1307,11 @@
$("input[name='appstatus'][value=1]").prop("disabled",true);
$("input[name='appstatus'][value=0]").prop("disabled",true);
$("input[name='appstatus'][value=0]").prop("checked",true);
+ $('.ios-display').hide();
}else{
$("input[name='appstatus'][value=1]").removeAttr("disabled");
$("input[name='appstatus'][value=0]").removeAttr("disabled");
+ $('.ios-display').show();
}
})
diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html
index cd02fe912..1f5e22e75 100644
--- a/Application/Admin/View/Game/edit.html
+++ b/Application/Admin/View/Game/edit.html
@@ -446,28 +446,6 @@
-
- Beta版本链接: |
-
-
- |
-
-
-
- Beta版本是否开启 |
-
-
-
-
-
-
- |
-
-
知识产权 |
@@ -569,6 +547,7 @@
|
+
超级签Token: |
@@ -581,32 +560,29 @@
|
-
- 超级签状态: |
-
-
-
-
-
- |
-
-
-
-
-
- |
-
+ Beta版本链接: |
+
+
+ |
-
+
+ 下载方式 |
+
+
+
+
+
+
+ |
+
+
diff --git a/Application/Base/Service/GameService.class.php b/Application/Base/Service/GameService.class.php
new file mode 100644
index 000000000..6733df0e3
--- /dev/null
+++ b/Application/Base/Service/GameService.class.php
@@ -0,0 +1,19 @@
+ intval($gameId)];
$game = M('game', 'tab_')->field($columns)->where($map)->find();
diff --git a/Application/Home/Controller/PackageController.class.php b/Application/Home/Controller/PackageController.class.php
index 09f329745..f881c67a7 100644
--- a/Application/Home/Controller/PackageController.class.php
+++ b/Application/Home/Controller/PackageController.class.php
@@ -77,7 +77,7 @@ class PackageController extends Controller
} else if (Request::isIOS()) {
$plistUrl = substr($packageUrl, 1, strlen($packageUrl));
header("HTTP/1.1 303 See Other");
- header("Location: "."itms-services://?action=download-manifest&url=" . Request::getHost() . "/" . $plistUrl);
+ header("Location: "."itms-services://?action=download-manifest&url=" . C('DOMAIN_DOWNLOAD') . '/' . ltrim($plistUrl, '/'));
} else {
$this->gotoPkgUrl($packageUrl);
}
diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html
index bb7b43c97..1604aab3a 100644
--- a/Application/Home/View/default/Home/landingPage.html
+++ b/Application/Home/View/default/Home/landingPage.html
@@ -33,7 +33,6 @@
-
@@ -104,11 +103,7 @@
{$game['relation_game_name']}
{$game['features']}
-
-
免费安装
-
-
免费安装
-
+
免费安装
@@ -259,31 +254,41 @@
-
购买至尊下载,赠送限量至尊超级礼包(价值100元)
-
• 至尊下载:永不闪退、不丢数据稳定有保障
-
• 同一设备安装一次可在一年内无限次下载重装
+
+
+
+
+
beta版下载:免费下载,解决您频繁掉签的烦恼!
+
+
+
至尊下载:10元购买,永不闪退、不丢数据稳定与保障。同意设备安装一次可在一年内无限次下载重装,并赠送限量至尊超级礼包!
+
+
+
普通下载:免费下载,畅游手游世界!
+
+
-
-
-
-
¥10至尊下载
-
-
¥10至尊下载
-
-
-
-
beta版下载
-
-
beta版下载
-
-
-
普通下载
-
-
-
¥10至尊下载
-
beta版下载
-
普通下载
-
+
+
beta版下载
+
+
+
+
¥10至尊下载
+
+
+
+
普通下载
+
+
+
+
¥10至尊下载
+
beta版下载
+
普通下载
+
+
+
+
+
@@ -1076,11 +1081,16 @@ var PhoneObj = {
};
swiperGet();
$(".download").click(function(){
+
var isTipSafari = is_tip_safari();
if (isTipSafari) {
$('.safari').show();
return;
}
+ var downloadable = $(this).attr('data-downloadable');
+ if (downloadable == 0) {
+ return layer.msg('暂无下载');
+ }
$(".window").show();
document.body.style.overflow = 'hidden';
});
diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php
index 7ff8cae37..e674fcb59 100644
--- a/Application/Mobile/Controller/SsgController.class.php
+++ b/Application/Mobile/Controller/SsgController.class.php
@@ -5,6 +5,7 @@ use Org\WeixinSDK\Weixin;
use User\Api\MemberApi;
use Base\Tool\TaskClient;
use Think\Log;
+use Base\Service\GameService;
class SsgController extends BaseController {
const USER_NOT_ILLEGAL = -1; //用户名不合法
@@ -325,12 +326,16 @@ class SsgController extends BaseController {
}
$map["sdk_version"] = 2;
$map["game_status"] = 1;
- $map["supersign_status"] = 1;
$game_list = M("game", "tab_")->field("*, id as game_id")->where($map)->select();
- for ($i=0; $i < count($game_list); $i++) {
- $game_list[$i]["game_icon"] = get_cover($game_list[$i]["icon"], 'path');
+ $games = [];
+ foreach ($game_list as $game) {
+ if (($game['download_ways'] & GameService::DOWNLOAD_SUPER) != GameService::DOWNLOAD_SUPER) {
+ continue;
+ }
+ $game["game_icon"] = get_cover($game["icon"], 'path');
+ $games[] = $game;
}
- $res = array("list"=>$game_list);
+ $res = array("list"=>$games);
if($type == 1){
$map['user_id']= $user['user_id'];
$map['pay_status'] = 1;
diff --git a/Data/update.sql b/Data/update.sql
index 09504f5c4..8fde37968 100644
--- a/Data/update.sql
+++ b/Data/update.sql
@@ -1089,4 +1089,8 @@ ADD COLUMN `relation_game_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联游戏id
ALTER TABLE `tab_spend`
MODIFY COLUMN `selle_status` int(11) NOT NULL DEFAULT 0 COMMENT '渠道结算 0未结算1 结算',
-MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
\ No newline at end of file
+MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
+
+
+ALTER TABLE `tab_game`
+ADD COLUMN `download_ways` tinyint(3) NOT NULL DEFAULT 0 COMMENT '下载方式' AFTER `beta_url`;
\ No newline at end of file
diff --git a/Public/Home/css/index2.css b/Public/Home/css/index2.css
index 2d467bbcf..b6b7d07b3 100644
--- a/Public/Home/css/index2.css
+++ b/Public/Home/css/index2.css
@@ -405,24 +405,37 @@
}
.containner{
width: 5.50rem;
- height: 7.82rem;
- background: url(../images/landing_bg.png) no-repeat;
- background-size: 100% 100%;
- display: flex;
- justify-content: flex-end;
+ /* height: 9.20rem; */
+ /* background: url(../images/landing_bg.png) no-repeat; */
+ /* background-size: 100% 100%; */
+ /* background-color: #fff; */
+ /* display: flex;
+ justify-content: flex-end; */
}
.containner-box{
- padding: 0 0.39rem 0.15rem 0.36rem;
+ /* padding: 0 0.39rem 0.15rem 0.36rem; */
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
}
+.containner-box .text-wrapper {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-end;
+ justify-content: center;
+ background-color: #fff;
+ width: 100%;
+ border-bottom-left-radius: 0.2rem;
+ border-bottom-right-radius: 0.2rem;
+}
+
.containner-box .text{
font-size:0.24rem;
font-weight:400;
color:rgba(41,41,41,1);
line-height:0.36rem;
+ width: 100%;
}
.blue-btn{
width: 4.40rem;
diff --git a/Public/Home/images/landing_bg2.png b/Public/Home/images/landing_bg2.png
new file mode 100644
index 000000000..7c868c0a1
Binary files /dev/null and b/Public/Home/images/landing_bg2.png differ