Commit 1ae6507b authored by agping's avatar agping

1

parent b3084508
...@@ -194,9 +194,9 @@ ...@@ -194,9 +194,9 @@
<span class="fore-span ld-Marheight">-</span> <span class="fore-span ld-Marheight">-</span>
<input class="btn4-pk ld-Marheight input-pk-style" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_end" name="end_date1" type="date"> <input class="btn4-pk ld-Marheight input-pk-style" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_end" name="end_date1" type="date">
<span class="fore-span ld-Marheight">分档根据时间:</span> <span class="fore-span ld-Marheight">分档根据时间:</span>
<input class="btn4-pk ld-Marheight input-pk-style" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_start" name="start_date1" type="date"> <input class="btn4-pk ld-Marheight input-pk-style" value="" data-rule-phoneus="false" data-rule-required="false" id="sort_time_start" name="start_date1" type="date">
<span class="fore-span ld-Marheight">-</span> <span class="fore-span ld-Marheight">-</span>
<input class="btn4-pk ld-Marheight input-pk-style" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_end" name="end_date1" type="date"> <input class="btn4-pk ld-Marheight input-pk-style" value="" data-rule-phoneus="false" data-rule-required="false" id="sort_time_end" name="end_date1" type="date">
<span class="produce-pk fore-span ld-Marheight">生成</span> <span class="produce-pk fore-span ld-Marheight">生成</span>
</div> </div>
<img src="/resource/image/gold@1x.png" class="img-gold"/> <img src="/resource/image/gold@1x.png" class="img-gold"/>
......
...@@ -21,8 +21,7 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home. ...@@ -21,8 +21,7 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home.
var day_end = y + '.' + (m < 10 ? ('0' + m) : m) + '.' + (d < 10 ? ('0' + d) : d); var day_end = y + '.' + (m < 10 ? ('0' + m) : m) + '.' + (d < 10 ? ('0' + d) : d);
$('#start_date').html(day_start); $('#start_date').html(day_start);
$('#end_date').html(day_end); $('#end_date').html(day_end);
pkList.getTime();
// pkList.getCitySite();
pkList.getTeamList(0); pkList.getTeamList(0);
pkList.event(); pkList.event();
}, },
...@@ -87,7 +86,10 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home. ...@@ -87,7 +86,10 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home.
$("#pk_list").html(doTtmpl(pkList.mainTabArr[pkList.mainTabIndexTwo])); $("#pk_list").html(doTtmpl(pkList.mainTabArr[pkList.mainTabIndexTwo]));
}); });
//生成pk榜
_doc.on('click', '.produce-pk', function(e){
pkList.setTime();
});
$(".export-pk").click(function() { //导出列表 $(".export-pk").click(function() { //导出列表
if(pkList.mainTabIndexTeam){ if(pkList.mainTabIndexTeam){
pkList.exportTeamList(); pkList.exportTeamList();
...@@ -217,6 +219,50 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home. ...@@ -217,6 +219,50 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home.
} }
}); });
}, },
//显示 隐藏城市 默认显示 当前账号 所在城市
getTime:function(){
$.ajax({
url: '/index/configWeek',
type: 'GET',
async: true,
data: {
'site_id':user_info_obj.site_id,
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
console.log(data.data.total_date_start)
var data_= JSON.parse(data.data);
$('#create_time_start').val(data_.total_date_start);
$('#create_time_end').val(data_.total_date_end);
$('#sort_time_start').val(data_.sort_date_start);
$('#sort_time_end').val(data_.sort_date_end);
}
}
});
},
//设置时间
setTime:function(){
$.ajax({
url: '/index/configWeek',
type: 'POST',
async: true,
data: {
'site_id':user_info_obj.site_id,
'total_date_start':$('#create_time_start').val(),
'total_date_end':$('#create_time_end').val(),
'sort_date_start':$('#sort_time_start').val(),
'sort_date_end':$('#sort_time_end').val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
}
}
});
},
}; };
return pkList; return pkList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment