mirror of
				https://gitee.com/technical-laohu/mpay.git
				synced 2025-11-04 08:43:42 +08:00 
			
		
		
		
	插件逻辑更新
This commit is contained in:
		@@ -11,9 +11,11 @@ class PluginController extends BaseController
 | 
			
		||||
    // 获取插件列表
 | 
			
		||||
    public function getPluginList()
 | 
			
		||||
    {
 | 
			
		||||
        $plugin_config = self::getPluginConfig();
 | 
			
		||||
 | 
			
		||||
        $local_plugin_config = self::getPluginConfig();
 | 
			
		||||
        $plugin_config = \Plugin::getPluginList($local_plugin_config);
 | 
			
		||||
        if ($plugin_config) {
 | 
			
		||||
            return json(['code' => 0, 'msg' => 'OK', 'count' => \count($plugin_config), 'data' => $plugin_config]);
 | 
			
		||||
            return json(['code' => 0, 'msg' => 'OK', 'count' => count($plugin_config), 'data' => $plugin_config]);
 | 
			
		||||
        } else {
 | 
			
		||||
            return json(['code' => 1, 'msg' => '无数据记录', 'count' => 0, 'data' => []]);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -84,12 +84,14 @@
 | 
			
		||||
            table.on('toolbar(plugin-table)', function (obj) {
 | 
			
		||||
                if (obj.event === 'showAllPlugin') {
 | 
			
		||||
                    plugin.changClass(this);
 | 
			
		||||
                    table.reload('plugin-table', { where: { show: 0 } });
 | 
			
		||||
                } else if (obj.event === 'showInstalled') {
 | 
			
		||||
                    plugin.changClass(this);
 | 
			
		||||
                    table.reload('plugin-table', { where: { show: 1 } });
 | 
			
		||||
                } else if (obj.event === 'showWaitInstall') {
 | 
			
		||||
                    plugin.changClass(this);
 | 
			
		||||
                    table.reload('plugin-table', { where: { show: 2 } });
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
            });
 | 
			
		||||
            // 单元格事件
 | 
			
		||||
            table.on('tool(plugin-table)', function (obj) {
 | 
			
		||||
@@ -111,8 +113,9 @@
 | 
			
		||||
                return false;
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            // 处理点击btn切换class
 | 
			
		||||
            let plugin = {};
 | 
			
		||||
 | 
			
		||||
            // 处理点击btn切换class
 | 
			
		||||
            plugin.changClass = (ele) => {
 | 
			
		||||
                const select = 'layui-btn layui-btn-primary layui-bg-green layui-btn-sm';
 | 
			
		||||
                const unselect = 'layui-btn layui-btn-primary layui-bg-gray layui-btn-sm';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user