Browse Source

route

master
林一峰 7 years ago
parent
commit
a060527806
  1. 2
      app/Http/Controllers/Admin/CategoryController.php
  2. 2
      resources/views/admin/product/index.blade.php
  3. 4
      routes/web.php

2
app/Http/Controllers/Admin/CategoryController.php

@ -74,7 +74,7 @@ class CategoryController extends CommonController
$data['id'] = $id; $data['id'] = $id;
$post = object_to_array(DB::table('arctype')->where('id', $id)->first(), 1); $post = object_to_array(DB::table('arctype')->where('id', $id)->first(), 1);
$reid = $post['reid'];
$reid = $post['pid'];
if($reid!=0){$data['postone'] = object_to_array(DB::table('arctype')->where('id', $reid)->first());} if($reid!=0){$data['postone'] = object_to_array(DB::table('arctype')->where('id', $reid)->first());}
$data['post'] = $post; $data['post'] = $post;

2
resources/views/admin/product/index.blade.php

@ -22,7 +22,7 @@
<td><input name="arcID" type="checkbox" value="<?php echo $row->id; ?>" class="np"></td> <td><input name="arcID" type="checkbox" value="<?php echo $row->id; ?>" class="np"></td>
<td><a href="/fladmin/product/edit?id=<?php echo $row->id; ?>"><?php echo $row->title; ?></a> <?php if(!empty($row->litpic)){echo "<small style='color:red'>[图]</small>";}if($row->tuijian==1){echo "<small style='color:#22ac38'>[荐]</small>";} ?> </td> <td><a href="/fladmin/product/edit?id=<?php echo $row->id; ?>"><?php echo $row->title; ?></a> <?php if(!empty($row->litpic)){echo "<small style='color:red'>[图]</small>";}if($row->tuijian==1){echo "<small style='color:#22ac38'>[荐]</small>";} ?> </td>
<td><?php echo date('Y-m-d',$row->pubdate); ?></td> <td><?php echo date('Y-m-d',$row->pubdate); ?></td>
<td><a href="/fladmin/product?id=<?php echo $row->typeid; ?>"><?php echo $row->name; ?></a></td><td><?php echo $row->click; ?></td><td><a target="_blank" href="<?php echo route('product',['id'=>$row->id]); ?>">预览</a>&nbsp;<a href="/fladmin/product/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/product/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
<td><a href="/fladmin/product?id=<?php echo $row->typeid; ?>"><?php echo $row->name; ?></a></td><td><?php echo $row->click; ?></td><td><a target="_blank" href="<?php echo route('home_product',['id'=>$row->id]); ?>">预览</a>&nbsp;<a href="/fladmin/product/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/product/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
</tr> </tr>
<?php }} ?> <?php }} ?>
<tr> <tr>

4
routes/web.php

@ -25,7 +25,7 @@ Route::group(['domain' => env('APP_SUBDOMAIN'), 'namespace' => 'Wap'], function
Route::get('/page/{id}', 'IndexController@page')->name('wap_singlepage'); //单页 Route::get('/page/{id}', 'IndexController@page')->name('wap_singlepage'); //单页
Route::get('/goods/{id}', 'IndexController@product')->name('wap_product'); //商品详情页 Route::get('/goods/{id}', 'IndexController@product')->name('wap_product'); //商品详情页
Route::get('/product{cat}/{page}', 'IndexController@productcat'); //产品分类页,分页 Route::get('/product{cat}/{page}', 'IndexController@productcat'); //产品分类页,分页
Route::get('/product{cat}', 'IndexController@productcat')->name('productcat'); //产品分类页
Route::get('/product{cat}', 'IndexController@productcat')->name('wap_productcat'); //产品分类页
Route::get('/sitemap.xml', 'IndexController@sitemap')->name('wap_sitemap');//sitemap Route::get('/sitemap.xml', 'IndexController@sitemap')->name('wap_sitemap');//sitemap
}); });
@ -44,7 +44,7 @@ Route::group(['namespace' => 'Home'], function () {
Route::get('/page/{id}', 'IndexController@page')->name('home_singlepage'); //单页 Route::get('/page/{id}', 'IndexController@page')->name('home_singlepage'); //单页
Route::get('/goods/{id}', 'IndexController@product')->name('home_product'); //商品详情页 Route::get('/goods/{id}', 'IndexController@product')->name('home_product'); //商品详情页
Route::get('/product{cat}/{page}', 'IndexController@productcat'); //产品分类页,分页 Route::get('/product{cat}/{page}', 'IndexController@productcat'); //产品分类页,分页
Route::get('/product{cat}', 'IndexController@productcat')->name('productcat'); //产品分类页
Route::get('/product{cat}', 'IndexController@productcat')->name('home_productcat'); //产品分类页
Route::get('/sitemap.xml', 'IndexController@sitemap')->name('home_sitemap');//sitemap Route::get('/sitemap.xml', 'IndexController@sitemap')->name('home_sitemap');//sitemap
Route::get('/aaa', function () { Route::get('/aaa', function () {

Loading…
Cancel
Save