关于剩余时间
来源:互联网 发布:中国8个一线城市 知乎 编辑:程序博客网 时间:2024/05/17 22:03
<div class="x-index-layout x-index-layout_1 x-index-layout_x clearfix">
<div class="pull-left clearfix x-lh20">
<div class="pull-left x-h40">
<span class="x-f14 x-p_r x-d_ib x-w180">
<span class="x-w100 x-t_hidden x-d_ib x-h20 x-v-m">${vo.projectName}</span>
<span id="stateText${vo_index}" class="x-stateText x-v-m">
<input type="hidden" value="${vo.projectState}" id="stateValue${vo_index}" class="x-stateValue">
<input type="hidden" value="${vo.valueShow}" id="value_show${vo_index}" class="x-valueShow">
</span>
</span>
<br/>
<span class="x-lh20">预期年化收益率:${vo.annualizedReturn}%</span>
</div>
<div class="pull-left x-pt20 x-w170 x-t_hidden">
<span>投资期限:</span>
<span>${vo.investTerm}个月</span>
</div>
<div class="pull-left x-pt20 x-w170 x-t_hidden">
<span>起投金额:</span>
<span class="x-red">${vo.startInvestMoney}元</span>
</div>
<div class="pull-left x-pt10 x-w180 x-t_hidden">
<span>项目本金:</span><span>${vo.principal}元</span><br/>
<span>获取收益方式:</span><span>
<#if vo.profitType = 1>
按月付息
</#if>
<#if vo.profitType = 2>
一次性还本付息
</#if>
</span>
</div>
</div>
<div class="pull-right x-r-tender">
<input type="hidden" value="" id="time_value${vo_index}">
<input type="hidden" value="" id="date_time_value${vo_index}">
<input type="hidden" value="${vo.valueDate?string("yyyy-MM-dd HH:mm:ss")}" id="value_date${vo_index}" class="x-value_date">
<input type="hidden" value="${vo.investTime?string("yyyy-MM-dd HH:mm:ss")}" id="invest_time${vo_index}" class="x-invest_time">
<#if vo.projectState = 2>
<span id="show_time${vo_index}" class="x-time-l_1">剩余时间:<span id="day_show${vo_index}" class="x-day_show"></span>天<span id="hour_show${vo_index}" class="x-hour_show"></span>小时<span id="minute_show${vo_index}" class="x-minute_show"></span>分钟</span>
<#else>
</#if>
<a href="javascript:void(0);" status="" investTime="${vo.investTime?string("yyyy-MM-dd HH:mm:ss")}" sign_show="0" id="button${vo_index}" projectid="${vo.id}" class="q-invest-btnred x-mt3 x-mb10">了解详情</a>
</div>
</div>
</#list>
//全局服务器系统时间计时器
var currentServiceTime = '${currentServiceTime}';
var currentServiceTimeDate = new Date(currentServiceTime.replace(/-/g, "/"));
var setIntervalIndex = function(investTimeDateValue,valueTimeDateValue,state,valueShow){
var that = this,
timer = setInterval(function() {
if(state==2 && investTimeDateValue > 0 ){
investTimeDateValue--;
var d = parseInt(investTimeDateValue / 3600 / 24),h = parseInt((investTimeDateValue / 3600) % 24),m = parseInt((investTimeDateValue / 60) % 60);
that.find('.x-stateText').text("投标中");
that.find('.x-stateText').addClass("x-btn_1");
if (m <= 9)
m = '0' + m;
that.find('.x-day_show').html(d);
that.find('.x-hour_show').html(h);
that.find('.x-minute_show').html(m);
}else{
that.find('.x-day_show').attr('style','display:none;');
if(state == 4){
that.find('.x-stateText').text("还款完成");
that.find('.x-stateText').addClass("x-btn_3");
}else{
if(valueShow == 0){
that.find('.x-stateText').text("满标");
that.find('.x-stateText').addClass("x-btn_4");
}else{
if(valueTimeDateValue > 0){
that.find('.x-stateText').text("满标");
that.find('.x-stateText').addClass("x-btn_4");
}else{
that.find('.x-stateText').text("还款中");
that.find('.x-stateText').addClass("x-btn_2");
}
}
}
if(investTimeDateValue <= 0){
that.find('.x-time-l_1').css({
'visibility': 'hidden'
});
clearInterval(timer);
timer = null;
}
}
}, 1000);
};
$('.x-index-layout_x').each(function(){
var investTime,investTimeDate,content = $(this);
valueTime = content.find('.x-value_date').val();
var valueTimeDate = new Date(valueTime.replace(/-/g, "/"));
var valueTimeDateValue = parseInt((valueTimeDate.getTime() - currentServiceTimeDate.getTime()) / 1000);
investTime = content.find('.x-invest_time').val();
var investTimeDate = new Date(investTime.replace(/-/g, "/"));
var investTimeDateValue = parseInt((investTimeDate.getTime() - currentServiceTimeDate.getTime()) / 1000);
var $btn = content.find('.x-stateText');
var state = content.find('.x-stateValue' ).val();
var valueShow = content.find('.x-valueShow').val();
setIntervalIndex.call(content,investTimeDateValue,valueTimeDateValue,state,valueShow);
investTime = null;
investTimeDate = null;
content = null;
});
- 关于剩余时间
- 剩余时间
- 【编程之旅】关于传输剩余时间估算那些事儿
- 剩余时间倒计时
- 学生阶段剩余时间安排
- 计算剩余时间的方法
- JavaScript显示剩余时间
- C# 算剩余时间
- PHP计算时间剩余时间
- 电池剩余时间71582788分钟
- ec促销剩余时间倒计时
- Oracle查看会话剩余时间
- 查看Win10激活剩余时间
- 计算当天剩余时间
- 显示特价剩余时间的插件
- 监控sql执行时剩余时间
- 计时器 计算剩余时间、超时时间
- LSP剩余时间(Remaining Lifetime)
- 更适合学习的产品级cortex-A9 安卓开发板
- system property
- 下载就这么难吗?
- Old Calculator
- POJ2236——Wireless Network
- 关于剩余时间
- swift xmpp代码学习
- SQL Server 可更新订阅的发布和订阅的数据库文件迁移
- [iOS]深入浅出 iOS 之多线程 NSThread
- 下载的问题
- smarty学习 -基础配置
- Java 不可变类
- freetype第二部分
- keepalived之虚拟ip应用