master
chenxiaojun 5 years ago
commit efccb30daf

@ -301,7 +301,7 @@ class AutoPackController extends Think
$applys = M('apply', 'tab_')->field('id,game_id,game_name,promote_id,promote_account,sdk_version')
->where($map)
->order('bale_sort desc,id desc')
->limit(12)
->limit(15)
->select();
if (count($applys) == 0) {

@ -1238,6 +1238,24 @@ class MemberController extends ThinkController
}
$list = M('device_bans', 'tab_')->where($map)->page($p, $row)->select();
$count = M('device_bans', 'tab_')->where($map)->count();
if (!empty($list)) {
foreach ($list as &$item) {
switch ($item['type']) {
case '1':
$item['type_name'] = '设备号';
break;
case '2':
$item['type_name'] = 'IP';
break;
case '3':
$item['type_name'] = '落地页链接';
break;
case '4':
$item['type_name'] = '下载链接';
break;
}
}
}
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);
@ -1256,9 +1274,15 @@ class MemberController extends ThinkController
if (empty($type) || empty($tag)) {
return $this->error("请填写完整信息");
}
if (\in_array($type, [3,4]) && !preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $tag)) {
return $this->error("请填写正确的url地址");
}
if ($type == 2 && !preg_match("/(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/i", $tag)) {
return $this->error("请填写正确的ip信息如127.0.0.1");
}
if ($type == 1 && (preg_match("/(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/i", $tag) || preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $tag))) {
return $this->error("请填写正确的设备信息");
}
$map['type'] = $type;
$map['tag'] = $tag;
$item = M('device_bans', 'tab_')->where($map)->find();

@ -11,10 +11,13 @@
<select id="type" name="type" class="select_gallery">
<option value="1">设备号</option>
<option value="2">IP</option>
<option value="3">落地页链接</option>
<option value="4">下载链接</option>
</select>
</li>
<li>
<label>详情</label><input type="text" name="tag" class="" placeholder="风控标识" value="{:I('tag')}">
<label>详情</label>
<textarea name="tag" class="" placeholder="风控标识" >{:I('tag')}</textarea>
</li>
<li>
<label>&nbsp;</label><input type="submit" id="submit" value="确认保存" target-form="form-horizontal" class="form_btn ajax-post">

@ -48,6 +48,8 @@
<option value="">类型</option>
<option value="1" <?php echo I('type') == 1 ? "selected" : "" ?> >设备号</option>
<option value="2" <?php echo I('type') == 2 ? "selected" : "" ?> >IP</option>
<option value="3" <?php echo I('type') == 3 ? "selected" : "" ?>>落地页链接</option>
<option value="4" <?php echo I('type') == 4 ? "selected" : "" ?>>下载链接</option>
</select>
</div>
<div class="input-list">
@ -95,7 +97,7 @@
<tr>
<!-- <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td> -->
<td>{$data.id}</td>
<td><?php echo $data['type'] == 1 ? "设备号" : "IP";?></td>
<td>{$data.type_name}</td>
<td>{$data.tag}</td>
<td>{:get_admin_nickname($data['operator_id'])}</td>
<td>{$data.create_time|date='Y-m-d H:i:s',###}</td>

@ -194,6 +194,7 @@ class GameSourceService {
];
}
$params['packageUrl'] = C('DOMAIN_DOWNLOAD') . ltrim($originalUrl, '.');
$params['type'] = 'org';
$result = $this->createPlist($params);
if ($result['status']) {

@ -33,7 +33,7 @@ class Request {
{
$isMobile = false;
$userAgent = $this->getUserAgent();
$mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad','iPod'];
$mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'];
foreach ($mobileAgents as $mobileAgent) {
if (stripos($userAgent, $mobileAgent) !== false) {
$isMobile = true;
@ -45,7 +45,7 @@ class Request {
public function isIOS()
{
$userAgent = $this->getUserAgent();
if(stripos($userAgent, 'iphone') !== false || strpos($userAgent, 'ipad') !== false) {
if(stripos($userAgent, 'iphone') !== false || stripos($userAgent, 'ipad') !== false || stripos($userAgent, 'ipod') !== false) {
return true;
}
return false;

@ -1756,8 +1756,12 @@ class ApplyController extends BaseController
public function getDownloadUrl()
{
$gameId = I('game_id', 0);
$promoteId = I('promote_id', 0);
$promote = $this->getLoginPromote();
$apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find();
if ($promoteId == 0) {
$promoteId = $promote['id'];
}
$apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find();
$game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find();
if ($apply == null) {
$this->ajaxReturn([
@ -1793,8 +1797,12 @@ class ApplyController extends BaseController
public function getLandingPageUrl()
{
$gameId = I('game_id', 0);
$promoteId = I('promote_id', 0);
$promote = $this->getLoginPromote();
$apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find();
if ($promoteId == 0) {
$promoteId = $promote['id'];
}
$apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find();
$game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find();
if ($apply == null) {
$this->ajaxReturn([

@ -141,7 +141,8 @@ class HomeController extends Controller
if ($code == '' && ($gameId == 0 || $promoteId == 0)) {
$this->error('访问错误');
}
$blackList = [];
$blackList = M('device_bans', 'tab_')->where(['type' => 3])->getField('tag', true);
if (in_array($code, $blackList) || in_array('gid/' . $gameId . '/pid/' . $promoteId, $blackList)) {
$this->error('该链接已被禁');
}
@ -206,9 +207,9 @@ class HomeController extends Controller
$game['flooring_page_imgs'] = $imageUrls;
$isNewIos = false;
if ($gameSource['create_time'] > strtotime(date('2019-11-27 00:00:00'))) {
/* if ($gameSource['create_time'] > strtotime(date('2019-11-27 00:00:00'))) {
$isNewIos = true;
}
} */
$downloadUrl = '';
if (!$isNewIos && $isIOS13) {

@ -30,12 +30,12 @@ class PackageController extends Controller
$code = I('code', '');
$gameId = I('game_id', 0);
$promoteId = I('promote_id', 0);
// var_dump($gameId, $promoteId);die();
if ($code == '' && ($gameId == 0 || $promoteId == 0)) {
$this->redirect("package/downloadError", ['message' => '访问错误']);
}
$blackList = [];
$blackList = M('device_bans', 'tab_')->where(['type' => 4])->getField('tag', true);
if (in_array($code, $blackList) || in_array('game_id/' . $gameId . '/promote_id/' . $promoteId, $blackList)) {
$this->redirect("package/downloadError", ['message' => '该链接已被禁']);
}

@ -845,6 +845,7 @@
var linkTag = this
var gameId = parseInt($(this).attr('data-game-id'))
var type = $(this).attr('data-type')
var promoteId = "{:I('promote_id', 0)}";
var url = ''
if (type == 'download') {
url = "__URL__/getDownloadUrl"
@ -855,7 +856,7 @@
url: url,
type: 'post',
dataType: "json",
data: {game_id: gameId},
data: {game_id: gameId, promote_id: promoteId},
success: function (response) {
if (response.status == 1) {
var qrcodeWidth = 200

@ -29,7 +29,7 @@
<div class="forget"><a href="{:U('User/forget')}">忘记密码?</a></div>
<button class="enter submit">登录</button>
<if condition="I('get.pid') gt 0">
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="{:U('User/register',array('pid'=>I('get.pid',0),'gid'=>I('get.gid',0)))}"> 手机注册 </a></div>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="{:U('User/register',array('pid'=>I('get.pid',0),'gid'=>I('get.gid',0)))}"> 手机注册 </a></div>
<else/>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="{:U('User/step1')}"> 账号注册 </a>|<a href="{:U('User/register')}"> 手机注册 </a></div>
</if>
@ -95,14 +95,14 @@
$(this).siblings("input").attr('type','password');
}
});
var pmsg = $('.popmsg').pop();
var pmsg = $('.popmsg').pop();
$('.submit').click(function(event) {
var mobile = $.trim($('#mobile').val());
var password = $.trim($('#password').val());
var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0;
var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0;
var promoteId = parseInt("{:I('request.pid')}") ? parseInt("{:I('request.pid')}") : 0;
var gameId = parseInt("{:I('request.gid')}") ? parseInt("{:I('request.gid')}") : 0;
if (mobile) {
if (password) {
$.ajax({

@ -59,12 +59,13 @@
var tis = this,that = $(tis);
if (that.hasClass('disabled')) {return false;}
var mobile = $.trim($('#mobile').val());
var data = {'phone':mobile};
if (mobile) {
if (/^1[0-9]{10}$/.test(mobile)) {
$.ajax({
type:'POST',
url:'{:U("sendsafecode")}',
data:{'phone':mobile},
data:data,
async: false,
dataType:"Json",
success:function(data){

@ -608,4 +608,8 @@ promote_account_to:修改后账号
remark:
create_time:
op_account:
order_time:' WHERE `id` = 29;
order_time:' WHERE `id` = 29;
--
ALTER TABLE `tab_device_bans`
MODIFY COLUMN `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型 0未知 1设备号 2IP 3落地页链接 4下载链接' AFTER `tag`;

Loading…
Cancel
Save