<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2017/11/20
 * Time: 15:50
 */
//分销
Route::group(['domain' => env('CHANNEL_DOMAIN'), 'namespace' => 'App\Http\Controllers\Channel\Welfare'], function () {
    //抽奖页面
    Route::get('welfare/prizeView', 'WelfareController@prizeView');
    //抽奖
    Route::get('api/Welfare/prize', 'WelfareController@prize');

    Route::group(['middleware' => 'ChannelApiAuth'], function () {
        //分销登录检测是否有抽奖名额
        Route::get('api/Welfare/welfare', 'WelfareController@welfare');
    });
});


//管理后台
Route::group(['domain' => env('MANAGE_DOMAIN'), 'namespace' => 'App\Http\Controllers\Manage\Welfare', 'middleware' => 'ManageApiAuth'], function () {

    //添加活动推广图书数据
    Route::post('api/Welfare/addWelfarePromotionBook', 'WelfareController@add_welfare_promotion_book');

    //获取活动推广图书数据
    Route::get('api/Welfare/getWelfarePromotionBook', 'WelfareController@get_welfare_promotion_books');

    //修改活动推广图书数据
    Route::post('api/Welfare/updateWelfarePromotionBook', 'WelfareController@updateWelfarePromotionBook');

    //导出活动推广图书数据
    Route::get('api/Welfare/exportWelfarePromotionBook', 'WelfareController@export_welfare_promotion_books');
});