作者 sgj
1 个管道 的构建 通过 耗费 1 秒

添加积分处理基础类

... ... @@ -34,7 +34,8 @@ class IndexController extends PluginBaseController
$result = Db::name('comment')->insertGetId($post);
if ($result) {
Db::name('portal_post')->where('id', $post['object_id'])->setInc('comment_count');
$this->success('留言成功!', url('portal/Article/index', ['id' => $post['object_id']]));
addScore($user_id,20,'评论文章');
$this->success('留言成功! 获得20积分!', url('portal/Article/index', ['id' => $post['object_id']]));
}else{
$this->error('数据传入失败!');
}
... ...