Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
Rock Zhang
9 years ago
Commit
ccd1def98b5e0aa0143c7b96721d3a38c24a40ae
1 parent
2f22a755
修复我的收藏商品没有小数位的bug,修复不能取消收藏商品的bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
ccd1def
...
...
@@ -127,7 +127,7 @@ class HomeController extends AbstractAction
if
(
$this
->
isAjax
())
{
$uid
=
$this
->
getUid
();
$fav_id
=
$this
->
post
(
'
fav_
id'
,
0
);
$fav_id
=
$this
->
post
(
'id'
,
0
);
$result
=
UserModel
::
favoriteDelete
(
$uid
,
$fav_id
);
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
ccd1def
...
...
@@ -162,9 +162,9 @@ class UserModel
$product
[
'fav_id'
]
=
$val
[
'product_id'
];
$product
[
'imgUrl'
]
=
$val
[
'image'
];
$product
[
'title'
]
=
$val
[
'product_name'
];
$product
[
'price'
]
=
'¥'
.
$val
[
'market_price'
];
$product
[
'discountPrice'
]
=
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
]
>
0
)
?
'¥'
.
$val
[
'sales_price'
]
:
false
;
$product
[
'savePrice'
]
=
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
]
>
0
)
?
'¥'
.
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
])
:
false
;
$product
[
'price'
]
=
!
empty
(
$val
[
'market_price'
])
?
'¥'
.
$val
[
'market_price'
]
.
'.00'
:
0
;
$product
[
'discountPrice'
]
=
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
]
>
0
)
?
'¥'
.
$val
[
'sales_price'
]
.
'.00'
:
false
;
$product
[
'savePrice'
]
=
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
]
>
0
)
?
'¥'
.
(
$val
[
'market_price'
]
-
$val
[
'sales_price'
])
.
'.00'
:
false
;
$product
[
'sellOut'
]
=
(
bool
)(
$val
[
'price_down'
]);
$result
[]
=
$product
;
...
...
Please
register
or
login
to post a comment