dengbiao преди 2 месеца
родител
ревизия
02eb1cf644
променени са 5 файла, в които са добавени 127 реда и са изтрити 1 реда
  1. +24
    -0
      app/hdl/hdl_comm.go
  2. +2
    -1
      app/router/router.go
  3. +38
    -0
      docs/docs.go
  4. +38
    -0
      docs/swagger.json
  5. +25
    -0
      docs/swagger.yaml

+ 24
- 0
app/hdl/hdl_comm.go Целия файл

@@ -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
}

+ 2
- 1
app/router/router.go Целия файл

@@ -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) {


+ 38
- 0
docs/docs.go Целия файл

@@ -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": "数据中心-分成数据-详情",


+ 38
- 0
docs/swagger.json Целия файл

@@ -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": "数据中心-分成数据-详情",


+ 25
- 0
docs/swagger.yaml Целия файл

@@ -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:


Зареждане…
Отказ
Запис