mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-03 04:19:37 +08:00
商品收藏
This commit is contained in:
parent
c385c13bb1
commit
f5284c28d4
@ -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>
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user