From 2bc6f4ebf86ab4cb2289372eaeda6c11c7effb40 Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Wed, 22 Dec 2021 11:14:01 +0800 Subject: [PATCH] settter --- app/controller/api/Comment.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controller/api/Comment.php b/app/controller/api/Comment.php index f861789..dbcb9b2 100644 --- a/app/controller/api/Comment.php +++ b/app/controller/api/Comment.php @@ -10,7 +10,7 @@ use app\validate\Comment as VComment; use think\Exception; use think\exception\ValidateException; use think\facade\Config; - +use think\facade\Log; /** * 评论相关 * @@ -56,9 +56,10 @@ class Comment extends Base if(strtotime($account->blank_time) >time()){ throw new RepositoryException('用户被加入黑名单,暂时不能评论,请在' .$account->blank_time . "后评论"); } - + $comment = input("comment/a", [],null); + $comment =urldecode(json_encode($comment)); $param = [ - "comment" => input("comment/s", "",null),//评论内容 图片类型放入地址 语音类型放置语音文件地址 + "comment" => $comment,//评论内容 图片类型放入地址 语音类型放置语音文件地址 "user_code" => $account['user_code'], "create_time" => date("Y-m-d H:i:s"), //"url" => input("url/s", ""),//图片地址 仅图片评论才有