<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;


// 注册路由到index模块的News控制器的read操作
/*Route::get(['/', '/:d'], 'index/index');
Route::get(['/well', '/w'], 'index/wellCome');
Route::get('/s', 'index/wellCome');*/


//推荐这种风格 注明控制器
/*IndexController*/
/*Route::rule([
    '/' => 'index/index',
    '/well' => 'index/wellCome',
    '/re' => 'index/read'
], '', 'GET|POST');
// 检测路由规则仅GET请求有效
Route::any('new/:id','News/read',['method'=>'get']);
// 检测路由规则仅GET和POST请求有效
Route::any('new/:id','News/read',['method'=>'get|post']);

Route::get('/he/:id', 'index/hello');

/*StoreController
Route::rule([
    '/saveStore' => 'store/save'
], '', 'GET');


/*Error
Route::rule(['/city/:name' => 'error/index'] , '' ,'GET');*/

Route::group('index',[
    'member' => ['index/member.index/member',['method' => 'get']]
]);
Route::group('api',[
    //get
    'sendSms/:phone' => ['api/member/sendSms', ['method' => 'get']],   //发送短信
    'index' => ['api/member/index', ['method' => 'get']],

    
    //post member
    'login' => ['api/member/login',['method' => 'post']],           //c端登陆
    'invite' => ['api/member/invite',['method'=> 'post']],  //邀请注册
    'register' => ['api/member/register',['method'=> 'post']],  //邀请注册

    //post shop
     'shopList' => ['api/shop/getShopList', ['method' => 'post']],
     'shopDetail' => ['api/shop/getShopDetail', ['method' => 'get']],

]);
    