Authored by Rock Zhang

修复我的收藏商品没有小数位的bug,修复不能取消收藏商品的bug

... ... @@ -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);
}
... ...
... ... @@ -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;
... ...