장수 빙의 코드 변경

This commit is contained in:
2018-05-05 21:20:15 +09:00
parent 5974028c4d
commit 3c1c339498
9 changed files with 226 additions and 376 deletions
+23 -2
View File
@@ -8,6 +8,27 @@ var templateGeneralCard =
<label><input <%keepCnt?"":disabled="disabled"%> type="checkbox" value="<%no%>" name="keep[]" class="keep_select">보관(<%keepCnt%>회)</label>\
</div>';
function pickGeneral(){
$btn = $(this);
$.post({
url:'j_select_npc.php',
dataType:'json',
data:{
pick:$btn.val()
}
}).then(function(result){
if(!result.result){
alert(result.reason);
location.refresh();
}
alert('빙의에 성공했습니다.');
location.href = './';
});
return false;
}
function updatePickMoreTimer(){
var $btn = $('#btn_pick_more');
var now = Date.now();
@@ -29,18 +50,18 @@ function printGenerals(value){
$('#btn_pick_more').data('available', new Date(value.pickMoreFrom).getTime()).prop('disabled',true);
$.each(value.pick, function(idx, cardData){
cardData.iconPath = getIconPath(cardData.imgsvr, cardData.picture);
console.log(cardData);
var $card = $(TemplateEngine(templateGeneralCard, cardData));
console.log($card);
$('.card_holder').append($card);
$card.find('.select_btn').click(pickGeneral);
});
updatePickMoreTimer();
}
jQuery(function($){
$(function($){
$.post('j_get_select_npc_token.php').then(function(value){
if(!value.result){