wupengfei vor 2 Jahren
Ursprung
Commit
d5bd3728ce

+ 3 - 2
.idea/workspace.xml

@@ -3,7 +3,8 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/view/forum/reply.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/view/forum/reply.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/operate/controller/ReplyComment.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/ReplyComment.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/operate/view/reply_comment/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/view/reply_comment/index.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -215,7 +216,7 @@
       <workItem from="1673052319155" duration="16867000" />
       <workItem from="1673226266250" duration="24113000" />
       <workItem from="1673312216057" duration="9503000" />
-      <workItem from="1673399011843" duration="9108000" />
+      <workItem from="1673399011843" duration="9181000" />
     </task>
     <servers />
   </component>

+ 10 - 0
application/operate/controller/ReplyComment.php

@@ -93,6 +93,16 @@ class ReplyComment extends Controller
     }
 
 
+    /**
+     * 置顶设置
+     * @auth true
+     * @menu true
+     * @param array $data
+     */
+    public function stick()
+    {
+        $this->_save($this->table, ['is_top' => input('is_top')]);
+    }
 
 
 }

+ 5 - 0
application/operate/view/reply_comment/index.html

@@ -27,6 +27,11 @@
             <td class='text-left '>{$vo.content|default=''}</td>
             <td class='text-left nowrap'>{$vo.create_at|default=''}</td>
             <td class='text-left' style="width: 20%">
+                {if isset($vo.is_top) and $vo.is_top eq 1}
+                <a class="layui-btn layui-btn-xs" data-action="{:url('stick')}" data-value="id#{$vo.id};is_top#0">取消置顶</a>
+                {else}
+                <a class="layui-btn layui-btn-xs layui-btn-warm" data-action="{:url('stick')}" data-value="id#{$vo.id};is_top#1">置 顶</a>
+                {/if}
                 <a data-title="回 复" class="layui-btn layui-btn-xs" data-modal='{:url("reply")}?id={$vo.id}'>回 复</a>
                 <span class="layui-btn layui-btn-xs layui-btn-danger" onclick="btn_confirm('删除','del','{$vo.id}');">删 除</span>
             </td>