@@ -1,6 +1,7 @@ | |||
package hdl | |||
import ( | |||
implement2 "applet/app/db/implement" | |||
"applet/app/e" | |||
"applet/app/enum" | |||
"applet/app/md" | |||
@@ -106,3 +107,26 @@ func MenuList(c *gin.Context) { | |||
}, nil) | |||
return | |||
} | |||
// GetBaseInfo | |||
// @Summary 获取系统信息 | |||
// @Tags 公共模块-获取系统信息 | |||
// @Description 获取系统信息 | |||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||
// @Accept json | |||
// @Produce json | |||
// @Success 200 {string} "success" | |||
// @Failure 400 {object} md.Response "具体错误" | |||
// @Router /api/comm/basicGet [GET] | |||
func GetBaseInfo(c *gin.Context) { | |||
masterId := svc.GetMasterId(c) | |||
engine := db.DBs[masterId] | |||
sysCfgDb := implement2.NewSysCfgDb(engine, masterId) | |||
res := sysCfgDb.SysCfgFindWithDb(enum.AppLogo, enum.AppName) | |||
e.OutSuc(c, md.BasicSetResp{ | |||
AppName: res[enum.AppName], | |||
AppLogo: res[enum.AppLogo], | |||
}, nil) | |||
return | |||
} |
@@ -80,7 +80,8 @@ func route(r *gin.RouterGroup) { | |||
} | |||
func rComm(r *gin.RouterGroup) { | |||
r.POST("/getMenuList", hdl.MenuList) // 获取菜单栏列表 | |||
r.GET("/getBaseInfo", hdl.GetBaseInfo) // 获取系统信息 | |||
r.POST("/getMenuList", hdl.MenuList) // 获取菜单栏列表 | |||
} | |||
func rSetCenter(r *gin.RouterGroup) { | |||
@@ -25,6 +25,44 @@ const docTemplate = `{ | |||
"host": "{{.Host}}", | |||
"basePath": "{{.BasePath}}", | |||
"paths": { | |||
"/api/comm/basicGet": { | |||
"get": { | |||
"description": "获取系统信息", | |||
"consumes": [ | |||
"application/json" | |||
], | |||
"produces": [ | |||
"application/json" | |||
], | |||
"tags": [ | |||
"公共模块-获取系统信息" | |||
], | |||
"summary": "获取系统信息", | |||
"parameters": [ | |||
{ | |||
"type": "string", | |||
"description": "验证参数Bearer和token空格拼接", | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
} | |||
], | |||
"responses": { | |||
"200": { | |||
"description": "success", | |||
"schema": { | |||
"type": "string" | |||
} | |||
}, | |||
"400": { | |||
"description": "具体错误", | |||
"schema": { | |||
"$ref": "#/definitions/md.Response" | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
"/api/dataCenter/generate/data/detail": { | |||
"post": { | |||
"description": "数据中心-分成数据-详情", | |||
@@ -17,6 +17,44 @@ | |||
}, | |||
"host": "localhost:1001 or advertisement.dengbiao.top", | |||
"paths": { | |||
"/api/comm/basicGet": { | |||
"get": { | |||
"description": "获取系统信息", | |||
"consumes": [ | |||
"application/json" | |||
], | |||
"produces": [ | |||
"application/json" | |||
], | |||
"tags": [ | |||
"公共模块-获取系统信息" | |||
], | |||
"summary": "获取系统信息", | |||
"parameters": [ | |||
{ | |||
"type": "string", | |||
"description": "验证参数Bearer和token空格拼接", | |||
"name": "Authorization", | |||
"in": "header", | |||
"required": true | |||
} | |||
], | |||
"responses": { | |||
"200": { | |||
"description": "success", | |||
"schema": { | |||
"type": "string" | |||
} | |||
}, | |||
"400": { | |||
"description": "具体错误", | |||
"schema": { | |||
"$ref": "#/definitions/md.Response" | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
"/api/dataCenter/generate/data/detail": { | |||
"post": { | |||
"description": "数据中心-分成数据-详情", | |||
@@ -493,6 +493,31 @@ info: | |||
title: 广告联盟-总站长平台 | |||
version: "1.0" | |||
paths: | |||
/api/comm/basicGet: | |||
get: | |||
consumes: | |||
- application/json | |||
description: 获取系统信息 | |||
parameters: | |||
- description: 验证参数Bearer和token空格拼接 | |||
in: header | |||
name: Authorization | |||
required: true | |||
type: string | |||
produces: | |||
- application/json | |||
responses: | |||
"200": | |||
description: success | |||
schema: | |||
type: string | |||
"400": | |||
description: 具体错误 | |||
schema: | |||
$ref: '#/definitions/md.Response' | |||
summary: 获取系统信息 | |||
tags: | |||
- 公共模块-获取系统信息 | |||
/api/dataCenter/generate/data/detail: | |||
post: | |||
consumes: | |||