ModStartCMS V6.0.0
在文章显示模版里添加如下代码并启用评论功能,测试评论功能报错,见截图
@include('module::MemberComment.View.pc.public.comment',['biz'=>'article','bizId'=>'id'])
报错日志看报什么错误
qq发您看看
[2023-03-29 16:48:55] product.ERROR: PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'id' for column 'bizId' at row 1 in /Applications/EasySrv/www/appgeek/vendor/laravel/framework/src/Illuminate/Database/Connection.php:390
日志的第一行
@include('module::MemberComment.View.pc.public.comment',['biz'=>'article','bizId'=>1])
其中 bizId 为文章的唯一ID,需要是整数。
biz=article, bizId=1 表示文章ID=1的评论
biz=article, bizId=2 表示文章ID=2的评论
在模版里怎么写呢?
我写成:
@include('module::MemberComment.View.pc.public.comment',['biz'=>'article','bizId'=>'{{$record['id']}}'])
刷新页面直接报错了,这里的id怎么写?
@include('module::MemberComment.View.pc.public.comment',['biz'=>'article','bizId'=>$record['id']])
QQ扫一扫联系
点击联系
2374926113
微信扫一扫联系
.