diff --git a/app/admin/validate/v1/VideoValidate.php b/app/admin/validate/v1/VideoValidate.php index 1c7fa691..f374ce34 100644 --- a/app/admin/validate/v1/VideoValidate.php +++ b/app/admin/validate/v1/VideoValidate.php @@ -18,7 +18,7 @@ class VideoValidate extends Validate 'language_id' => 'require|integer', 'category_id' => 'require|integer', 'name' => 'require|max:64', - 'desc' => 'max:255', + 'desc' => 'max:512', 'image' => 'max:125', 'video' => 'max:125', 'link' => 'url|max:125', @@ -44,7 +44,7 @@ class VideoValidate extends Validate 'category_id.integer' => '分类参数类型错误', 'name.require' => '名称不能为空', 'name.max' => '名称不能超过64个字符', - 'desc.max' => '描述不能超过255个字符', + 'desc.max' => '描述不能超过512个字符', 'image.max' => '图片不能超过125个字符', 'video.max' => '视频不能超过125个字符', 'link.url' => '链接格式错误', diff --git a/app/command/DataMigration.php b/app/command/DataMigration.php index b77cd52c..e506ef9a 100644 --- a/app/command/DataMigration.php +++ b/app/command/DataMigration.php @@ -60,27 +60,27 @@ class DataMigration extends Command // $this->migrateProductPurchaseLinks(); // 迁移文章 - $this->migrateArticle([ - 16 => 7, - 31 => 9, - 32 => 8, - // 68 => 10, - // 69 => 11, - // 70 => 12, - // 71 => 13, - // 72 => 14, - // 73 => 15, - // 74 => 16, - // 75 => 17, - // 78 => 19, - // 79 => 20, - // 80 => 21, - // 81 => 22, - // 82 => 23, - // 83 => 24, - // 84 => 25, - // 85 => 26 - ]); + // $this->migrateArticle([ + // 16 => 7, + // 31 => 9, + // 32 => 8, + // 68 => 10, + // 69 => 11, + // 70 => 12, + // 71 => 13, + // 72 => 14, + // 73 => 15, + // 74 => 16, + // 75 => 17, + // 78 => 19, + // 79 => 20, + // 80 => 21, + // 81 => 22, + // 82 => 23, + // 83 => 24, + // 84 => 25, + // 85 => 26 + // ]); // 迁移faq // $this->migrateFaq(); diff --git a/app/index/controller/Product.php b/app/index/controller/Product.php index 1dcd0921..abc84bcb 100644 --- a/app/index/controller/Product.php +++ b/app/index/controller/Product.php @@ -396,8 +396,11 @@ class Product extends Common ->order(['sort' => 'asc', 'id' => 'desc']) ->select() ->hidden(['platform']) - ->bindAttr('platform', ['platform_name' => 'platform']) + ->bindAttr('platform', ['platform_name' => 'platform', 'platform_sort' => 'sort']) ->toArray(); + // 根据购买链接平台排序 + $sort_by_arr = array_column($product_purchase_links, 'platform_sort'); + array_multisort($sort_by_arr, SORT_ASC, $product_purchase_links); // 获取相关产品信息 $related = ProductRelatedModel::with(['product' => function($query) { diff --git a/app/index/view/pc/public/header.html b/app/index/view/pc/public/header.html index 169ddc38..8608cd51 100644 --- a/app/index/view/pc/public/header.html +++ b/app/index/view/pc/public/header.html @@ -92,7 +92,7 @@ {eq name=":cookie('think_lang')" value="en-us"} {notempty name="basic_config['navigation_store_url']['value']"} - + {:lang_i18n('店铺')} {/notempty} @@ -115,7 +115,7 @@
{volist name="header_hot_products" id="vo"}
- +
{$vo.name}
{$vo.short_name}