config('admin.route.prefix'), 'namespace' => config('admin.route.namespace'), 'middleware' => config('admin.route.middleware'), 'as' => config('admin.route.prefix') . '.', ], function (Router $router) { $router->get('/', 'HomeController@index')->name('home'); //上传图片 $router->resource('upload', 'UploadController'); //Banner管理 $router->resource('banner', 'BannerController'); //专家来了-一级栏目管理 $router->resource('specialist_column', 'SpecialistColumnController'); //专家来了-二级栏目管理 $router->resource('specialist_column_second', 'SpecialistColumnSecondController'); //只显示对应的二级栏目 $router->get('/second_column', 'SpecialistColumnSecondController@secondCloumn')->name('second_column'); //专家来了-内容管理 $router->resource('specialist_content', 'SpecialistContentController'); //专家来了-标签管理 $router->resource('specialist_tag', 'SpecialistColumnTagController'); //只显示对应的标签列表 $router->get('/tags', 'SpecialistColumnTagController@tags')->name('tags'); //心理大厅-训练-分类 $router->resource('train_category', 'TrainCategoryController'); //获取下级分类 $router->get('/lowerLevel', 'TrainCategoryController@lowerLevel'); //心理大厅-训练-内容-课程 $router->resource('mentality_drill_subject', 'MentalityDrillsSubjectController'); //心理大厅-训练-内容 $router->resource('mentality-drills', 'TrainDrillController'); //心理大厅-训练-内容-音视频 $router->resource('mentality-drill-extends', 'MentalityDrillExtendController'); //心情等级 $router->resource('diary-mood-levels', 'DiaryMoodLevelController'); //心情标签 $router->resource('diary-mood-tags', 'DiaryMoodTagController'); //睡眠等级 $router->resource('diary-sleep-levels', 'DiarySleepLevelController'); //量表分类 $router->resource('scale-categories', 'ScaleCategoryController'); //量表 $router->get('/scale_second_category', 'ScaleController@getSecondCategory'); $router->resource('scales', 'ScaleController'); //系统配制 $router->resource('sys-configs', 'SysConfigController'); //APP版本 $router->resource('sys-versions', 'SysVersionController'); //活动 $router->resource('activities', 'FourActivityController'); //活动区域 $router->resource('activity-ranges', 'ActivityRangeController'); //聊天 $router->resource('chat', 'ChatController'); //远程授权登录 $router->get('remoteSso', "RemoteSsoController@login"); $router->get('admin_config', "AdminConfigController@index"); // $router->post('send_im_message', 'SendImMessageController@sendImMessage')->name('send_im_message'); // $router->get('get_im_message_list', 'SendImMessageController@getImMessageList')->name('get_im_message_list'); // $router->get('get_im_message_detail', 'SendImMessageController@getImMessageDetail')->name('get_im_message_detail'); }); // Route::group([ // 'prefix' => config('admin.route.prefix'), // 'namespace' => config('admin.route.namespace'), // 'middleware' => ['psyUserSso'], // 'as' => config('admin.route.prefix') . '.', // ], function (Router $router) { // $router->resource('activities', 'FourActivityController'); // }); Route::get('/admin/ssoIndex', [FourActivityController::class, 'ssoIndex'])->middleware('psyUserSso'); Route::resource('/admin/activity', FourActivityController::class)->middleware(['psyUserSso','web']); //测试 Route::get('admin/openweixin/index', OpenWeixinController::class.'@index'); Route::post('admin/openweixin/index', OpenWeixinController::class.'@index'); Route::get('admin/openweixin/auth', OpenWeixinController::class.'@auth'); Route::post('admin/openweixin/auth', OpenWeixinController::class.'@auth'); Route::get('admin/openweixin/callback', OpenWeixinController::class.'@callback'); Route::post('admin/openweixin/callback', OpenWeixinController::class.'@callback'); Route::post('admin/openweixin/getThirdToken', OpenWeixinController::class.'@getThirdToken'); Route::get('admin/openweixin/getThirdToken', OpenWeixinController::class.'@getThirdToken'); Route::post('admin/openweixin/index/{appId}', function ($appId) { // ... $config = [ 'app_id' => 'wxe81efa7fd6a5fd53', 'secret' => '7d22f52938e4c9fbb5f2d07e8f5b83b6', 'token' => '6lfq90croi6nsyia63vbhaqnq4lzm66d', 'aes_key' => 'uOIvZHtyDKKd7xT4KKgpikGOtgW7ZskeOzVIFgIs2SM' ]; $openPlatform = Factory::openPlatform($config); // 第三方平台接入处理 $officialAccount = $openPlatform->officialAccount($appId); $server = $officialAccount->server; // ❗️❗️ 这里的 server 为授权方的 server,而不是开放平台的 server,请注意!!! // $server->push(function () { // return 'Welcome!'; // }); return $server->serve(); });