Bladeren bron

多域名

master
huangjiajun 13 uur geleden
bovenliggende
commit
84122c34a6
6 gewijzigde bestanden met toevoegingen van 299 en 45 verwijderingen
  1. +50
    -8
      app/hdl/setCenter/web/hdl_basic.go
  2. +1
    -1
      app/md/setCenter/md_web.go
  3. +4
    -2
      app/router/router.go
  4. +91
    -12
      docs/docs.go
  5. +91
    -12
      docs/swagger.json
  6. +62
    -10
      docs/swagger.yaml

+ 50
- 8
app/hdl/setCenter/web/hdl_basic.go Bestand weergeven

@@ -73,7 +73,7 @@ func SetBasic(c *gin.Context) {
return
}

// GetDomainBasic
// GetDownDomainBasic
// @Summary 基础设置-网站信息-下载页多域名设置(获取)
// @Tags 基础设置
// @Description 网站信息-下载页多域名设置(获取)
@@ -82,18 +82,18 @@ func SetBasic(c *gin.Context) {
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Success 200 {object} setCenter.WebDomainBasicReq "设置列表"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settCenter/web/getDomainBasic [get]
func GetDomainBasic(c *gin.Context) {
// @Router /api/settCenter/web/getDownDomainBasic [get]
func GetDownDomainBasic(c *gin.Context) {
domain := svc.GetSysCfgStr("down_web_domain")
var tmp = make([]string, 0)
json.Unmarshal([]byte(domain), &tmp)
resp := setCenter.WebDomainBasicReq{
DownWebDomain: tmp,
WebDomain: tmp,
}
e.OutSuc(c, resp, nil)
}

// SetDomainBasic
// SetDownDomainBasic
// @Summary 基础设置-网站信息-下载页多域名设置(更新)
// @Tags 基础设置
// @Description 下载页多域名设置(更新)
@@ -103,14 +103,56 @@ func GetDomainBasic(c *gin.Context) {
// @param req body setCenter.WebDomainBasicReq true "上传需要修改的信息"
// @Success 200 {string} "success"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settCenter/web/setDomainBasic [post]
func SetDomainBasic(c *gin.Context) {
// @Router /api/settCenter/web/setDownDomainBasic [post]
func SetDownDomainBasic(c *gin.Context) {
var req *setCenter.WebDomainBasicReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}
svc.SetSysCfgStr("down_web_domain", utils.SerializeStr(req.DownWebDomain))
svc.SetSysCfgStr("down_web_domain", utils.SerializeStr(req.WebDomain))
e.OutSuc(c, "success", nil)
return
}

// GetRegisterDomainBasic
// @Summary 基础设置-网站信息-下载页多域名设置(获取)
// @Tags 基础设置
// @Description 网站信息-下载页多域名设置(获取)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Success 200 {object} setCenter.WebDomainBasicReq "设置列表"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settCenter/web/getRegisterDomainBasic [get]
func GetRegisterDomainBasic(c *gin.Context) {
domain := svc.GetSysCfgStr("down_register_domain")
var tmp = make([]string, 0)
json.Unmarshal([]byte(domain), &tmp)
resp := setCenter.WebDomainBasicReq{
WebDomain: tmp,
}
e.OutSuc(c, resp, nil)
}

// SetRegisterDomainBasic
// @Summary 基础设置-网站信息-下载页多域名设置(更新)
// @Tags 基础设置
// @Description 下载页多域名设置(更新)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @param req body setCenter.WebDomainBasicReq true "上传需要修改的信息"
// @Success 200 {string} "success"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/settCenter/web/setRegisterDomainBasic [post]
func SetRegisterDomainBasic(c *gin.Context) {
var req *setCenter.WebDomainBasicReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}
svc.SetSysCfgStr("down_register_domain", utils.SerializeStr(req.WebDomain))
e.OutSuc(c, "success", nil)
return
}

+ 1
- 1
app/md/setCenter/md_web.go Bestand weergeven

@@ -25,5 +25,5 @@ type KuaizhanBasicReq struct {
KuaizhanUrl string `json:"kuaizhan_url"`
}
type WebDomainBasicReq struct {
DownWebDomain []string `json:"down_web_domain"`
WebDomain []string `json:"web_domain"`
}

+ 4
- 2
app/router/router.go Bestand weergeven

@@ -121,8 +121,10 @@ func rSettCenter(r *gin.RouterGroup) { //设置中心
{
rWeb.GET("/getBasic", web.GetBasic)
rWeb.POST("/setBasic", web.SetBasic)
rWeb.GET("/getDomainBasic", web.GetDomainBasic)
rWeb.POST("/setDomainBasic", web.SetDomainBasic)
rWeb.GET("/getDownDomainBasic", web.GetDownDomainBasic)
rWeb.POST("/setDownDomainBasic", web.SetDownDomainBasic)
rWeb.GET("/getRegisterDomainBasic", web.GetRegisterDomainBasic)
rWeb.POST("/setRegisterDomainBasic", web.SetRegisterDomainBasic)
}
rKuaizhan := r.Group("/kuaizhan") //快站信息
{


+ 91
- 12
docs/docs.go Bestand weergeven

@@ -2186,7 +2186,7 @@ const docTemplate = `{
],
"responses": {
"200": {
"description": "生成的黑名单id",
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetDynamicResp"
}
@@ -8778,7 +8778,45 @@ const docTemplate = `{
}
}
},
"/api/settCenter/web/getDomainBasic": {
"/api/settCenter/web/getDownDomainBasic": {
"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": "设置列表",
"schema": {
"$ref": "#/definitions/setCenter.WebDomainBasicReq"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/web/getRegisterDomainBasic": {
"get": {
"description": "网站信息-下载页多域名设置(获取)",
"consumes": [
@@ -8863,7 +8901,54 @@ const docTemplate = `{
}
}
},
"/api/settCenter/web/setDomainBasic": {
"/api/settCenter/web/setDownDomainBasic": {
"post": {
"description": "下载页多域名设置(更新)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"基础设置"
],
"summary": "基础设置-网站信息-下载页多域名设置(更新)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "上传需要修改的信息",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setCenter.WebDomainBasicReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/web/setRegisterDomainBasic": {
"post": {
"description": "下载页多域名设置(更新)",
"consumes": [
@@ -11972,10 +12057,7 @@ const docTemplate = `{
},
"video": {
"description": "视频",
"type": "array",
"items": {
"type": "string"
}
"type": "string"
}
}
},
@@ -14938,10 +15020,7 @@ const docTemplate = `{
},
"video": {
"description": "视频",
"type": "array",
"items": {
"type": "string"
}
"type": "string"
}
}
},
@@ -17495,7 +17574,7 @@ const docTemplate = `{
"setCenter.WebDomainBasicReq": {
"type": "object",
"properties": {
"down_web_domain": {
"web_domain": {
"type": "array",
"items": {
"type": "string"


+ 91
- 12
docs/swagger.json Bestand weergeven

@@ -2178,7 +2178,7 @@
],
"responses": {
"200": {
"description": "生成的黑名单id",
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetDynamicResp"
}
@@ -8770,7 +8770,45 @@
}
}
},
"/api/settCenter/web/getDomainBasic": {
"/api/settCenter/web/getDownDomainBasic": {
"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": "设置列表",
"schema": {
"$ref": "#/definitions/setCenter.WebDomainBasicReq"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/web/getRegisterDomainBasic": {
"get": {
"description": "网站信息-下载页多域名设置(获取)",
"consumes": [
@@ -8855,7 +8893,54 @@
}
}
},
"/api/settCenter/web/setDomainBasic": {
"/api/settCenter/web/setDownDomainBasic": {
"post": {
"description": "下载页多域名设置(更新)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"基础设置"
],
"summary": "基础设置-网站信息-下载页多域名设置(更新)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "上传需要修改的信息",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/setCenter.WebDomainBasicReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/web/setRegisterDomainBasic": {
"post": {
"description": "下载页多域名设置(更新)",
"consumes": [
@@ -11964,10 +12049,7 @@
},
"video": {
"description": "视频",
"type": "array",
"items": {
"type": "string"
}
"type": "string"
}
}
},
@@ -14930,10 +15012,7 @@
},
"video": {
"description": "视频",
"type": "array",
"items": {
"type": "string"
}
"type": "string"
}
}
},
@@ -17487,7 +17566,7 @@
"setCenter.WebDomainBasicReq": {
"type": "object",
"properties": {
"down_web_domain": {
"web_domain": {
"type": "array",
"items": {
"type": "string"


+ 62
- 10
docs/swagger.yaml Bestand weergeven

@@ -1643,9 +1643,7 @@ definitions:
type: string
video:
description: 视频
items:
type: string
type: array
type: string
type: object
md.EggEnergyAvailableEnergyFlow:
properties:
@@ -3716,9 +3714,7 @@ definitions:
type: integer
video:
description: 视频
items:
type: string
type: array
type: string
type: object
md.Response:
properties:
@@ -5477,7 +5473,7 @@ definitions:
type: object
setCenter.WebDomainBasicReq:
properties:
down_web_domain:
web_domain:
items:
type: string
type: array
@@ -6921,7 +6917,7 @@ paths:
- application/json
responses:
"200":
description: 生成的黑名单id
description: 具体数据
schema:
$ref: '#/definitions/md.GetDynamicResp'
"400":
@@ -11280,7 +11276,32 @@ paths:
summary: 基础设置-网站信息-基本设置(获取)
tags:
- 基础设置
/api/settCenter/web/getDomainBasic:
/api/settCenter/web/getDownDomainBasic:
get:
consumes:
- application/json
description: 网站信息-下载页多域名设置(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: 设置列表
schema:
$ref: '#/definitions/setCenter.WebDomainBasicReq'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 基础设置-网站信息-下载页多域名设置(获取)
tags:
- 基础设置
/api/settCenter/web/getRegisterDomainBasic:
get:
consumes:
- application/json
@@ -11336,7 +11357,38 @@ paths:
summary: 基础设置-网站信息-基本设置(更新)
tags:
- 基础设置
/api/settCenter/web/setDomainBasic:
/api/settCenter/web/setDownDomainBasic:
post:
consumes:
- application/json
description: 下载页多域名设置(更新)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 上传需要修改的信息
in: body
name: req
required: true
schema:
$ref: '#/definitions/setCenter.WebDomainBasicReq'
produces:
- application/json
responses:
"200":
description: success
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 基础设置-网站信息-下载页多域名设置(更新)
tags:
- 基础设置
/api/settCenter/web/setRegisterDomainBasic:
post:
consumes:
- application/json


Laden…
Annuleren
Opslaan