Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
biao
9 years ago
Commit
1f13eedeca4941ca7bbcafc94351f299c1f03b41
2 parents
6e52c4fd
ea93c8c2
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
16 deletions
static/js/me/address-act.js
static/js/me/order-detail.js
static/sass/cart/_gift-advance-good.scss
template/m.yohobuy.com/partials/cart/gift-advance-good.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
static/js/me/address-act.js
View file @
1f13eed
...
...
@@ -93,7 +93,7 @@ $addressForm.on('submit', function() {
loading
.
hideLoadingMask
();
}
else
{
if
(
queryString
.
refer
===
'shopping'
)
{
window
.
location
.
href
=
'/
shoppingCart
/selectAddress'
;
window
.
location
.
href
=
'/
cart/index
/selectAddress'
;
}
else
{
window
.
location
.
href
=
'/home/address'
;
}
...
...
static/js/me/order-detail.js
View file @
1f13eed
...
...
@@ -43,6 +43,7 @@ optHammer.on('tap', function(e) {
$
(
'#dialog-wrapper'
).
hide
();
if
(
!
res
)
{
tip
.
show
(
'网络错误'
);
return
;
}
if
(
res
.
code
===
200
)
{
tip
.
show
(
'删除成功'
);
...
...
@@ -74,6 +75,7 @@ optHammer.on('tap', function(e) {
$
(
'#dialog-wrapper'
).
hide
();
if
(
!
res
)
{
tip
.
show
(
'网络错误'
);
return
;
}
if
(
res
.
code
===
200
)
{
tip
.
show
(
'取消成功'
);
...
...
static/sass/cart/_gift-advance-good.scss
View file @
1f13eed
...
...
@@ -80,7 +80,7 @@
}
.price
{
margin-left
:
10rem
/
$pxConvertRem
;
//
margin-left: 10rem / $pxConvertRem;
font-size
:
24rem
/
$pxConvertRem
;
color
:
#f1545b
;
...
...
template/m.yohobuy.com/partials/cart/gift-advance-good.phtml
View file @
1f13eed
...
...
@@ -6,13 +6,9 @@
<div class="deps">
<p class="name row">{{name}}</p>
<p class="row">
<span class="price">
¥{{#if price}}{{price}}{{else}}{{marketPrice}}{{/if}}
</span>
<span class="price">¥{{#if price}}{{price}}{{else}}{{marketPrice}}{{/if}}</span>
{{#if price}}
<span class="price market-price">
¥{{marketPrice}}
</span>
<span class="price market-price">¥{{marketPrice}}</span>
{{/if}}
<span class="count">
×{{count}}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
1f13eed
...
...
@@ -50,7 +50,7 @@ class CartModel
*/
public
static
function
getCartData
(
$uid
,
$shoppingKey
,
$cartType
=
'all'
,
$onlyGift
=
false
,
$onlyAdvanceBuy
=
false
)
{
$result
=
array
(
'cartNav'
=>
true
);
$result
=
array
(
'cartNav'
=>
true
,
'commonGoodsCount'
=>
'0'
,
'presellGoodsCount'
=>
'0'
);
// 用户是否登录
if
(
empty
(
$uid
))
{
...
...
@@ -73,21 +73,21 @@ class CartModel
break
;
}
$ordinaryCount
=
intval
(
$cart
[
'ordinary_cart_data'
][
'shopping_cart_data'
][
'goods_count'
]);
$advanceCount
=
intval
(
$cart
[
'advance_cart_data'
][
'shopping_cart_data'
][
'goods_count'
]);
$ordinaryCount
=
strval
(
$cart
[
'ordinary_cart_data'
][
'shopping_cart_data'
][
'goods_count'
]);
$advanceCount
=
strval
(
$cart
[
'advance_cart_data'
][
'shopping_cart_data'
][
'goods_count'
]);
// 普通购物车和预售购物车都为空
if
(
$ordinaryCount
===
0
&&
$advanceCount
===
0
)
{
if
(
$ordinaryCount
===
'0'
&&
$advanceCount
===
'0'
)
{
$result
[
'isEmptyCart'
]
=
true
;
break
;
}
/* 普通购物车 */
$result
[
'commonGoodsCount'
]
=
$ordinaryCount
;
$result
[
'commonCart'
]
=
self
::
procCartData
(
$cart
[
'ordinary_cart_data'
],
$onlyGift
,
$onlyAdvanceBuy
);
/* 预售购物车 */
$result
[
'presellGoodsCount'
]
=
$advanceCount
;
$result
[
'preSellCart'
]
=
self
::
procCartData
(
$cart
[
'advance_cart_data'
],
$onlyGift
,
$onlyAdvanceBuy
);
}
while
(
0
);
}
while
(
false
);
return
$result
;
}
...
...
@@ -156,8 +156,8 @@ class CartModel
if
(
empty
(
$uid
))
{
$result
[
'code'
]
=
300
;
$reult
[
'message'
]
=
'请先登录'
;
$result
[
'data'
]
=
'/signin.html'
;
$result
[
'message'
]
=
'请先登录'
;
$result
[
'data'
]
=
Helpers
::
url
(
'/signin.html'
);
return
$result
;
}
...
...
Please
register
or
login
to post a comment