From 0df721008eb49684bef7208479478125f14a3648 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 22 Dec 2021 10:35:47 +0800 Subject: [PATCH] settter --- app/controller/api/Comment.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controller/api/Comment.php b/app/controller/api/Comment.php index 3dbd689..f173d0a 100644 --- a/app/controller/api/Comment.php +++ b/app/controller/api/Comment.php @@ -58,8 +58,9 @@ class Comment extends Base throw new ValidateException('用户被加入黑名单,暂时不能评论,请在' .$account->blank_time . "后评论"); } + $param = [ - "comment" => input("comment/s", ""),//评论内容 图片类型放入地址 语音类型放置语音文件地址 + "comment" => json_encode(input("comment/a", []),JSON_UNESCAPED_UNICODE),//评论内容 图片类型放入地址 语音类型放置语音文件地址 "user_code" => $account['user_code'], "create_time" => date("Y-m-d H:i:s"), //"url" => input("url/s", ""),//图片地址 仅图片评论才有 @@ -70,6 +71,7 @@ class Comment extends Base "location" => input("location/s"), ]; + //如果是图片或者语音 加上域名信息 if(in_array($param['type'],[CommentModel::type_img,CommentModel::type_voice])){ $comment = $param['comment'];