插件功能更新 修改插件包的实现方案

This commit is contained in:
QM303176530
2020-06-11 23:52:25 +08:00
parent 98eb6bd796
commit 8ec30ac3b7
2 changed files with 6 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/initialize"
"github.com/piexlmax/gvaplug"
"net/http"
"time"
)
@@ -17,10 +18,10 @@ func RunWindowsServer() {
Router.Static("/form-generator", "./resource/page")
// 插件安装 暂时只是后台功能 添加model 添加路由 添加对数据库的操作 详细插件测试模板可看https://github.com/piexlmax/gvaplug 此处不建议投入生产
//err := initialize.InstallPlug(global.GVA_DB, Router, gvaplug.GvaPlug{})
//if err != nil {
// panic(fmt.Sprintf("插件安装失败: %v", err))
//}
err := initialize.InstallPlug(global.GVA_DB, Router, gvaplug.GvaPlug{})
if err != nil {
panic(fmt.Sprintf("插件安装失败: %v", err))
}
// end 插件描述
address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)