修改bug

master
liaojinling 5 years ago
parent fe6dd1ddff
commit 9a25fd0a04

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

@ -837,6 +837,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"
@ -847,7 +848,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

Loading…
Cancel
Save