Authored by weiqingting

完善

... ... @@ -6,13 +6,13 @@
var Order = {
/*业务数据*/
/*业务数据(人民币)*/
Data: {
product: 0,
activity: 0,
carriage: 0,
juan: 0,
yohocoin: 0
product: 0,//商品价格
activity: 0,//活动
carriage: 0,//邮费
juan: 0,//优惠卷
yohocoin: 0//YOHO币
},
/*view 交互*/
UI: {
... ... @@ -96,24 +96,27 @@ var Order = {
c.winShow(pan);
});
},
//渲染价格明细
render: function() {
var e = this.e,
d = Order.Data,
c = Order.Common;
var i = 0,
key;
e.$total.html('0.00');
e.$statistics.slice(3, 5).hide();
e.$statistics.slice(2, 5).find('em').html('0.00');
if (d.carriage) {
e.$statistics.eq(2).find('em').html(c.strFixed(d.carriage));
}
if (d.juan) {
e.$statistics.eq(3).show().find('em').html(c.strFixed(d.juan));
}
if (d.yohocoin) {
e.$statistics.eq(4).show().find('em').html(c.strFixed(d.yohocoin));
}
e.$statistics.slice(0, 5).find('em').html('0.00');
for (key in d) {
if(d.hasOwnProperty(key)){
if (d[key]) {
e.$statistics.eq(i).show().find('em').html(c.strFixed(d[key]));
}
}
i++;
}
e.$total.html(c.strFixed(c.calucate()));
}
... ...