65 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						||
// +----------------------------------------------------------------------
 | 
						||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
 | 
						||
// +----------------------------------------------------------------------
 | 
						||
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
 | 
						||
// +----------------------------------------------------------------------
 | 
						||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
 | 
						||
// +----------------------------------------------------------------------
 | 
						||
// | Author: CRMEB Team <admin@crmeb.com>
 | 
						||
// +----------------------------------------------------------------------
 | 
						||
use think\facade\Route;
 | 
						||
 | 
						||
/**
 | 
						||
 * 案例管理 相关路由
 | 
						||
 */
 | 
						||
Route::group('caseinfo', function () {
 | 
						||
 | 
						||
    /** 案例 */
 | 
						||
    Route::group(function () {
 | 
						||
        //案例资源路由
 | 
						||
        Route::resource('caseinfo', 'v1.caseinfo.Caseinfo')->option([
 | 
						||
            'real_name' => [
 | 
						||
                'index' => '获取案例列表',
 | 
						||
                'create' => '获取案例表单',
 | 
						||
                'read' => '获取案例详细信息',
 | 
						||
                'save' => '保存案例',
 | 
						||
                'edit' => '获取修改案例表单',
 | 
						||
                'update' => '修改案例',
 | 
						||
                'delete' => '删除案例'
 | 
						||
            ]
 | 
						||
        ]);
 | 
						||
        //关联商品
 | 
						||
        Route::put('caseinfo/relation/:id', 'v1.caseinfo.Caseinfo/relation')->name('Relation')->option(['real_name' => '案例关联商品']);
 | 
						||
        //取消关联
 | 
						||
        Route::put('caseinfo/unrelation/:id', 'v1.caseinfo.Caseinfo/unrelation')->name('UnRelation')->option(['real_name' => '取消案例关联商品']);
 | 
						||
    })->option(['parent' => 'caseinfo', 'cate_name' => '案例管理']);
 | 
						||
 | 
						||
    /** 案例分类 */
 | 
						||
    Route::group( function () {
 | 
						||
        //案例分类资源路由
 | 
						||
        Route::resource('category', 'v1.caseinfo.CaseCategory')->except(['read'])->option([
 | 
						||
            'real_name' => [
 | 
						||
                'index' => '获取案例分类列表',
 | 
						||
                'create' => '获取案例分类表单',
 | 
						||
                'save' => '保存案例分类',
 | 
						||
                'edit' => '获取修改案例分类表单',
 | 
						||
                'update' => '修改案例分类',
 | 
						||
                'delete' => '删除案例分类'
 | 
						||
            ]
 | 
						||
        ]);
 | 
						||
        //修改状态
 | 
						||
        Route::put('category/set_status/:id/:status', 'v1.caseinfo.CaseCategory/set_status')->name('CategoryStatus')->option(['real_name' => '修改案例分类状态']);
 | 
						||
        //分类列表
 | 
						||
        Route::get('category_list', 'v1.caseinfo.CaseCategory/categoryList')->name('categoryList')->option(['real_name' => '分类列表']);
 | 
						||
        //分类树形列表
 | 
						||
        Route::get('category_tree_list', 'v1.caseinfo.CaseCategory/getTreeList')->name('getTreeList')->option(['real_name' => '分类树形列表']);
 | 
						||
    })->option(['parent' => 'caseinfo', 'cate_name' => '案例分类']);
 | 
						||
 | 
						||
})->middleware([
 | 
						||
    \app\http\middleware\AllowOriginMiddleware::class,
 | 
						||
    \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
 | 
						||
    \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
 | 
						||
    \app\adminapi\middleware\AdminLogMiddleware::class
 | 
						||
])->option(['mark' => 'caseinfo', 'mark_name' => '案例模块']);
 |