master
wangxinglong 2021-12-22 10:35:47 +08:00
parent f874243c8f
commit 0df721008e
1 changed files with 3 additions and 1 deletions

View File

@ -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'];