itbeihe
2016-12-21 17:52:06 +08:00
cost = _.random(len, 8, true);
var fixNum = _.random(3);
var costFixed = cost.toFixed(fixNum);
var zeroLen = _.random(3, 6);
var zeroStr = '0';
// costFixed = costFixed.replace('.');
var zeros = zeroStr.repeat(zeroLen)
// console.log(cost, costFixed, zeroLen, fixNum, zeros);
var totalCost = (costFixed + zeros).replace('.', '');
totalCost = parseInt(totalCost, 10)
totalCost = formatPrice(totalCost);
setTimeout(function(){
$('#result').html('<div id="wording">开发一款类似 「' + name + '」 的产品大概需要</div><div id="total"> ¥' + totalCost + '</div><br /> <div id="nosence">此次计算结果仅供娱乐,请勿用于其他用途。违反者请自行承担法律风险,由此产生的法律纠纷与本站无关。</div>').css('visibility', 'visible');
$('input').val('');
pending = false;
$t.html('开始计算').removeClass('disabled');
}, 1400);
好坑