Merge branch 'hotfix/oldpack' into dev

master
ELF 5 years ago
commit f3f497a21d

@ -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) {

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

@ -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([

@ -206,9 +206,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) {

@ -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

@ -218,6 +218,7 @@ class UserController extends BaseController
public function bindingPromote($promoteId, $account)
{
Log::write('cxj_login:' . date('Y-m-d H:i:s') . ' ---- ' . $promoteId.'INFO');
if ($promoteId > 0) {
$wherePromote['id'] = $promoteId;
$promoteData = M('Promote', 'tab_')->field('id,account')->where($wherePromote)->find();
@ -228,6 +229,7 @@ class UserController extends BaseController
$whereUser['mobile_phone'] = $account;
$userData = M('User', 'tab_')->where($whereUser)->find();
Log::write('cxj_login:' . date('Y-m-d H:i:s') . ' ---- userData' . json_encode($userData) .'INFO');
if (!empty($userData)) {
if (empty($userData['promote_id'])) {
$saveData['promote_id'] = $promoteId;

@ -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="<?='mobile.php?s=/User/step/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 手机注册 </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>
@ -77,8 +77,8 @@
$('.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,20 @@
var tis = this,that = $(tis);
if (that.hasClass('disabled')) {return false;}
var mobile = $.trim($('#mobile').val());
var promoteId = parseInt("{:I('get.pid',0)}");
var gameId = parseInt("{:I('get.gid',0)}");
var data = {};
if (promoteId > 0 && gameId > 0) {
data = {'phone':mobile,'promote_id':promoteId,'game_id':gameId};
} else {
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){

@ -37,7 +37,7 @@
height:0.6rem;
background:rgba(33,177,235,1);
border-radius:0.3rem;
font-size:0.15rem;
font-size:0.28rem;
font-family:PingFang SC;
font-weight:400;
color:rgba(255,255,255,1);

Loading…
Cancel
Save