<?php

use think\facade\Route;

/**
 * 小程序授权第三方平台 相关路由
 */
Route::group('open', function () {
    Route::get('auth_url/:type', 'v1.merchant.Open/createAuthUrl')->name('createAuthUrl');//生成小程序授权地址
    Route::post('get/:info_type', 'v1.merchant.Open/getInfoForFront')->name('getInfoForFront');//获取信息
    Route::post('redirect/:mer_id', 'v1.merchant.Open/wxAuthRedirect');//接收授权码
})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
    \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
    \app\adminapi\middleware\AdminCkeckRole::class
]);