wupengfei 2 年 前
コミット
2361b8d00b

+ 6 - 4
.idea/workspace.xml

@@ -2,8 +2,10 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/application/nutrition/view/video_comment/index_search.html" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/view/video_url/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/video_url/index.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/VideoComment.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/VideoComment.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/nutrition/view/video_comment/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/video_comment/index.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -121,7 +123,7 @@
     <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/nutrition/view" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/nutrition/view/video_comment" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.path.for.package.eslint" value="project" />
@@ -132,11 +134,11 @@
   </component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\zs\gaoyixia\application\nutrition\view\video_comment" />
       <recent name="D:\zs\gaoyixia\application\nutrition\view" />
       <recent name="D:\zs\gaoyixia\application\nutrition\controller" />
       <recent name="D:\zs\gaoyixia\vendor" />
       <recent name="D:\zs\gaoyixia\application\api\controller" />
-      <recent name="D:\zs\gaoyixia\public" />
     </key>
   </component>
   <component name="SvnConfiguration">
@@ -182,7 +184,7 @@
       <workItem from="1660697982291" duration="9650000" />
       <workItem from="1660730926670" duration="1018000" />
       <workItem from="1660783282150" duration="17421000" />
-      <workItem from="1660870368036" duration="3869000" />
+      <workItem from="1660870368036" duration="4107000" />
     </task>
     <servers />
   </component>

+ 2 - 0
application/nutrition/controller/VideoComment.php

@@ -37,6 +37,8 @@ class VideoComment extends Controller
         $sel_where[] = ['c.is_deleted','=',0];
         $sel_where[] = ['c.video_id','=',$this->video_id];
         $sel_where[] = ['c.url_id','=',$this->url_id];
+        if($content = $this->request->get('content'))$sel_where[] = ['c.content','like','%'.$content.'%'];
+        if($name = $this->request->get('name'))$sel_where[] = ['u.name','like','%'.$name.'%'];
         $query = $this->_query($this->table)->alias('c')
             ->field('c.*,u.name,u.headimg')
             ->leftJoin("store_member u",'u.id = c.user_id')

+ 1 - 0
application/nutrition/view/video_comment/index.html

@@ -1,6 +1,7 @@
 {extend name='admin@main'}
 {block name="content"}
 <div class="think-box-shadow">
+    {include file='video_comment/index_search'}
     <table class="layui-table margin-top-20" lay-skin="line">
         <thead>
         <tr>

+ 24 - 0
application/nutrition/view/video_comment/index_search.html

@@ -0,0 +1,24 @@
+<fieldset>
+    <legend>条件搜索</legend>
+    <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">用户名</label>
+            <div class="layui-input-inline">
+                <input name="name" value="{$Think.get.name|default=''}" placeholder="用户名" class="layui-input">
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <label class="layui-form-label">内容</label>
+            <div class="layui-input-inline">
+                <input name="content" value="{$Think.get.content|default=''}" placeholder="请输入内容" class="layui-input">
+            </div>
+        </div>
+
+        <div class="layui-form-item layui-inline">
+            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
+        </div>
+    </form>
+    <script>form.render()</script>
+</fieldset>