作者 邓超

x

@@ -834,6 +834,13 @@ class Home extends Base { @@ -834,6 +834,13 @@ 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 $charset = 'utf-8'; 844 $charset = 'utf-8';
838 $htmlbody = ''; 845 $htmlbody = '';
839 foreach ($data['body'] as $bd){ 846 foreach ($data['body'] as $bd){