Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
7e5a58438b9d007b235e2a2153459e5fc42a7d36
1 parent
58d1ebff
round cost when render in clinet
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
apps/shopping/views/action/order.hbs
public/js/shopping/order.page.js
apps/shopping/views/action/order.hbs
View file @
7e5a584
...
...
@@ -212,7 +212,7 @@
\{{/each}}
<li class="need-pay">
<span class="balance-title">应付金额\{{#if shipping_cost}}(含运费)\{{/if}}:</span>
<span id="balance-cost" class="balance-cost" data-cost="
{{
last_order_amount
}}
">¥<em>\{{
last_order_amount
}}
<
/em></
span
>
<span id="balance-cost" class="balance-cost" data-cost="
{{
last_order_amount
}}
">¥<em>\{{
round
last_order_amount
2
}}
<
/em></
span
>
<
/li
>
<
li
>
<
span
id
=
"submit-order"
class
=
"btn submit-order"
>
提交订单
<
/span
>
...
...
public/js/shopping/order.page.js
View file @
7e5a584
...
...
@@ -47,6 +47,13 @@ require('../plugins/check'); // before 地址和发票
require
(
'./order/address'
);
// 地址
require
(
'./order/invoice'
);
// 发票
// clint helper round
Hbs
.
registerHelper
(
'round'
,
function
(
num
,
precision
)
{
precision
=
precision
?
parseInt
(
precision
,
10
)
:
2
;
num
=
(
num
===
+
num
)
?
(
+
num
).
toFixed
(
precision
)
:
(
Math
.
round
(
num
,
precision
)).
toFixed
(
precision
);
return
num
;
});
lazyLoad
(
$
(
'img.lazy'
));
// dot
...
...
Please
register
or
login
to post a comment