Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
9f641fbf301fd9dc9dc6e02bbdabeab8f3e70ca2
2 parents
be748850
75860055
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into fix/issue
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
static/js/cart/order-ensure.js
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
static/js/cart/order-ensure.js
View file @
9f641fb
...
...
@@ -18,6 +18,8 @@ var dispatchModeHammer,
$price
=
$
(
'.price-cal'
),
$couponUse
=
$
(
'.coupon-use.used'
),
$addressWrap
=
$
(
'.address-wrap'
),
$coinCheck
=
$
(
'.coin-check'
),
$coinUsed
=
$
(
'.coin .used'
),
payType
,
priceTmpl
=
Handlebars
.
compile
(
$
(
'#tmpl-price'
).
html
()),
queryString
=
$
.
queryString
(),
...
...
@@ -104,6 +106,8 @@ function orderCompute() {
if
(
res
.
last_order_amount
)
{
res
.
last_order_amount
=
(
+
res
.
last_order_amount
).
toFixed
(
2
);
}
$coinCheck
.
find
(
'em'
).
html
(
'- ¥ '
+
res
.
use_yoho_coin
);
$coinUsed
.
html
(
'已抵¥'
+
res
.
use_yoho_coin
);
priceHtml
=
priceTmpl
({
cartPayData
:
res
.
promotion_formula_list
,
price
:
res
.
last_order_amount
...
...
@@ -212,9 +216,13 @@ $('.coin').on('touchend', function() {
if
(
$this
.
find
(
'.checkbox'
).
hasClass
(
'icon-cb-checked'
))
{
orderInfo
(
'yohoCoin'
,
$this
.
data
(
'yoho-coin'
));
$this
.
find
(
'.coin-check em'
).
show
();
$this
.
find
(
'.can-use'
).
hide
();
$this
.
find
(
'.used'
).
show
();
}
else
{
orderInfo
(
'yohoCoin'
,
0
);
$this
.
find
(
'.coin-check em'
).
hide
();
$this
.
find
(
'.can-use'
).
show
();
$this
.
find
(
'.used'
).
hide
();
}
orderCompute
();
});
...
...
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
View file @
9f641fb
...
...
@@ -69,7 +69,9 @@
<span
class=
"title"
>YOHO币</span>
{
{#if
yohoCoin
}
}
<span
class=
"desc"
>可抵¥
{
{yohoCoin
}
}</span>
<span
class=
"desc used {{#unless useYohoCoin}}hide{{/if}}"
>已抵¥
{
{yohoCoin
}
}</span>
<span
class=
"desc can-use {{#if useYohoCoin}}hide{{/if}}"
>可抵¥
{
{yohoCoin
}
}</span>
{
{#if
useYohoCoin
}
}
<span
class=
"coin-check"
>
<em>-
¥
{
{yohoCoin
}
}</em>
...
...
Please
register
or
login
to post a comment