wupengfei 1 year ago
parent
commit
05e2359be7

+ 2 - 2
.idea/workspace.xml

@@ -3,7 +3,7 @@
   <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/api/controller/Task.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Task.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/user/controller/Message.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/user/controller/Message.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/user/view/message/form.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/user/view/message/form.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -395,7 +395,7 @@
       <workItem from="1691543042280" duration="23354000" />
       <workItem from="1691629430810" duration="15054000" />
       <workItem from="1691715404380" duration="18567000" />
-      <workItem from="1691801870842" duration="9786000" />
+      <workItem from="1691801870842" duration="10108000" />
     </task>
     <servers />
   </component>

+ 8 - 0
application/user/controller/Message.php

@@ -110,6 +110,14 @@ class Message extends Controller
     protected function _form_filter(&$data)
     {
         $data['type'] = 2;
+        $this->module_arr= [
+            'video'=> '视频',
+            'article'=> '图文',
+            'datum'=> '资料',
+            'activity'=> '活动',
+            'forum'=> '问答',
+            'press'=> '新闻',
+        ];
     }
 
 }

+ 20 - 7
application/user/view/message/form.html

@@ -6,23 +6,36 @@
                 <label class="layui-form-label label-required">推送类型</label>
                 <div class="layui-input-inline">
                     <select name="type" lay-filter ="type">
-                        {foreach [2=>'搜索内容',3=>'模块详情'] as $ck=>$cv}
+                        {foreach [2=>'搜索标签',3=>'模块详情'] as $ck=>$cv}
                         <option  {if $vo.type == $ck } selected {/if} value="{$ck}">{$cv}</option>
                         {/foreach}
                     </select>
                 </div>
             </div>
             
-            <div class="layui-form-item label_div">
+            <div class="layui-form-item">
                 <label class="layui-form-label ">标签</label>
                 <div class="layui-input-block">
-                    <input name="label" maxlength="60"  value='{$vo.label|default=""}' placeholder="请输入标签" class="layui-input">
+                    <input name="label" value='{$vo.label|default=""}' placeholder="请输入标签" class="layui-input">
+                </div>
+            </div>
+
+            <div class="module_div">
+                <div class="layui-form-item">
+                    <label class="layui-form-label label-required">模块</label>
+                    <div class="layui-input-inline">
+                        <select name="module" lay-filter ="module">
+                            {foreach $module_arr as $ck=>$cv}
+                                <option  {if $vo.module == $ck } selected {/if} value="{$ck}">{$cv}</option>
+                            {/foreach}
+                        </select>
+                    </div>
                 </div>
             </div>
 
 
             <div class="layui-form-item">
-                <label class="layui-form-label label-required">发送内容</label>
+                <label class="layui-form-label label-required">送内容</label>
                 <div class="layui-input-block">
                     <textarea name="content" rows="10" cols="98">{$vo.content|default=''}</textarea>
                 </div>
@@ -38,10 +51,10 @@
     <script>
         window.form.render();
         form.on('select(type)', function(data){
-            if(data.value == 2) {
-                $(".label_div").show();
+            if(data.value == 3) {
+                $(".module_div").show();
             }else{
-                $(".label_div").hide();
+                $(".module_div").hide();
             }
             window.form.render();
         })