<?php
$type = Dever::input('search')['type'] ?? 1;
if ($type == 1) {
    $data_button = array
    (
        //'访问' => array('route', 'user_tool_manage/user_pan_account', 'ChatLineSquare'),
        '访问' => array('route', array
        (
            'path' => 'user_tool_manage/user_pan_account',
            'param' => array
            (
                'set' => array('menu' => 'user_tool_manage/user_tool_list'),
            ),
        ), 'ChatLineSquare'),
        '卸载' => array('api', 'tool/app.unlock', 'Unlock'),
    );
} else {
    $data_button = array
    (
        '安装' => array('api', 'tool/app.lock', 'Lock'),
    );
}
return array
(
    'list' => array
    (
        'data' => 'tool/user.getData', 
        'where' => array('status' => 1),
        'set' => array('type' => $type),
        'type' => 'pic',
        'layout' => array
        (
            'id' => 'name',
            'image' => 'pic',
        ),
        # 展示左侧分栏
        'column' => array
        (
            'key' => 'id',
            'data' => 'tool/user.getType',
            'active' => 1,
            'where' => 'type',
        ),
        'field'      => array
        (
            'id',
            'name',
            'pic',
            'cdate',
        ),
        'button' => array
        (
            
        ),
        'data_button' => $data_button,
        'search'    => array
        (
            'name' => array
            (
                'name' => '应用名称',
            ),
            'type' => array
            (
                'name' => '类型',
                'type' => 'hidden',
                'value' => $type,
            ),
        ),
    ),
);