<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 路由规则
// +----------------------------------------------------------------------
use think\facade\Route;

// 分隔符
$ds = MyC('common_route_separator', '-', true);

// 商品详情
Route::get('goods'.$ds.':id', 'index/goods/index');

// 搜索
Route::get('search'.$ds.'c'.$ds.':category_id', 'index/search/index');
Route::get('search'.$ds.'b'.$ds.':brand_id', 'index/search/index');
Route::get('search'.$ds.'k'.$ds.':wd', 'index/search/index');
Route::rule('search', 'index/search/index', 'GET|POST');
Route::post('search-goods', 'index/search/goodslist');

// 分类
Route::get('category', 'index/category/index');

// 自定义页面
Route::get('custom'.$ds.':id', 'index/customview/index');

// 购物车
Route::get('cart', 'index/cart/index');

// 订单确认
Route::rule('buy', 'index/buy/index', 'GET|POST');
Route::post('buy-add', 'index/buy/add');

// 文章
Route::get('article-category'.$ds.'[:id]', 'index/article/category');
Route::get('article'.$ds.':id', 'index/article/index');

// 页面设计
Route::get('design'.$ds.':id', 'index/design/index');

// 用户
Route::get('login', 'index/user/logininfo');
Route::get('login'.$ds.'modal', 'index/user/modallogininfo');
Route::get('regster', 'index/user/reginfo');
Route::get('regster'.$ds.'sms', 'index/user/smsreginfo');
Route::get('regster'.$ds.'email', 'index/user/emailreginfo');
Route::get('forget', 'index/user/forgetpwdinfo');
Route::get('logout', 'index/user/logout');

// 插件调用
Route::rule(':pluginsname'.$ds.'[:pluginscontrol]'.$ds.'[:pluginsaction]'.$ds.'[:id]','index/plugins/index')->completeMatch();
Route::rule(':pluginsname'.$ds.':pluginscontrol'.$ds.':pluginsaction'.$ds.'[:id]','index/plugins/index');
?>