<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use App\Http\Controllers\Controller;
Route::get('/', [Controller::class, 'web']);

Route::get('test', [Controller::class, 'test']);
Route::get('test2', [Controller::class, 'test2']);

Route::get('error/logs', [Controller::class, 'errorLogs']);
Route::get('error/logs/{log}', [Controller::class, 'errorLog']);

Route::get('sync/saas/users', [Controller::class, 'syncSaasUser']);

//酒码授权链接
Route::get('wine/{wine_code}', [\App\Http\Controllers\H5\WechatController::class, 'wineCodeAuth']);
Route::get('package/{pack_code}', [\App\Http\Controllers\H5\WechatController::class, 'packCodeAuth']);

//经销商 从excel中缓存数据
Route::get("import/agent/users", [Controller::class, 'importAgentUsers']);
//从缓存数据中生成经销商订单
Route::get("test/agent/order", [Controller::class, "testAgentOrder"]);
Route::get("test/agent/activity/order", [Controller::class, "testAgentActivityOrder"]);

//同步抽奖码到抽奖活动
Route::get("sync/lotto/code", [Controller::class, "syncLottoCode"]);
//同步批发商
Route::get('sync/agent/users', [Controller::class, 'syncAgentUsers']);
//同步经销商订单
Route::get('sync/agent/orders', [Controller::class, 'syncAgentOrders']);

Route::get("sync/lottery/{id}/members", [Controller::class, 'syncLottoMember']);
Route::get("add/offline/agent/order", [Controller::class, 'addOfflineAgentOrder']);

Route::get('/test/{name}', [\App\Http\Controllers\TestController::class, "testTransfer"]);

Route::get('/band', function () {
    return redirect(config('app.url') . '/h5/#/appWatchesUse');
});