商品收藏

This commit is contained in:
gongfuxiang 2018-10-15 23:42:01 +08:00
parent c385c13bb1
commit f5284c28d4
3 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@
<tbody>
<notempty name="data_list">
<foreach name="data_list" item="v">
<tr id="data-list-{{$v.id}}">
<tr id="data-list-{{$v.goods_id}}">
<td>
<div class="goods-detail">
<a href="{{$v.goods_url}}" target="_blank">
@ -64,7 +64,7 @@
<p class="line-price">¥{{$v.price}}</p>
</td>
<td>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-ajax" data-url="{{:U('Home/UserFavor/Cancel')}}" data-id="{{$v.id}}" data-view="reload">取消</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block submit-ajax" data-url="{{:U('Home/UserFavor/Cancel')}}" data-id="{{$v.goods_id}}" data-view="delete">取消</button>
</td>
</tr>
</foreach>

View File

@ -317,7 +317,7 @@ class GoodsService
[
'checked_type' => 'empty',
'key_name' => 'id',
'error_msg' => '删除数据id有误',
'error_msg' => '商品id有误',
],
[
'checked_type' => 'empty',
@ -333,7 +333,7 @@ class GoodsService
// 开始操作
$m = M('GoodsFavor');
$data = ['id'=>intval($params['id']), 'user_id'=>$params['user']['id']];
$data = ['goods_id'=>intval($params['id']), 'user_id'=>$params['user']['id']];
$temp = $m->where($data)->find();
if(empty($temp))
{

View File

@ -205,7 +205,7 @@ $(function() {
type: 'post',
dataType: "json",
timeout: 10000,
data: {"goods_id": $('.goods-detail').data('id')},
data: {"id": $('.goods-detail').data('id')},
success: function(result)
{
poptit_close();