Authored by yyq

js 替换 RMB

@@ -88,13 +88,13 @@ var Order = { @@ -88,13 +88,13 @@ var Order = {
88 var len = e.$tbody.find('tr').length; 88 var len = e.$tbody.find('tr').length;
89 var subtotal = parseFloat(td.eq(1).html()) * parseInt(td.eq(3).html()); 89 var subtotal = parseFloat(td.eq(1).html()) * parseInt(td.eq(3).html());
90 90
91 - td.eq(1).html('' + td.eq(1).html()); 91 + td.eq(1).html('¥' + td.eq(1).html());
92 92
93 if (td.hasClass('xforone')) { 93 if (td.hasClass('xforone')) {
94 - td.eq(4).find('del').html('' + c.strFixed(subtotal)); 94 + td.eq(4).find('del').html('¥' + c.strFixed(subtotal));
95 subtotal = 0; 95 subtotal = 0;
96 } else { 96 } else {
97 - td.eq(4).html('' + c.strFixed(subtotal)); 97 + td.eq(4).html('¥' + c.strFixed(subtotal));
98 } 98 }
99 d.product += subtotal; 99 d.product += subtotal;
100 if (!index) { 100 if (!index) {
@@ -103,7 +103,7 @@ var Order = { @@ -103,7 +103,7 @@ var Order = {
103 td.last().remove(); 103 td.last().remove();
104 } 104 }
105 if (index === len - 1) { 105 if (index === len - 1) {
106 - e.$tbody.find('tr').eq(0).find('td').last().html('<strong>' + c.strFixed(d.product) + '</strong>'); 106 + e.$tbody.find('tr').eq(0).find('td').last().html('<strong>¥' + c.strFixed(d.product) + '</strong>');
107 } 107 }
108 }); 108 });
109 109
@@ -282,15 +282,15 @@ var Order = { @@ -282,15 +282,15 @@ var Order = {
282 envelopesVal = e.$useEnvelopesInput.data('all') - data.use_red_envelopes; 282 envelopesVal = e.$useEnvelopesInput.data('all') - data.use_red_envelopes;
283 283
284 if (~~data.use_red_envelopes > 0) { 284 if (~~data.use_red_envelopes > 0) {
285 - e.$useEnvelopes.find('span').html('-' + data.use_red_envelopes.toFixed(2)); 285 + e.$useEnvelopes.find('span').html('-¥' + data.use_red_envelopes.toFixed(2));
286 e.$useEnvelopes.find('input').attr('data-use', data.use_red_envelopes); 286 e.$useEnvelopes.find('input').attr('data-use', data.use_red_envelopes);
287 } else { 287 } else {
288 - e.$useEnvelopes.find('span').html('-¥0.00');  
289 - e.$hasEnvelopes.html('¥' + (e.$useEnvelopesInput.attr('data-all') * 1).toFixed(2)); 288 + e.$useEnvelopes.find('span').html('-¥0.00');
  289 + e.$hasEnvelopes.html('¥' + (e.$useEnvelopesInput.attr('data-all') * 1).toFixed(2));
290 e.$redEnvelopes.removeClass('active'); 290 e.$redEnvelopes.removeClass('active');
291 e.$useEnvelopesInput.prop('checked', false); 291 e.$useEnvelopesInput.prop('checked', false);
292 } 292 }
293 - e.$hasEnvelopes.html('' + envelopesVal.toFixed(2)); 293 + e.$hasEnvelopes.html('¥' + envelopesVal.toFixed(2));
294 294
295 if (packageList) { 295 if (packageList) {
296 e.$expressFee.each(function(index, expressCost) { 296 e.$expressFee.each(function(index, expressCost) {
@@ -299,8 +299,8 @@ var Order = { @@ -299,8 +299,8 @@ var Order = {
299 realCost = packageList[index].shopping_cost; 299 realCost = packageList[index].shopping_cost;
300 300
301 var cost = parseInt(orignCost) === 0 ? 301 var cost = parseInt(orignCost) === 0 ?
302 - '运费:¥0.00元' :  
303 - '运费:¥' + realCost + '元(原价' + orignCost + '元,优惠' + disCount + ')元'; 302 + '运费:¥0.00元' :
  303 + '运费:¥' + realCost + '元(原价' + orignCost + '元,优惠' + disCount + ')元';
304 304
305 $(expressCost).text(cost); 305 $(expressCost).text(cost);
306 }); 306 });
@@ -689,7 +689,7 @@ var Order = { @@ -689,7 +689,7 @@ var Order = {
689 689
690 // 红包 690 // 红包
691 envelopesVal = e.$useEnvelopesInput.data('all') - e.$useEnvelopesInput.data('use'); // 剩余的红包 691 envelopesVal = e.$useEnvelopesInput.data('all') - e.$useEnvelopesInput.data('use'); // 剩余的红包
692 - e.$hasEnvelopes.text('' + envelopesVal.toFixed(2)); 692 + e.$hasEnvelopes.text('¥' + envelopesVal.toFixed(2));
693 e.$useEnvelopes.find('input').click(function() { 693 e.$useEnvelopes.find('input').click(function() {
694 694
695 var $this = $(this), 695 var $this = $(this),
@@ -728,8 +728,8 @@ var Order = { @@ -728,8 +728,8 @@ var Order = {
728 if (!!$this.attr('checked')) { 728 if (!!$this.attr('checked')) {
729 e.$redEnvelopes.addClass('active'); 729 e.$redEnvelopes.addClass('active');
730 } else { 730 } else {
731 - e.$useEnvelopes.find('span').html('-¥0.00');  
732 - e.$hasEnvelopes.html('¥' + ($this.attr('data-all') * 1).toFixed(2)); 731 + e.$useEnvelopes.find('span').html('-¥0.00');
  732 + e.$hasEnvelopes.html('¥' + ($this.attr('data-all') * 1).toFixed(2));
733 e.$redEnvelopes.removeClass('active'); 733 e.$redEnvelopes.removeClass('active');
734 } 734 }
735 } else { 735 } else {
@@ -91,13 +91,13 @@ var TicketCat = { @@ -91,13 +91,13 @@ var TicketCat = {
91 91
92 _this.Data.productSku = $(this).data('sku'); 92 _this.Data.productSku = $(this).data('sku');
93 _this.Data.buyNumber += parseInt(td.eq(3).html()); 93 _this.Data.buyNumber += parseInt(td.eq(3).html());
94 - td.eq(1).html('' + td.eq(1).html()); 94 + td.eq(1).html('¥' + td.eq(1).html());
95 95
96 if (td.hasClass('xforone')) { 96 if (td.hasClass('xforone')) {
97 - td.eq(4).find('del').html('' + c.strFixed(subtotal)); 97 + td.eq(4).find('del').html('¥' + c.strFixed(subtotal));
98 subtotal = 0; 98 subtotal = 0;
99 } else { 99 } else {
100 - td.eq(4).html('' + c.strFixed(subtotal)); 100 + td.eq(4).html('¥' + c.strFixed(subtotal));
101 } 101 }
102 productSubtotal += subtotal; 102 productSubtotal += subtotal;
103 if (!index) { 103 if (!index) {
@@ -106,7 +106,7 @@ var TicketCat = { @@ -106,7 +106,7 @@ var TicketCat = {
106 td.last().remove(); 106 td.last().remove();
107 } 107 }
108 if (index === len - 1) { 108 if (index === len - 1) {
109 - el.$tbody.find('tr').eq(0).find('td').last().html('<strong>' + 109 + el.$tbody.find('tr').eq(0).find('td').last().html('<strong>¥' +
110 c.strFixed(productSubtotal) + '</strong>'); 110 c.strFixed(productSubtotal) + '</strong>');
111 } 111 }
112 }); 112 });