正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
@@ -834,13 +834,7 @@ class Home extends Base { | @@ -834,13 +834,7 @@ class Home extends Base { | ||
834 | $body = db()->first(bodySql::first($id)); | 834 | $body = db()->first(bodySql::first($id)); |
835 | if($body){ | 835 | if($body){ |
836 | $data['body'] = json_decode($body['text_html'],true); | 836 | $data['body'] = json_decode($body['text_html'],true); |
837 | - if(count($data['body']) == 1){ | ||
838 | - if(count($data['body'][0])==1){ | ||
839 | - if(isset($data['body'][0]['body'])){ | ||
840 | - $data['body'][0]['type'] = 'text/html'; | ||
841 | - } | ||
842 | - } | ||
843 | - } | 837 | + |
844 | $charset = 'utf-8'; | 838 | $charset = 'utf-8'; |
845 | $htmlbody = ''; | 839 | $htmlbody = ''; |
846 | foreach ($data['body'] as $bd){ | 840 | foreach ($data['body'] as $bd){ |
@@ -853,6 +847,12 @@ class Home extends Base { | @@ -853,6 +847,12 @@ class Home extends Base { | ||
853 | } | 847 | } |
854 | foreach ($data['body'] as $bdk=>$bd){ | 848 | foreach ($data['body'] as $bdk=>$bd){ |
855 | 849 | ||
850 | + if(count($bd)==1){ | ||
851 | + if(isset($bd['body'])){ | ||
852 | + $data['body'][$bdk]['type'] = 'text/html'; | ||
853 | + } | ||
854 | + } | ||
855 | + | ||
856 | if(!empty($bd['path'])){ | 856 | if(!empty($bd['path'])){ |
857 | 857 | ||
858 | $data['body'][$bdk]['name'] = @base64_decode($bd['name']); | 858 | $data['body'][$bdk]['name'] = @base64_decode($bd['name']); |
-
请 注册 或 登录 后发表评论