settter
parent
6b3a35d2c1
commit
e03dca634f
|
@ -53,7 +53,10 @@ class Comment extends Base
|
|||
if (empty($account)) {
|
||||
throw new RepositoryException('用户无效!');
|
||||
}
|
||||
|
||||
|
||||
if(strtotime($account->blank_time) >time()){
|
||||
throw new RepositoryException('用户被加入黑名单,暂时不能评论,请在' .$account->blank_time . "后评论");
|
||||
}
|
||||
|
||||
$param = [
|
||||
"comment" => input("comment/s", ""),//评论内容 图片类型放入地址 语音类型放置语音文件地址
|
||||
|
|
|
@ -241,6 +241,26 @@ class Comment extends Base
|
|||
$list = CommentModel::findList($whereMap, [], $page, $size, function ($q) {
|
||||
return $q->withJoin("account");
|
||||
}, $orders);
|
||||
|
||||
$list["list"]->each(function ($item){
|
||||
if($item->type == CommentModel::type_text){
|
||||
$data = json_decode($item->comment,true);
|
||||
if(!empty($data)){
|
||||
$dataStr = '';
|
||||
foreach ($data as $ditem){
|
||||
|
||||
if($ditem["msgType"] == CommentModel::msg_type_emoji){
|
||||
$dataStr .= "<img class='emoji' src='/static/" . $ditem['msgImage']."'/>";
|
||||
}else{
|
||||
$dataStr.=$ditem['msgCont'];
|
||||
}
|
||||
|
||||
}
|
||||
$item->comment = $dataStr;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
return $this->json(0, 'success', $list);
|
||||
}
|
||||
return $this->view();
|
||||
|
|
|
@ -53,7 +53,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
|||
|
||||
{field: 'balance',title: '商家余额'},
|
||||
{field: 'recharge_total_money', title: '充值总额'},
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', }
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -44,7 +44,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
|||
{field: 'start_time', title: '开始时间'},
|
||||
{field: 'end_time', title: '结束时间'},
|
||||
{templet: '#row-status' , title: '状态'},
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', }
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -47,7 +47,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
|||
{field : "business_address" , title: '地址'},
|
||||
{templet: '#row-business-license', title: '执照', style: 'height: 90px;'},
|
||||
{templet: '#row-status', title: '状态', style: 'height: 90px;'},
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', }
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -54,7 +54,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
|||
{templet: '#row-comment', minWidth: 350, title: '评论内容'},
|
||||
{templet: '#row-state', title: '状态'},
|
||||
|
||||
{templet: '#row-operate', field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||
{templet: '#row-operate', field: 'right', align: 'center', title: '操作',}
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -39,7 +39,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate'
|
|||
cols: [[
|
||||
{field: 'rule', minWidth: 150, title: '规则',edit: 'text'},
|
||||
{templet: '#row-status', minWidth: 120, align: 'center', title: '状态'},
|
||||
{templet: '#row-operate', fixed: "right", minWidth: 250, title: '操作'},
|
||||
{templet: '#row-operate', minWidth: 250, title: '操作'},
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -48,7 +48,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
|||
{field: 'blank_total_format', title: '禁言总时长'},
|
||||
{field: 'surplus_blank_total_format', title: '剩余禁言时长'},
|
||||
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', }
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -57,7 +57,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect'], function
|
|||
}
|
||||
return '';
|
||||
},title: '用户标签'},
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||
{templet: '#row-operate', minWidth: 350, field: 'right', align: 'center', title: '操作', }
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -66,7 +66,7 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect','laydate']
|
|||
{templet: '#row-on_shelf', title: '上架状态'},
|
||||
{field: 'state_text', title: '状态'},
|
||||
{field: 'create_time', title: '创建时间'},
|
||||
{templet: '#row-operate', field: 'right', align: 'center', title: '操作', fixed: 'right'}
|
||||
{templet: '#row-operate', field: 'right', align: 'center', title: '操作'}
|
||||
]],
|
||||
done: function () {
|
||||
Tools.setInsTb(insTb);
|
||||
|
|
|
@ -184,13 +184,19 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">内容</label>
|
||||
<label class="layui-form-label">简介</label>
|
||||
<div class="layui-input-block editor-text">
|
||||
<!-- <div class="editor"></div>-->
|
||||
<textarea name="item[intro]" id="ueditor" class="layui-textarea"></textarea>
|
||||
<textarea name="item[intro]" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">内容</label>
|
||||
<div class="layui-input-block editor-text">
|
||||
<!-- <div class="editor"></div>-->
|
||||
<textarea name="item[content]" id="ueditor" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -184,10 +184,18 @@
|
|||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">内容</label>
|
||||
<label class="layui-form-label">简介</label>
|
||||
<div class="layui-input-block editor-text">
|
||||
<!-- <div class="editor"></div>-->
|
||||
<textarea name="item[intro]" id="ueditor" class="layui-textarea">{$item["intro"]}</textarea>
|
||||
<textarea name="item[intro]" class="layui-textarea">{$item["intro"]}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">内容</label>
|
||||
<div class="layui-input-block editor-text">
|
||||
<!-- <div class="editor"></div>-->
|
||||
<textarea name="item[content]" id="ueditor" class="layui-textarea">{$item["content"]}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue