推广平台>充值玩家|我的游戏--更新

master
chenxiaojun 5 years ago
parent fb4a4f3cae
commit edd5b55afa

@ -1869,16 +1869,15 @@ class QueryController extends BaseController
$field = $fieldUC . ',' . $fieldUI . ',' . $fieldLR . ' as user_game_login_count'; $field = $fieldUC . ',' . $fieldUI . ',' . $fieldLR . ' as user_game_login_count';
$subQuery = M('user_play_data_count', 'tab_')->alias('uc') $subQuery = M('user_play_data_count', 'tab_')->alias('uc')
->field($field) ->field($field)
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id')
->where($map) ->where($map)
->group('uc.role_id,uc.server_id,uc.game_id') ->group('uc.role_id,uc.game_id,uc.user_id,uc.id')
->buildSql(); ->buildSql();
$query = M()->alias('record') $query = M()->alias('record')
->table($subQuery) ->table($subQuery)
->order($orderBy); ->order($orderBy);
$total = M('user_play_data_count', 'tab_')->alias('uc') $total = M('user_play_data_count', 'tab_')->alias('uc')
->field($fieldUC) ->field($fieldUC)
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->where($map) ->where($map)
->find(); ->find();

@ -876,7 +876,17 @@
fontname: 'Ubuntu', fontname: 'Ubuntu',
fontcolor: '#ff9818', fontcolor: '#ff9818',
}; };
var logo = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img')[0]
var logo = null;
var logoSrc = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img').attr('src');
if (isImg(logoSrc)) {
logo = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img')[0]
} else {
var img = document.createElement('img');
img.src = '__IMG__/game_icon.png';
logo = img;
}
$('#game_link_ercode').empty().qrcode(options); $('#game_link_ercode').empty().qrcode(options);
$("#game_link_ercode canvas")[0].getContext('2d').drawImage(logo, (qrcodeWidth - logoWidth) / 2, (qrcodeHeight - logoHeight) / 2, logoWidth, logoHeight); $("#game_link_ercode canvas")[0].getContext('2d').drawImage(logo, (qrcodeWidth - logoWidth) / 2, (qrcodeHeight - logoHeight) / 2, logoWidth, logoHeight);
@ -896,6 +906,17 @@
}); });
}); });
function isImg(src) {
var img = new Image();
img.src = src;
img.onload = function () {
if (img.width > 0 || img.height > 0) {
return true;
}
}
return false;
}
var clipboard = new ClipboardJS('#clipboard-btn', { var clipboard = new ClipboardJS('#clipboard-btn', {
text: function(trigger) { text: function(trigger) {
return trigger.getAttribute('data-text'); return trigger.getAttribute('data-text');

Loading…
Cancel
Save