pixel il y a 5 ans
Parent
commit
717ccb7d41

+ 3 - 4
QMPlusServer/controller/api/api.go

@@ -9,17 +9,16 @@ import (
 )
 
 type CreateApiParams struct {
-	AuthorityId uint   `json:"-"`
 	Path        string `json:"path"`
 	Description string `json:"description"`
 }
 
 type DeleteApiParams struct {
-	AuthorityId uint `json:"-"`
+	Path uint `json:"path"`
 }
 
 // @Tags Api
-// @Summary 为指定角色创建api
+// @Summary 创建基础api
 // @Security ApiKeyAuth
 // @accept application/json
 // @Produce application/json
@@ -38,7 +37,7 @@ func CreateApi(c *gin.Context) {
 }
 
 // @Tags Api
-// @Summary 删除指定角色api
+// @Summary 删除指定api
 // @Security ApiKeyAuth
 // @accept application/json
 // @Produce application/json

+ 9 - 4
QMPlusServer/docs/docs.go

@@ -1,6 +1,6 @@
 // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
 // This file was generated by swaggo/swag at
-// 2019-09-22 15:52:19.9796956 +0800 CST m=+0.472771301
+// 2019-09-22 17:09:11.1201116 +0800 CST m=+0.066820301
 
 package docs
 
@@ -42,7 +42,7 @@ var doc = `{
                 "tags": [
                     "Api"
                 ],
-                "summary": "为指定角色创建api",
+                "summary": "创建基础api",
                 "parameters": [
                     {
                         "description": "创建api",
@@ -81,7 +81,7 @@ var doc = `{
                 "tags": [
                     "Api"
                 ],
-                "summary": "删除指定角色api",
+                "summary": "删除指定api",
                 "parameters": [
                     {
                         "description": "删除api",
@@ -782,7 +782,12 @@ var doc = `{
             }
         },
         "api.DeleteApiParams": {
-            "type": "object"
+            "type": "object",
+            "properties": {
+                "path": {
+                    "type": "integer"
+                }
+            }
         },
         "api.DeleteAuthorityPatams": {
             "type": "object",

+ 8 - 3
QMPlusServer/docs/swagger.json

@@ -25,7 +25,7 @@
                 "tags": [
                     "Api"
                 ],
-                "summary": "为指定角色创建api",
+                "summary": "创建基础api",
                 "parameters": [
                     {
                         "description": "创建api",
@@ -64,7 +64,7 @@
                 "tags": [
                     "Api"
                 ],
-                "summary": "删除指定角色api",
+                "summary": "删除指定api",
                 "parameters": [
                     {
                         "description": "删除api",
@@ -765,7 +765,12 @@
             }
         },
         "api.DeleteApiParams": {
-            "type": "object"
+            "type": "object",
+            "properties": {
+                "path": {
+                    "type": "integer"
+                }
+            }
         },
         "api.DeleteAuthorityPatams": {
             "type": "object",

+ 5 - 2
QMPlusServer/docs/swagger.yaml

@@ -47,6 +47,9 @@ definitions:
         type: string
     type: object
   api.DeleteApiParams:
+    properties:
+      path:
+        type: integer
     type: object
   api.DeleteAuthorityPatams:
     properties:
@@ -130,7 +133,7 @@ paths:
             type: string
       security:
       - ApiKeyAuth: []
-      summary: 为指定角色创建api
+      summary: 创建基础api
       tags:
       - Api
   /api/deleteApi:
@@ -154,7 +157,7 @@ paths:
             type: string
       security:
       - ApiKeyAuth: []
-      summary: 删除指定角色api
+      summary: 删除指定api
       tags:
       - Api
   /api/getApiList:

+ 4 - 3
QMPlusVuePage/src/main.js

@@ -5,18 +5,19 @@ import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 Vue.use(ElementUI);
 // 引入封装的router
+import router from '@/router/index'
 
+// canvas背景插件
 import vueParticleLine from 'vue-particle-line'
 import 'vue-particle-line/dist/vue-particle-line.css'
 Vue.use(vueParticleLine)
-    // canvas背景插件
 
-import router from '@/router/index'
+
 import '@/permission'
 import { store } from '@/store/index'
 Vue.config.productionTip = false
 
-
+// 路由守卫
 import Bus from '@/utils/bus.js'
 Vue.use(Bus)
 new Vue({