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
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
9 years ago
Commit
53de6ef0fc3d431a946525aa094b605e36c1a0e6
1 parent
4f1f49f9
整合 优惠券
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
static/js/shopping-cart/select-coupon.js
template/m.yohobuy.com/actions/index/shoppingCart/select-address.phtml
template/m.yohobuy.com/actions/index/shoppingCart/select-coupon.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
static/js/shopping-cart/select-coupon.js
View file @
53de6ef
...
...
@@ -24,7 +24,7 @@ ellipsis.init();
$newCoupon
.
on
(
'submit'
,
function
()
{
$
.
ajax
({
method
:
'POST'
,
url
:
'/shoppingCart/coupon'
,
url
:
'/shoppingCart/coupon
Search
'
,
data
:
$
(
this
).
serialize
()
}).
then
(
function
(
res
)
{
if
(
res
.
code
===
200
)
{
...
...
@@ -40,7 +40,7 @@ $newCoupon.on('submit', function() {
return
false
;
});
$
(
'#coupon-list'
).
on
(
'touchend'
,
'employ-main'
,
function
()
{
$
(
'#coupon-list'
).
on
(
'touchend'
,
'
.
employ-main'
,
function
()
{
orderInfo
(
'couponCode'
,
$
(
this
).
data
(
'coupon-code'
));
});
...
...
@@ -126,7 +126,7 @@ function getCouponDate() {
$
.
ajax
({
type
:
'POST'
,
url
:
'/
home/couponData
'
,
url
:
'/
shoppingCart/couponList
'
,
dataType
:
'json'
,
data
:
{
page
:
page
...
...
template/m.yohobuy.com/actions/index/shoppingCart/select-address.phtml
View file @
53de6ef
...
...
@@ -2,7 +2,7 @@
<div
class=
"my-address-page select-address-page yoho-page"
>
<div
class=
"page-wrap"
>
{
{#
address
}
}
<a
class=
"address-item"
data-address-id=
"{{address_id}}"
href=
"/shoppingCart/orderEnsure
?address_id={{address_id}}
"
>
<a
class=
"address-item"
data-address-id=
"{{address_id}}"
href=
"/shoppingCart/orderEnsure"
>
<span
class=
"name"
>
{
{consignee
}
}</span>
<span
class=
"tel"
>
{
{mobile
}
}</span>
<p
class=
"address-info"
>
{
{area
}
}
{
{address
}
}</p>
...
...
template/m.yohobuy.com/actions/index/shoppingCart/select-coupon.phtml
View file @
53de6ef
...
...
@@ -11,9 +11,9 @@
<script
id=
"tmpl-coupon"
type=
"text/tmpl"
>
\
{
{#coupons
}
}
\
{
{^
notAvailable
}
}
<a
class=
"employ-main"
data-coupon-code=
"{{ coupon_code}}"
href=
"/shoppingCart/orderEnsure?coupon_code={{ coupon_code}}"
>
<span>\
{
{
money
}
}</span>
<p
class=
"coupon-name"
>\
{
{
coupon_name
}
}</p>
<a
class=
"employ-main"
data-coupon-code=
"\{{ couponCode}}"
href=
"/shoppingCart/orderEnsure"
>
<span>\
{
{
couponValue
}
}</span>
<p
class=
"coupon-name"
>\
{
{
couponDetailInfomation
}
}</p>
<p>有效期:\
{
{
couponValidity
}
}</p>
</a>
\
{
{/
notAvailable
}
}
...
...
@@ -22,8 +22,8 @@
<script
id=
"tmpl-coupon-not-avaliable"
type=
"text/tmpl"
>
\
{
{#
notAvailableCoupons
}
}
<div
class=
"employ-main not-avaliable"
>
<span>\
{
{
money
}
}</span>
<p
class=
"coupon-name"
>\
{
{
coupon_name
}
}</p>
<span>\
{
{
couponValue
}
}</span>
<p
class=
"coupon-name"
>\
{
{
couponDetailInfomation
}
}</p>
<p>有效期:\
{
{
couponValidity
}
}</p>
</div>
\
{
{/
notAvailableCoupons
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
53de6ef
...
...
@@ -491,7 +491,7 @@ class CartModel
$val
[
'notAvailable'
]
=
true
;
}
}
!
empty
(
$couponArr
)
&&
$result
[
'coupons'
]
=
$couponArr
;
!
empty
(
$couponArr
)
&&
$result
=
$couponArr
;
}
}
...
...
Please
register
or
login
to post a comment