<?php

Route::group([
    'namespace' => 'Customers',
    'prefix'  => 'customers',
    'as' => 'customers.'
], function() {
//    Route::post('/login', 'CustomerController@login')->name('login');
//    Route::post('/loginViaSms', 'CustomerController@loginViaSms')->name('loginViaSms');
//    Route::post('/loginViaThirdParty', 'CustomerController@loginViaThirdParty')->name('loginViaThirdParty');
//    Route::post('/register', 'CustomerController@register')->name('register');
//    Route::post('/sms', 'CustomerController@sms')->name('sms');
//    Route::post('/resetPassword', 'CustomerController@resetPassword')->name('resetPassword');
//    Route::post('/headerUpdateCallback', 'CustomerController@headerUpdateCallback')->name('headerUpdateCallback');
//    Route::get('/refreshToken', 'CustomerController@refreshToken')->name('refreshToken');
//    Route::get('/checkToken', 'CustomerController@checkToken')->name('checkToken');
//    Route::get('/alipay_auth_info', 'CustomerController@alipay_auth_info')->name('alipay_auth_info');
//    Route::post('/loginViaAlipay', 'CustomerController@loginViaAlipay')->name('alipay_login');
    Route::post('/loginWechatViaMiniprogram', 'CustomerController@loginWechatViaMiniprogram')->name('wechat_miniprogram_login');

    Route::post('/wePayCallback','WeChatController@wePayCallBack');

    Route::get('/test','TestController@index');
    Route::post('/test/wePayCallback','WeChatController@testPayCallBack');
    Route::post('/open/multiple','TestController@openMultiple');

    //支付宝登录
    Route::post('/loginViaAlipay', 'CustomerController@loginViaAlipay')->name('ali_miniprogram_login');
    //手动归还充电宝
    Route::post('/manualReturn', 'OnenetController@manualReturn')->name('php_manualReturn');
    //手动弹出充电宝
    Route::post('/manualTakeOut', 'TestController@manualTakeOut')->name('php_manualTakeOut');
    Route::get('/nowtime', 'TestController@nowTime')->name('php_nowTime');

    Route::get('/tool/testshell', 'TestController@testShell');//循环弹出
    Route::get('/tool/testopenmultiple', 'TestController@toolOpenMultiple');//弹一个

    Route::get('/phpinfoshow', function (){
        return phpinfo();
    });//循环弹出

    Route::group([
        'middleware' => 'apiAuth'
    ], function() {

//        Route::get('/headImageUploadToken', 'CustomerController@headImageUploadToken')->name('headImageUploadToken');
//        Route::get('/current', 'CustomerController@current')->name('current');
//        Route::put('/current', 'CustomerController@update')->name('updateUser');
//        Route::post('/logout', 'CustomerController@logout')->name('logout');
//        Route::post('/wechatOpenId', 'CustomerController@wechatOpenId')->name('wechatOpenId');

        Route::post('/scan', 'RentController@scan');
        Route::post('/rent', 'RentController@makeOrder');
        Route::post('/rent/detail', 'RentController@detail');
        Route::post('rent/orderStatus', 'RentController@orderStatus');

        Route::post('/subscribe/scan', 'RentController@subscribeScan');
        Route::post('/subscribe/rent', 'RentController@makeSubscribeOrder');
        Route::post('/subscribe/check', 'RentController@check');

        Route::post('/subscribe/status', 'RentController@subscribeStatus');


        Route::post('/rentRecord','RentController@myRecord');
        Route::post('/rentRecord/detail','RentController@myRecordDetail');

        Route::post('/package/rent','RentController@packageRent');


        Route::post('/checkOrderStatus', 'RentController@checkOrderStatus');


        Route::post('/take', 'RentController@take');
        Route::post('/nearbyMachine', 'MachineController@nearby');
        Route::post('/weGuideScan', 'WeGuideController@scan');
        Route::post('/weGuideMakeOrder', 'WeGuideController@MakeOrder');
        Route::post('/weGuideShare', 'WeGuideController@shareSpotInfo');
        Route::post('/weGuideExplains', 'WeGuideController@getExplains');
        Route::post('/weGuideShareHuman', 'WeGuideController@shareHuman');
        Route::post('/weGuideReceive', 'WeGuideController@Receive');
        Route::post('/weGuideRecord', 'WeGuideController@record');


        //优惠券
        Route::post('/checkPhone', 'CouponController@checkPhone');
        Route::post('/sendCode', 'CouponController@sendCode');
        Route::post('/register', 'CouponController@register');
        Route::post('/couponRecord', 'CouponController@myRecord');
        Route::post('/scanCouponView', 'CouponController@scanCouponView');
        Route::post('/couponBind', 'CouponController@couponBind');
        Route::post('/getCoupon', 'CouponController@getCoupon');



        Route::post('/money','PersonController@money');

        //同游共听
        Route::post('/getQrcode','WeGuideController@getQrcode');










    });
});

