切换导航条
此项目
正在载入...
登录
潘浩文
/
scoreshop
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
潘浩文
6 years ago
提交
5da0bf9d368ac7a769cb2e1d2773f9a6d3da818d
1 个父辈
9f89cf66
1 个管道 的构建
通过
耗费 0 秒
1
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
23 行增加
和
5 行删除
app/portal/controller/BrandController.php
public/themes/simpleboot3/portal/brand/brand_detail.html
app/portal/controller/BrandController.php
查看文件 @
5da0bf9
...
...
@@ -157,9 +157,10 @@ class BrandController extends WeChatBaseController
}
//点赞ajax接口
public
function
like
(){
$re
=
$this
->
checkUser
();
$param
=
$this
->
request
->
param
();
$like
=
new
LikeService
();
return
$like
->
like
(
$param
[
'id'
],
1
,
session
(
'wechat_user'
)[
'users_
id'
]);
return
$like
->
like
(
$param
[
'id'
],
1
,
$re
[
'
id'
]);
}
...
...
public/themes/simpleboot3/portal/brand/brand_detail.html
查看文件 @
5da0bf9
...
...
@@ -343,10 +343,27 @@
})
//点赞
$
(
".discuss"
).
click
(
function
(){
window
.
event
.
stopPropagation
();
var
num
=
$
(
".commentnum"
).
html
();
num
++
;
$
(
".commentnum"
).
html
(
num
)
$
.
ajax
({
url
:
"{:url('portal/brand/like')}"
,
type
:
"post"
,
data
:
{
id
:
"{$list.id}"
,
},
success
:
function
(
data
)
{
if
(
data
==
1
){
window
.
event
.
stopPropagation
();
var
num
=
$
(
".commentnum"
).
html
();
num
++
;
$
(
".commentnum"
).
html
(
num
)
}
else
if
(
data
==
2
){
window
.
event
.
stopPropagation
();
var
num
=
$
(
".commentnum"
).
html
();
num
--
;
$
(
".commentnum"
).
html
(
num
)
}
}
})
})
</script>
</body>
...
...
请
注册
或
登录
后发表评论