From bc3cc334c0dede7fdfbd24c1a3d9f5193c779f30 Mon Sep 17 00:00:00 2001 From: pushuo <229102104@qq.com> Date: Fri, 1 Jul 2022 14:24:19 +0800 Subject: [PATCH] wip --- .../admin/views/pages/plugins/index.blade.php | 65 ++++++++++--------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/resources/beike/admin/views/pages/plugins/index.blade.php b/resources/beike/admin/views/pages/plugins/index.blade.php index d335b4f1..a92eb10a 100644 --- a/resources/beike/admin/views/pages/plugins/index.blade.php +++ b/resources/beike/admin/views/pages/plugins/index.blade.php @@ -13,33 +13,32 @@ # 插件类型 - 插件描述 + 插件描述 状态 操作 - @{{ plugin->code }} - @{{ plugin->type }} + @{{ plugin.code }} + @{{ plugin.type }}
-
+
-
@{{ plugin->name }}
-
+
@{{ plugin.name }}
+
-{{--
- getEnabled() ? 'checked' : '' }} data-code="@{{ plugin->code }}"> - -
--}} + - 编辑 + 编辑 + 安装 + 卸载 + {{-- 安装 --}} @@ -63,27 +62,31 @@ }, methods: { + pluginStatusChange(e, code) { + const self = this; + $.ajax({ + url: `/admin/plugins/${code}/status`, + type: 'PUT', + data: {status: e * 1}, + success: function(res) { + layer.msg(res.message) + }, + }) + }, + + installedPlugin(code, type) { + const self = this; + + $.ajax({ + url: `/admin/plugins/${code}/${type}`, + type: 'post', + success: function(res) { + layer.msg(res.message) + }, + }) + } } }) - -{{-- --}} @endpush