切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
480fe55c4b595bf43c288ec9442fbfffa09e796b
1 个父辈
96bcd7d0
1 个管道 的构建
通过
耗费 0 秒
78
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
24 行增加
和
3 行删除
app/portal/controller/GoodsdetailsController.php
public/themes/simpleboot3/portal/goodsdetails/goods_details.html
app/portal/controller/GoodsdetailsController.php
查看文件 @
480fe55
...
...
@@ -44,6 +44,23 @@ class GoodsdetailsController extends WeChatBaseController{
}
/**
* 点击收藏
*/
public
function
goods_collection
(){
$goods_id
=
$_POST
[
'goods_id'
];
$uid
=
cmf_get_current_user_id
();
$arr
[
'goods_id'
]
=
$goods_id
;
$arr
[
'uid'
]
=
$uid
;
$data
=
Db
::
name
(
'collect'
)
->
insert
(
$arr
);
if
(
$data
){
return
true
;
}
else
{
return
false
;
}
}
...
...
public/themes/simpleboot3/portal/goodsdetails/goods_details.html
查看文件 @
480fe55
...
...
@@ -141,9 +141,13 @@
*点击收藏
*/
function
goods_collection
(
id
){
alert
(
id
);
$
.
post
(
"{:url('Goodsdetails/goods_collection')}"
,{
goods_id
:
id
},
function
(
data
){
if
(
data
){
alert
(
'收藏成功'
);
}
else
{
alert
(
'收藏失败'
);
}
});
}
</script>
</body>
...
...
请
注册
或
登录
后发表评论