moshaorui 6 өдөр өмнө
parent
commit
c6df7cd71c

+ 13 - 13
app/Distributor/Controllers/ImportProductController.php

@@ -268,7 +268,7 @@ JS
             if ($show->model()->en_detail && $show->model()->en_detail != '[]') {
                 $show->field('en_detail')->as(function ($images) {
                     $images = json_decode($images);
-                    $html = '<div style="text-align: center">';
+                    $html = '<div style="text-align: left">';
                     foreach ($images as $key => $image) {
                         $url = CommonHelper::albumUrl($image);
                         $html .= '<img src="' . $url . '" style="width:300px;margin-bottom:10px">';
@@ -278,18 +278,18 @@ JS
                 })->unescape();
             }
 
-            if ($show->model()->cn_detail && $show->model()->cn_detail != '[]') {
-                $show->field('cn_detail')->as(function ($images) {
-                    $images = json_decode($images);
-                    $html = '<div style="text-align: center">';
-                    foreach ($images as $key => $image) {
-                        $url = CommonHelper::albumUrl($image);
-                        $html .= '<img src="' . $url . '" style="width:300px;margin-bottom:10px">';
-                    }
-                    $html .= '</div>';
-                    return $html;
-                })->unescape();
-            }
+//            if ($show->model()->cn_detail && $show->model()->cn_detail != '[]') {
+//                $show->field('cn_detail')->as(function ($images) {
+//                    $images = json_decode($images);
+//                    $html = '<div style="text-align: left">';
+//                    foreach ($images as $key => $image) {
+//                        $url = CommonHelper::albumUrl($image);
+//                        $html .= '<img src="' . $url . '" style="width:300px;margin-bottom:10px">';
+//                    }
+//                    $html .= '</div>';
+//                    return $html;
+//                })->unescape();
+//            }
 
             if ($show->model()->video && $show->model()->video != '[]') {
                 $show->field('video')->as(function ($items) {

+ 2 - 2
app/Distributor/Controllers/SiteAlbumController.php

@@ -158,10 +158,10 @@ class SiteAlbumController extends AdminController
             if (empty($show->model()->en_detail) == false && $show->model()->en_detail!= '[]') {
                 $show->field('en_detail')->as(function ($images) {
                     $images = json_decode($images);
-                    $html = '<div style="text-align: center">';
+                    $html = '<div style="text-align: left">';
                     foreach ($images as $key => $image) {
                         $url = CommonHelper::albumUrl($image);
-                        $html .= '<img src="' . $url . '" style="max-width:90%;margin-bottom:10px">';
+                        $html .= '<img src="' . $url . '" style="width:300px;margin-bottom:10px">';
                     }
                     $html .= '</div>';
                     return $html;

+ 1 - 0
app/Libraries/CommonHelper.php

@@ -126,6 +126,7 @@ class CommonHelper
         .video-container {
             position: relative;
             display: inline-block;
+            margin-bottom: 5px;
         }
         .video-container img {
             height: 200px;