Browse Source

修正BUG

moshaorui 4 months ago
parent
commit
e09e04905c

+ 7 - 6
app/Admin/Controllers/BaseProductController.php

@@ -101,11 +101,12 @@ class BaseProductController extends AdminController
                 $dataImages = array_column($images, 'image_url');
                 return CommonHelper::displayImage($dataImages,150);
             })->unescape();
-            $show->field('content');
-            $show->field('created_at');
-            $show->field('updated_at');
+            $show->field('content')->unescape();
             $show->field('order');
             $show->field('enabled')->using(config('dictionary.enabled'));
+            $show->field('created_at');
+            $show->field('updated_at');
+
         });
     }
 
@@ -119,7 +120,7 @@ class BaseProductController extends AdminController
     {
         return Form::make(BaseProduct::with('images'), function (Form $form) {
             $form->display('id');
-            $form->select('category_id', admin_trans_field('category_name'))
+            $form->select('category_id', admin_trans_label('category_name'))
                 ->options(BaseProductCategory::selectOptions())
                 ->required();
             $form->text('title')->required();
@@ -127,12 +128,12 @@ class BaseProductController extends AdminController
             $form->textarea('description');
             $form->text('sku')->required();
             $form->date('issuance_date');
-            $form->table('parameters',admin_trans_field('parameter_name'), function (Form\NestedForm $table) {
+            $form->table('parameters',admin_trans_label('parameter_name'), function (Form\NestedForm $table) {
                 $table->text('key')->required();
                 $table->text('value')->required();
             });
             // 多图上传
-            $form->multipleImage('images', admin_trans_field('images'))
+            $form->multipleImage('images', admin_trans_label('images'))
                 ->sortable() // 可拖动排序
                 ->removable() // 可移除图片
                 ->autoUpload() // 自动上传

+ 5 - 79
app/Admin/Controllers/DistAppearanceTemplateController.php

@@ -41,6 +41,11 @@ class DistAppearanceTemplateController extends AdminController
                 $templateCode = $request->get('template_code');
                 $content = $request->get('content');
                 return DistAppearanceTemplate::saveContent($appearanceId,$distId,$templateCode, $content);
+            } elseif ($request->get('act') == 'publish') {
+                //发报
+                $appearanceId = $request->get('appearance_id');
+                $distId = $request->get('dist_id');
+                return DistAppearanceTemplate::publish($appearanceId,$distId);
             }
         }
         $leftForm = new AceLeft();
@@ -104,83 +109,4 @@ class DistAppearanceTemplateController extends AdminController
 
 
 
-
-
-//
-//    /**
-//     * page index
-//     */
-//    public function index(Content $content)
-//    {
-//        return $content
-//            ->header('列表')
-//            ->description('全部')
-//            ->breadcrumb(['text'=>'列表','url'=>''])
-//            ->body($this->grid());
-//    }
-//
-//    /**
-//     * Make a grid builder.
-//     *
-//     * @return Grid
-//     */
-//    protected function grid()
-//    {
-//        return Grid::make(new DistAppearanceTemplate(), function (Grid $grid) {
-//            $grid->column('id')->sortable();
-//            $grid->column('dist_id');
-//            $grid->column('appearance_id');
-//            $grid->column('file_name');
-//            $grid->column('file_path');
-//            $grid->column('content');
-//            $grid->column('created_at');
-//            $grid->column('updated_at')->sortable();
-//
-//            $grid->filter(function (Grid\Filter $filter) {
-//                $filter->equal('id');
-//
-//            });
-//        });
-//    }
-//
-//    /**
-//     * Make a show builder.
-//     *
-//     * @param mixed $id
-//     *
-//     * @return Show
-//     */
-//    protected function detail($id)
-//    {
-//        return Show::make($id, new DistAppearanceTemplate(), function (Show $show) {
-//            $show->field('id');
-//            $show->field('dist_id');
-//            $show->field('appearance_id');
-//            $show->field('file_name');
-//            $show->field('file_path');
-//            $show->field('content');
-//            $show->field('created_at');
-//            $show->field('updated_at');
-//        });
-//    }
-//
-//    /**
-//     * Make a form builder.
-//     *
-//     * @return Form
-//     */
-//    protected function form()
-//    {
-//        return Form::make(new DistAppearanceTemplate(), function (Form $form) {
-//            $form->display('id');
-//            $form->text('dist_id');
-//            $form->text('appearance_id');
-//            $form->text('file_name');
-//            $form->text('file_path');
-//            $form->text('content');
-//
-//            $form->display('created_at');
-//            $form->display('updated_at');
-//        });
-//    }
 }

+ 6 - 0
app/Admin/Controllers/DistAppearanceVariableController.php

@@ -162,6 +162,12 @@ JS
                 if ($form->isCreating()) {
                     $form->variable_code = uniqueCode();
                 }
+                //检查json格式是否正确
+                if ($form->variable_type == 3) {
+                    if (!isValidJson($form->variable_value)) {
+                        return $form->response()->error('The JSON format is incorrect');
+                    }
+                }
             });
 
         });

+ 72 - 0
app/Admin/Repositories/DistAppearanceTemplate.php

@@ -3,7 +3,9 @@
 namespace App\Admin\Repositories;
 
 use App\Models\DistAppearanceTemplate as Model;
+use App\Models\SiteAppearanceTemplate;
 use Dcat\Admin\Repositories\EloquentRepository;
+use Illuminate\Support\Carbon;
 
 class DistAppearanceTemplate extends EloquentRepository
 {
@@ -133,4 +135,74 @@ class DistAppearanceTemplate extends EloquentRepository
     }
 
 
+    /*
+     * 同步模版到正式表上
+     */
+    public static function syncAppearanceTemplates($appearanceId,$distId)
+    {
+        $appearanceId = intval($appearanceId);
+        $distId = intval($distId);
+
+        $criteria = ['dist_id' => $distId, 'appearance_id' => $appearanceId];
+
+        $tmpModel = new Model();
+        $tempRecords = $tmpModel
+            ->where($criteria)
+            ->get();
+
+        $siteModel = new SiteAppearanceTemplate();
+        $siteRecords = $siteModel
+            ->where($criteria)
+            ->get()
+            ->keyBy('id'); // Use IDs as keys for easier comparison
+
+
+        foreach ($tempRecords as $tempRecord) {
+            $siteRecord = $siteRecords->get($tempRecord->id);
+            if ($siteRecord) {
+                // If record exists in `site_appearance_template`, check for updates
+                if ($tempRecord->updated_at > $siteRecord->updated_at) {
+                    $siteModel->where('id', $siteRecord->id)
+                        ->update([
+                            'file_name' => $tempRecord->file_name,
+                            'file_path' => $tempRecord->file_path,
+                            'content' => $tempRecord->content,
+                            'updated_at' => Carbon::now(),
+                        ]);
+                }
+            } else {
+                // If record does not exist, insert it
+                $siteModel->insert([
+                    'id' => $tempRecord->id,
+                    'dist_id' => $tempRecord->dist_id,
+                    'appearance_id' => $tempRecord->appearance_id,
+                    'file_name' => $tempRecord->file_name,
+                    'file_path' => $tempRecord->file_path,
+                    'content' => $tempRecord->content,
+                    'created_at' => Carbon::now(),
+                    'updated_at' => Carbon::now(),
+                    'template_code' => $tempRecord->template_code,
+                ]);
+            }
+        }
+
+        // Delete records from `site_appearance_template` that don’t match `dist_id=1` and `appearance_id=1`
+        $siteModel
+            ->where($criteria)
+            ->whereNotIn('id', $tempRecords->pluck('id')->toArray())
+            ->delete();
+    }
+
+    /*
+     * 发布模版与变量
+     */
+    public static function publish($appearanceId,$distId) {
+        //同步模版
+        self::syncAppearanceTemplates($appearanceId,$distId);
+        //同步变量
+        DistAppearanceVariable::syncAppearanceVariables($appearanceId, $distId);
+        return true;
+    }
+
+
 }

+ 64 - 0
app/Admin/Repositories/DistAppearanceVariable.php

@@ -5,6 +5,8 @@ namespace App\Admin\Repositories;
 use App\Models\DistAppearanceVariable as Model;
 use Dcat\Admin\Form;
 use Dcat\Admin\Repositories\EloquentRepository;
+use App\Models\SiteAppearanceVariable;
+use Illuminate\Support\Carbon;
 
 class DistAppearanceVariable extends EloquentRepository
 {
@@ -44,6 +46,68 @@ class DistAppearanceVariable extends EloquentRepository
     }
 
 
+    /*
+     * 同步变量到正式表
+     */
+    public static function syncAppearanceVariables($appearanceId,$distId) {
+        $appearanceId = intval($appearanceId);
+        $distId = intval($distId);
+
+        // Define criteria for filtering
+        $criteria = ['dist_id' => $distId, 'appearance_id' => $appearanceId];
+
+        $tmpModel = new Model();
+        // Retrieve records from both tables
+        $tempVariables = $tmpModel
+            ->where($criteria)
+            ->get();
+
+        $siteModel = new SiteAppearanceVariable();
+        $siteVariables = $siteModel
+            ->where($criteria)
+            ->get()
+            ->keyBy('id'); // Use IDs as keys for easier comparison
 
+        foreach ($tempVariables as $tempVariable) {
+            $siteVariable = $siteVariables->get($tempVariable->id);
+
+            if ($siteVariable) {
+                // If record exists in `site_appearance_variable`, check for updates
+                if ($tempVariable->updated_at > $siteVariable->updated_at) {
+                    $siteModel
+                        ->where('id', $siteVariable->id)
+                        ->update([
+                            'variable_name' => $tempVariable->variable_name,
+                            'variable_value' => $tempVariable->variable_value,
+                            'variable_type' => $tempVariable->variable_type,
+                            'template_code' => $tempVariable->template_code,
+                            'variable_code' => $tempVariable->variable_code,
+                            'updated_at' => Carbon::now(),
+                        ]);
+                }
+            } else {
+                // If record does not exist, insert it
+                $siteModel->insert([
+                    'id' => $tempVariable->id,
+                    'dist_id' => $tempVariable->dist_id,
+                    'appearance_id' => $tempVariable->appearance_id,
+                    'variable_name' => $tempVariable->variable_name,
+                    'variable_value' => $tempVariable->variable_value,
+                    'variable_type' => $tempVariable->variable_type,
+                    'template_code' => $tempVariable->template_code,
+                    'variable_code' => $tempVariable->variable_code,
+                    'created_at' => Carbon::now(),
+                    'updated_at' => Carbon::now(),
+                ]);
+            }
+        }
+
+        // Delete records from `site_appearance_variable` that don’t match `dist_id=1` and `appearance_id=1`
+        $siteModel
+            ->where($criteria)
+            ->whereNotIn('id', $tempVariables->pluck('id')->toArray())
+            ->delete();
+
+    }
 
 }

+ 18 - 0
app/Admin/Repositories/SiteAppearanceTemplate.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace App\Admin\Repositories;
+
+use App\Models\SiteAppearanceTemplate as Model;
+use Dcat\Admin\Repositories\EloquentRepository;
+use Illuminate\Support\Carbon;
+
+class SiteAppearanceTemplate extends EloquentRepository
+{
+    /**
+     * Model.
+     *
+     * @var string
+     */
+    protected $eloquentClass = Model::class;
+
+}

+ 21 - 0
app/Admin/Repositories/SiteAppearanceVariable.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Admin\Repositories;
+
+use App\Models\SiteAppearanceVariable as Model;
+use Dcat\Admin\Repositories\EloquentRepository;
+
+class SiteAppearanceVariable extends EloquentRepository
+{
+    /**
+     * Model.
+     *
+     * @var string
+     */
+    protected $eloquentClass = Model::class;
+
+
+
+
+
+}

+ 7 - 8
app/Distributor/Controllers/DistProductController.php

@@ -132,10 +132,10 @@ class DistProductController extends AdminController
             }
             $show->field('id');
             $show->field('title');
-            $show->field('keywords');
-            $show->field('description');
             $show->field('sku');
             $show->field('dist_product_category.name',admin_trans_label('category_name'));
+            $show->field('keywords');
+            $show->field('description');
             $show->field('issuance_date');
             $show->field('parameters')->as(function ($items) {
                 if (is_array($items)) {
@@ -159,11 +159,11 @@ class DistProductController extends AdminController
                 $dataImages = array_column($images, 'image_url');
                 return CommonHelper::displayImage($dataImages,150);
             })->unescape();
-            $show->field('content');
-            $show->field('created_at');
-            $show->field('updated_at');
+            $show->field('content')->unescape();
             $show->field('order');
             $show->field('enabled')->using(config('dictionary.enabled'));
+            $show->field('created_at');
+            $show->field('updated_at');
         });
     }
 
@@ -180,11 +180,11 @@ class DistProductController extends AdminController
                 ->options(DistProductCategory::selectOptions())
                 ->required();
             $form->text('title')->required();
+            $form->text('sku')->required();
             $form->text('keywords');
             $form->textarea('description');
-            $form->text('sku')->required();
             $form->date('issuance_date');
-            $form->table('parameters',admin_trans_label('parameters'), function (Form\NestedForm $table) {
+            $form->table('parameters',admin_trans_label('parameter_name'), function (Form\NestedForm $table) {
                 $table->text('key',admin_trans_field('key'))->required();
                 $table->text('value',admin_trans_field('value'))->required();
             });
@@ -233,7 +233,6 @@ class DistProductController extends AdminController
                     $baseProductImage->model()->where('product_id', $id)->delete();
                 }
 
-
             });
         });
     }

+ 60 - 39
app/Distributor/Controllers/ImportProductController.php

@@ -8,6 +8,7 @@ use App\Distributor\Repositories\BaseProduct;
 use App\Admin\Repositories\BaseProductCategory;
 use App\Distributor\Actions\BatchCopy;
 use App\Distributor\Repositories\DistProductCategory;
+use App\Libraries\CommonHelper;
 use Dcat\Admin\Form;
 use Dcat\Admin\Grid;
 use Dcat\Admin\Show;
@@ -24,9 +25,9 @@ class ImportProductController extends AdminController
     public function index(Content $content)
     {
         return $content
-            ->header('产品导入')
+            ->header('Product Import')
             ->description('<span style="color: red; font-weight: bold;">'.admin_trans_label('select_products_to_import').'</span>')
-            ->breadcrumb(['text'=>'列表','url'=>''])
+            ->breadcrumb(['text'=>'list','url'=>''])
             ->body($this->grid());
     }
 
@@ -58,15 +59,14 @@ class ImportProductController extends AdminController
      */
     protected function grid()
     {
-        return Grid::make(new BaseProduct(), function (Grid $grid) {
+        return Grid::make(BaseProduct::with(['baseProductCategory','images']), function (Grid $grid) {
             $grid->column('id')->sortable();
             $grid->column('title');
+            $grid->column('sku');
+            $grid->column('base_product_category.name',admin_trans_label('category_name'));
             $grid->column('keywords');
             $grid->column('description');
-            $grid->column('sku');
-            $grid->column('category_id');
             $grid->column('issuance_date');
-
             // 筛选
             $grid->filter(function (Grid\Filter $filter) {
                 $filter->panel();
@@ -74,7 +74,7 @@ class ImportProductController extends AdminController
                 $filter->equal('sku')->width(2);
                 $filter->like('title')->width(2);
                 $filter->equal('category_id',admin_trans_label('category'))->select(BaseProductCategory::selectOptions())->width(2);
-                $filter->equal('enabled', admin_trans_label('enabled'))->select(array_map('admin_trans_label', config('dictionary.enabled')))->width(2);
+                //$filter->equal('enabled', admin_trans_label('enabled'))->select(array_map('admin_trans_label', config('dictionary.enabled')))->width(2);
             });
             //$grid->column('order');
            //$grid->column('enabled');
@@ -105,7 +105,7 @@ class ImportProductController extends AdminController
                 new DistProductImportForm(),
             ]);
 
-
+            $grid->model()->where('enabled',1)->orderBy("is_pinned",'desc')->orderBy("order",'desc');
         });
     }
 
@@ -118,21 +118,42 @@ class ImportProductController extends AdminController
      */
     protected function detail($id)
     {
-        return Show::make($id, new BaseProduct(), function (Show $show) {
+        return Show::make($id, BaseProduct::with(['baseProductCategory','images']), function (Show $show) {
             $show->field('id');
             $show->field('title');
+            $show->field('sku');
+            $show->field('base_product_category.name',admin_trans_label('category_name'));
             $show->field('keywords');
             $show->field('description');
-            $show->field('sku');
-            $show->field('category_id');
             $show->field('issuance_date');
-            $show->field('order');
-            $show->field('enabled');
-            $show->field('content');
-            $show->field('parameters');
-            $show->field('is_pinned');
-            $show->field('created_at');
-            $show->field('updated_at');
+            $show->field('parameters')->as(function ($items) {
+                if (is_array($items)) {
+                    // 创建表格的表头
+                    $table = '<table class="table">';
+                    $table .= '<tr><th>key</th><th>value</th></tr>';
+                    // 遍历数组并将数据填充到表格中
+                    foreach ($items as $item) {
+                        $table .= '<tr>';
+                        $table .= '<td>' . $item['key'] . '</td>';    // 商品名称
+                        $table .= '<td>' . $item['value'] . '</td>'; // 数量
+                        $table .= '</tr>';
+                    }
+                    $table .= '</table>';
+                    return $table;
+                }
+                return ''; // 当没有数组数据时
+            })->unescape();
+            $show->field('images')->as(function ($images) {
+                // 开始生成 HTML
+                $dataImages = array_column($images, 'image_url');
+                return CommonHelper::displayImage($dataImages,150);
+            })->unescape();
+            $show->field('content')->unescape();
+            //$show->field('created_at');
+            //$show->field('updated_at');
+            // 禁用操作
+            $show->disableEditButton();
+            $show->disableDeleteButton();
         });
     }
 
@@ -141,25 +162,25 @@ class ImportProductController extends AdminController
      *
      * @return Form
      */
-    protected function form()
-    {
-        return Form::make(new BaseProduct(), function (Form $form) {
-            $form->display('id');
-            $form->text('title');
-            $form->text('keywords');
-            $form->text('description');
-            $form->text('sku');
-            $form->text('category_id');
-            $form->text('issuance_date');
-            $form->text('order');
-            $form->text('enabled');
-            $form->text('content');
-            $form->text('parameters');
-            $form->text('is_pinned');
-
-            $form->display('created_at');
-            $form->display('updated_at');
-
-        });
-    }
+//    protected function form()
+//    {
+//        return Form::make(new BaseProduct(), function (Form $form) {
+//            $form->display('id');
+//            $form->text('title');
+//            $form->text('keywords');
+//            $form->text('description');
+//            $form->text('sku');
+//            $form->text('category_id');
+//            $form->text('issuance_date');
+//            $form->text('order');
+//            $form->text('enabled');
+//            $form->text('content');
+//            $form->text('parameters');
+//            $form->text('is_pinned');
+//
+//            $form->display('created_at');
+//            $form->display('updated_at');
+//
+//        });
+//    }
 }

+ 19 - 1
app/Distributor/Models/BaseProduct.php

@@ -2,6 +2,8 @@
 
 namespace App\Distributor\Models;
 
+use App\Models\BaseProductCategory;
+use App\Models\BaseProductImage;
 use Dcat\Admin\Traits\HasDateTimeFormatter;
 
 use Illuminate\Database\Eloquent\Model;
@@ -10,5 +12,21 @@ class BaseProduct extends Model
 {
 	use HasDateTimeFormatter;
     protected $table = 'base_product';
-    
+
+    protected $casts = [
+        'created_at' => 'datetime:Y-m-d H:i:s',
+        'updated_at' => 'datetime:Y-m-d H:i:s',
+        'parameters' => 'json', // 将 attributes 字段转换为数组
+    ];
+
+    public function baseProductCategory()
+    {
+        return $this->hasOne(BaseProductCategory::class,'id','category_id');
+    }
+
+    // 一对多关联
+    public function images()
+    {
+        return $this->hasMany(BaseProductImage::class, 'product_id','id');
+    }
 }

+ 16 - 0
app/Models/SiteAppearanceTemplate.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Facades\DB;
+
+class SiteAppearanceTemplate extends Model
+{
+	use HasDateTimeFormatter;
+    protected $table = 'site_appearance_template';
+
+
+
+}

+ 17 - 0
app/Models/SiteAppearanceVariable.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Facades\DB;
+
+class SiteAppearanceVariable extends Model
+{
+	use HasDateTimeFormatter;
+    protected $table = 'site_appearance_variable';
+
+    protected $fillable = ['dist_id', 'appearance_id', 'variable_name','variable_value','variable_type','created_at','updated_at','template_id'];
+
+
+}

+ 9 - 0
app/helpers.php

@@ -136,3 +136,12 @@ if (!function_exists('generateVersionNumber')) {
     }
 }
 
+//判断是否为json
+if (!function_exists('isValidJson')) {
+    function isValidJson($string) {
+        json_decode($string);
+        return (json_last_error() === JSON_ERROR_NONE);
+    }
+
+}
+

+ 1 - 0
lang/zh_CN/global.php

@@ -96,6 +96,7 @@ return [
         'category_name'         => '分类名称',
         'parameter_name'        => '参数名称',
         'assignment'            => '分配',
+        'images'                => '图片',
     ],
     'options' => [
         //

+ 41 - 3
resources/views/admin/pages-custom/ace.blade.php

@@ -41,6 +41,9 @@
         color: #1e1e1e; /* Bootstrap 的 primary 颜色 */
         font-weight: bold;
     }
+    .modal-xxl {
+        max-width: 75%; /* 或其他所需的宽度 */
+    }
 </style>
 
 <div class="container-fluid">
@@ -65,7 +68,7 @@
 
 <!-- 变量管理弹窗 -->
 <div class="modal fade" id="iframeModal" tabindex="-1" aria-labelledby="iframeModalLabel" aria-hidden="true">
-    <div class="modal-dialog modal-dialog-centered modal-xl">
+    <div class="modal-dialog modal-dialog-centered modal-xxl">
         <div class="modal-content">
             <div class="modal-header">
                 <h5 class="modal-title" id="iframeModalLabel">Variable Management</h5>
@@ -74,7 +77,7 @@
                 </button>
             </div>
             <div class="modal-body">
-                <iframe src="/prime-control/dist-template-var" width="100%" height="700px" frameborder="0" style="max-width: 100%;overflow: hidden"></iframe>
+                <iframe src="/prime-control/dist-template-var" width="100%" height="750px" frameborder="0" style="max-width: 100%;overflow: hidden"></iframe>
             </div>
             <div class="modal-footer">
                 <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
@@ -113,9 +116,13 @@
             var iframeUrl = '/prime-control/dist-template-var?templateCode=' + fileId + '&appearanceId=' + appearance_id+'&distId=' + dist_id;
             $('#iframeModal iframe').attr('src', iframeUrl);
         }
-        //中间的Ace编辑器,内容展示
+        //点击代码树后中间的Ace编辑器,内容展示
         var actionclick = function() {
             $('.file-action').click(function() {
+                //去掉上一个文件的加粗
+                $('.custom-blue-bold').removeClass('custom-blue-bold');
+                //加粗
+                $(this).addClass('custom-blue-bold');
                 //去掉保存与变量管理按钮的disabled
                 changeButtonDisabled(false);
                 //加载编辑代码
@@ -235,6 +242,37 @@
                 }
             });
         })
+
+        // 模版发布
+        $("#publish-btn").click(function() {
+            var appearance_id = $('select[name="appearance_id"]').val();
+            var dist_id = $('input[name="dist_id"]').val();
+
+            if (appearance_id == '') {
+                Dcat.error('操作失败:请先选择主题');
+                return false;
+            }
+            loadingIndex = layer.load(1, {
+                shade: [0.5, '#000'] // 设置遮罩层
+            });
+            $.ajax({
+                url: '/prime-control/dist-template/ace',
+                type: 'POST',
+                data: {
+                    act:'publish',
+                    appearance_id: appearance_id,
+                    dist_id: dist_id
+                },
+                success: function(response) {
+                    layer.close(loadingIndex);
+                    if (response == '1') {
+                        Dcat.success('保存成功');
+                    }else{
+                        Dcat.error('保存失败');
+                    }
+                }
+            });
+        })
     });
 </script>