wupengfei 2 年之前
父节点
当前提交
c01b9e0430

+ 3 - 1
.idea/workspace.xml

@@ -2,6 +2,8 @@
 <project version="4">
   <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/nutrition/controller/OneArticle.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/OneArticle.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/nutrition/view/one_article/form.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/one_article/form.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -204,7 +206,7 @@
       <workItem from="1670547445908" duration="11821000" />
       <workItem from="1671196552398" duration="3806000" />
       <workItem from="1671605812878" duration="482000" />
-      <workItem from="1671670352202" duration="6484000" />
+      <workItem from="1671670352202" duration="6601000" />
     </task>
     <servers />
   </component>

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

@@ -172,6 +172,8 @@ class OneArticle extends Controller
             $item_info = \app\common\model\ArticleItem::where('article_id',input('id'))->find();
             $this->phone = $item_info? $item_info->phone : '';
             $this->author =  $item_info? $item_info->author : '';
+            $this->content_type =  $item_info? $item_info->content_type : '';
+            $this->item_info = $item_info;
         }
 
         if($this->request->isPost())

+ 6 - 6
application/nutrition/view/one_article/form.html

@@ -174,11 +174,11 @@
                 <div class="layui-input-inline">
                     <select name="content_type" lay-filter ="content_type">
                         {foreach [1=>'富文本',2=>'PDF'] as $ck=>$cv}
-                        {if !empty($item_info.content_type) &&  $item_info.content_type == $ck }
-                        <option selected data-cl_key="{$ck}" value="{$ck}">{$cv}</option>
-                        {else}
-                        <option data-cl_key="{$ck}" value="{$ck}">{$cv}</option>
-                        {/if}
+                            {if !empty($content_type) &&  $content_type == $ck }
+                            <option selected data-cl_key="{$ck}" value="{$ck}">{$cv}</option>
+                            {else}
+                            <option data-cl_key="{$ck}" value="{$ck}">{$cv}</option>
+                            {/if}
                         {/foreach}
                     </select>
                 </div>
@@ -188,7 +188,7 @@
                 <label class="layui-form-label label-required">PDF文件</label>
                 <label class="layui-col-xs10 relative">
                     <label class="layui-col-xs9 think-form-group-left">
-                        <input name="pdf" value='{$vo.pdf|default=""}'  readonly placeholder="请上传" class="layui-input">
+                        <input name="pdf" value='{$item_info.pdf|default=""}'  readonly placeholder="请上传" class="layui-input">
                     </label>
                     <button type="button" class="layui-btn" id="test3"><i class="layui-icon"></i>上传文件</button>
                 </label>