Browse Source

Merge branches 'gva_gormv2_dev' and 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev

 Conflicts:
	server/core/install_plugs.go
	server/initialize/plug.go
	server/model/sys_authority.go
QM303176530 4 years ago
parent
commit
2544de95cb

+ 1 - 1
.github/FUNDING.yml

@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
 liberapay: # Replace with a single Liberapay username
 issuehunt: # Replace with a single IssueHunt username
 otechie: # Replace with a single Otechie username
-custom: http://doc.henrongyi.top/more/coffee.html#%E6%8D%90%E8%B5%A0
+custom: https://www.gin-vue-admin.com/docs/coffee

+ 0 - 22
server/core/install_plugs.go

@@ -1,22 +0,0 @@
-package core
-
-import (
-	"github.com/gin-gonic/gin"
-)
-
-func InstallPlugs(route *gin.Engine) {
-	//gorm 升级v2 插件暂时没有升级 插件示例功能暂时不可用
-	//GvaPlugsGroupBase := route.Group("") // 纯净路由 插件可通用 传递给插件的0号位置 为了不让插件的自动路由出问题 这里建议为 ""
-	///**安装一个插件需要的步骤 start**/
-	//GvaPlugsGroupMiddle := route.Group("") // 携带中间件的路由 传递给插件的1号位置 为了不让插件的自动路由出问题 这里建议为 ""
-	//GvaPlugsGroupMiddle.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
-	//// 插件安装 暂时只是后台功能 添加model 添加路由 添加对数据库的操作  详细插件测试模板可看https://github.com/piexlmax/gvaplug  此处不建议投入生产
-	//err := initialize.InstallPlug(global.GVA_DB, [2]*gin.RouterGroup{
-	//	GvaPlugsGroupBase,
-	//	GvaPlugsGroupMiddle,
-	//}, gvaplug.GvaPlug{SomeConfig: "插件给用户提供的配置区域"})
-	//if err != nil {
-	//	panic(fmt.Sprintf("插件安装失败: %v", err))
-	//}
-	///**安装一个插件需要的步骤 end**/
-}

+ 0 - 3
server/core/server.go

@@ -19,9 +19,6 @@ func RunWindowsServer() {
 	Router := initialize.Routers()
 	Router.Static("/form-generator", "./resource/page")
 
-	//InstallPlugs(Router)
-	// end 插件描述
-
 	address := fmt.Sprintf(":%d", global.GVA_CONFIG.System.Addr)
 	s := initServer(address, Router)
 	// 保证文本顺序输出

+ 0 - 23
server/initialize/plug.go

@@ -1,23 +0,0 @@
-package initialize
-
-import (
-	"github.com/gin-gonic/gin"
-	"gorm.io/gorm"
-)
-
-type Plug interface {
-	InitRouter([2]*gin.RouterGroup) error
-	InitModel(*gorm.DB) error
-}
-
-func InstallPlug(db *gorm.DB, router [2]*gin.RouterGroup, p Plug) (err error) {
-	err = p.InitModel(db)
-	if err != nil {
-		return err
-	}
-	err = p.InitRouter(router)
-	if err != nil {
-		return err
-	}
-	return nil
-}

+ 1 - 1
server/model/sys_authority.go

@@ -8,7 +8,7 @@ type SysAuthority struct {
 	CreatedAt       time.Time
 	UpdatedAt       time.Time
 	DeletedAt       *time.Time     `sql:"index"`
-	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"`
+	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:'角色ID';size:90"`
 	AuthorityName   string         `json:"authorityName" gorm:"comment:'角色名'"`
 	ParentId        string         `json:"parentId" gorm:"comment:'父角色ID'"`
 	DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`

+ 0 - 1
web/src/view/layout/aside/index.vue

@@ -45,7 +45,6 @@ export default {
             params[item.key] = item.value;
           }
         });
-      console.log(query, params);
       if (index === this.$route.name) return;
       this.$router.push({ name: index, query, params });
     }