mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-27 21:10:24 +08:00
Merge branch 'koogua/v1.3.9' into demo
This commit is contained in:
commit
f6844244cc
@ -18,13 +18,6 @@
|
||||
<textarea name="answer" class="layui-textarea">{{ consult.answer }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发布</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="published" value="1" title="是" {% if consult.published == 1 %}checked="checked"{% endif %}>
|
||||
<input type="radio" name="published" value="0" title="否" {% if consult.published == 0 %}checked="checked"{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -2,11 +2,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
{%- macro private_info(value) %}
|
||||
{% if value == 1 %}
|
||||
<span class="layui-badge">私密</span>
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
{{ partial('macros/consult') }}
|
||||
|
||||
{% set search_url = url({'for':'admin.consult.search'}) %}
|
||||
|
||||
@ -32,7 +28,7 @@
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col width="10%">
|
||||
<col>
|
||||
<col width="10%">
|
||||
</colgroup>
|
||||
<thead>
|
||||
@ -40,7 +36,7 @@
|
||||
<th>问答</th>
|
||||
<th>用户</th>
|
||||
<th>时间</th>
|
||||
<th>发布</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -65,14 +61,14 @@
|
||||
<p>编号:{{ item.owner.id }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>提问:{{ date('Y-m-d H:i',item.create_time) }}</p>
|
||||
<p>提问:{{ date('Y-m-d H:i:s',item.create_time) }}</p>
|
||||
{% if item.reply_time > 0 %}
|
||||
<p>回复:{{ date('Y-m-d H:i',item.reply_time) }}</p>
|
||||
<p>回复:{{ date('Y-m-d H:i:s',item.reply_time) }}</p>
|
||||
{% else %}
|
||||
<p>回复:N/A</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="published" data-url="{{ update_url }}" {% if item.published == 1 %}checked="checked"{% endif %}></td>
|
||||
<td>{{ publish_status(item.published) }}</td>
|
||||
<td class="center">
|
||||
<div class="kg-dropdown">
|
||||
<button class="layui-btn layui-btn-sm">操作 <i class="layui-icon layui-icon-triangle-d"></i></button>
|
||||
|
17
app/Http/Admin/Views/macros/consult.volt
Normal file
17
app/Http/Admin/Views/macros/consult.volt
Normal file
@ -0,0 +1,17 @@
|
||||
{%- macro publish_status(type) %}
|
||||
{% if type == 1 %}
|
||||
审核中
|
||||
{% elseif type == 2 %}
|
||||
已发布
|
||||
{% elseif type == 3 %}
|
||||
未通过
|
||||
{% else %}
|
||||
未知
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro private_info(value) %}
|
||||
{% if value == 1 %}
|
||||
<span class="layui-badge">私密</span>
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
@ -33,13 +33,6 @@
|
||||
<textarea name="content" class="layui-textarea">{{ review.content }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发布</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="published" value="1" title="是" {% if review.published == 1 %}checked="checked"{% endif %}>
|
||||
<input type="radio" name="published" value="0" title="否" {% if review.published == 0 %}checked="checked"{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -121,7 +121,7 @@ trait Response
|
||||
'total_pages' => $totalPages,
|
||||
];
|
||||
|
||||
return $this->jsonPaginate($pager);
|
||||
return $this->jsonSuccess($pager);
|
||||
}
|
||||
|
||||
public function getErrorMessage($code)
|
||||
|
Loading…
x
Reference in New Issue
Block a user