diff --git a/app/index/controller/Product.php b/app/index/controller/Product.php index f18ad2d8..12d914d2 100644 --- a/app/index/controller/Product.php +++ b/app/index/controller/Product.php @@ -367,7 +367,7 @@ class Product extends Common $newpros = []; // 获取新品上市产品 - $products = ProductModel::field(['id', 'category_id', 'name', 'spu', 'cover_image']) + $products = ProductModel::field(['id', 'category_id', 'name', 'spu', 'cover_image', 'is_new']) ->language($this->lang_id) ->enabled(true) ->onSale(true) diff --git a/app/index/lang/en-us.php b/app/index/lang/en-us.php index b3f5e7bd..e0452af2 100644 --- a/app/index/lang/en-us.php +++ b/app/index/lang/en-us.php @@ -164,6 +164,9 @@ return [ 'send_success' => 'Add Success!', 'send_fail' => 'Add Fail!', ], + 'product_newpro' => [ + 'view_all' => 'View all' + ], 'product_detail' => [ 'detail_section_title' => 'Product Description', 'related_products' => 'Related Products', diff --git a/app/index/lang/zh-cn.php b/app/index/lang/zh-cn.php index 4b3ae45d..a0f867e1 100644 --- a/app/index/lang/zh-cn.php +++ b/app/index/lang/zh-cn.php @@ -164,6 +164,9 @@ return [ 'send_success' => '信息已成功提交', 'send_fail' => '信息提交失败', ], + 'product_newpro' => [ + 'view_all' => '查看全部' + ], 'product_detail' => [ 'detail_section_title' => '产品详情', 'related_products' => '相关产品', diff --git a/app/index/view/product/newpro.html b/app/index/view/product/newpro.html index 6c75dc8a..23234747 100644 --- a/app/index/view/product/newpro.html +++ b/app/index/view/product/newpro.html @@ -17,25 +17,25 @@

{$vo.category.name}
- View all + {:lang('product_newpro.view_all')}

{volist name="vo.products" id="pro"} -
{$pro.name}
{$pro.spu}
+ {eq name="pro.is_new" value="1"}
New
+ {/eq}
{/volist}
{/volist} - {/block} {block name="script"}