refactor: 修改路由命名

This commit is contained in:
2025-04-27 16:55:12 +08:00
parent e2265629f9
commit 6e5a86d84b
5 changed files with 9 additions and 9 deletions

View File

@@ -15,9 +15,9 @@ Route::get('/', 'Index/index');
// 产品相关路由
Route::group('product', function() {
// 产品分类页
Route::get('category/:id', 'Product/category')->name('product_category');
Route::get('category/:id', 'Product/category');
// 产品详情页
Route::get('detail/:id', 'Product/detail')->name('product_detail');
Route::get('detail/:id', 'Product/detail');
// 产品询盘
Route::post('inquiry', 'Product/inquiry');
// 新品上市

View File

@@ -18,13 +18,13 @@
<h1 class="ori-pd-title">
<span>{$vo.name}</span>
{eq name="vo.level" value="2"}
<a href="{:url('product_category', ['id' => $vo.id])}">查看更多</a>
<a href="{:url('product/category', ['id' => $vo.id])}">查看更多</a>
{/eq}
</h1>
{notempty name="vo.products"}
<div class="ori-pd-list">
{volist name="vo.products" id="vp"}
<a class="oripditem" href="{:url('product_detail', ['id' => $vp.id])}">
<a class="oripditem" href="{:url('product/detail', ['id' => $vp.id])}">
<div>
{volist name="vp.sku" id="vs" key="vs_idx"}
<img src="{$vs.main_image}" id="sku_image_{$vs.id}" class="prdimg {eq name='vs_idx' value='1'}prdimg-show{/eq}" />

View File

@@ -22,7 +22,7 @@
<a class="pathname" href="/">首页</a>
{volist name="product_categorys" id="ca"}
<div class="arrow"></div>
<a class="pathname" href="{:url('product_category', ['id' => $ca.id])}">{$ca.name}</a>
<a class="pathname" href="{:url('product/category', ['id' => $ca.id])}">{$ca.name}</a>
{/volist}
</div>
<!-- 产品主图切换和参数详情-->

View File

@@ -12,7 +12,7 @@
<p class="ftitle">{:lang('footer_navigation.product_categorys')}</p>
<ul>
{volist name="header_categorys" id="vo"}
<li><a href="{:url('product_index', ['id' => $vo.id])}" class="fline">{$vo.name}</a></li>
<li><a href="{:url('product/category', ['id' => $vo.id])}" class="fline">{$vo.name}</a></li>
{/volist}
</ul>
</div>

View File

@@ -33,11 +33,11 @@
{volist name="vo.children" id="vc"}
<dl class="nav_cyrightit">
<dt>
<a href="{:url('product_category', ['id' => $vc.id])}">{$vc.name}</a>
<a href="{:url('product/category', ['id' => $vc.id])}">{$vc.name}</a>
</dt>
{volist name="vc.children" id="vcc"}
<dd>
<a href="{:url('product_category', ['id' => $vcc.id])}">{$vcc.name}</a>
<a href="{:url('product/category', ['id' => $vcc.id])}">{$vcc.name}</a>
</dd>
{/volist}
<dl>
@@ -106,7 +106,7 @@
<div class="popmain">
{volist name="header_hot_products" id="vo"}
<div class="popitem">
<a href="{:url('product_detail', ['id' => $vo.id])}"><img src="{$vo.cover_image}"
<a href="{:url('product/detail', ['id' => $vo.id])}"><img src="{$vo.cover_image}"
class="popimg" /></a>
<div class="productName">{$vo.name}</div>
</div>