Parcourir la source

多域名

master
huangjiajun il y a 15 heures
Parent
révision
33379a90db
6 fichiers modifiés avec 593 ajouts et 6 suppressions
  1. +44
    -0
      app/hdl/setCenter/web/hdl_basic.go
  2. +3
    -0
      app/md/setCenter/md_web.go
  3. +2
    -0
      app/router/router.go
  4. +206
    -4
      docs/docs.go
  5. +204
    -1
      docs/swagger.json
  6. +134
    -1
      docs/swagger.yaml

+ 44
- 0
app/hdl/setCenter/web/hdl_basic.go Voir le fichier

@@ -4,6 +4,8 @@ import (
"applet/app/e"
"applet/app/md/setCenter"
"applet/app/svc"
"applet/app/utils"
"encoding/json"
"github.com/gin-gonic/gin"
)

@@ -70,3 +72,45 @@ func SetBasic(c *gin.Context) {
e.OutSuc(c, "success", nil)
return
}

// GetDomainBasic
// @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/getDomainBasic [get]
func GetDomainBasic(c *gin.Context) {
domain := svc.GetSysCfgStr("down_web_domain")
var tmp = make([]string, 0)
json.Unmarshal([]byte(domain), &tmp)
resp := setCenter.WebDomainBasicReq{
DownWebDomain: tmp,
}
e.OutSuc(c, resp, nil)
}

// SetDomainBasic
// @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/setDomainBasic [post]
func SetDomainBasic(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))
e.OutSuc(c, "success", nil)
return
}

+ 3
- 0
app/md/setCenter/md_web.go Voir le fichier

@@ -24,3 +24,6 @@ type KuaizhanBasicResp struct {
type KuaizhanBasicReq struct {
KuaizhanUrl string `json:"kuaizhan_url"`
}
type WebDomainBasicReq struct {
DownWebDomain []string `json:"down_web_domain"`
}

+ 2
- 0
app/router/router.go Voir le fichier

@@ -121,6 +121,8 @@ 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)
}
rKuaizhan := r.Group("/kuaizhan") //快站信息
{


+ 206
- 4
docs/docs.go Voir le fichier

@@ -1,4 +1,5 @@
// Package docs Code generated by swaggo/swag. DO NOT EDIT
// Code generated by swaggo/swag. DO NOT EDIT.

package docs

import "github.com/swaggo/swag"
@@ -1655,7 +1656,9 @@ const docTemplate = `{
"name": "req",
"in": "body",
"required": true,
"schema": {}
"schema": {
"type": "object"
}
}
],
"responses": {
@@ -8567,6 +8570,91 @@ const docTemplate = `{
}
}
},
"/api/settCenter/kuaizhan/getBasic": {
"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.KuaizhanBasicResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/kuaizhan/setBasic": {
"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.KuaizhanBasicReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/oss/aliYun/getBasic": {
"get": {
"description": "对象存储设置(获取)",
@@ -8690,6 +8778,44 @@ const docTemplate = `{
}
}
},
"/api/settCenter/web/getDomainBasic": {
"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/setBasic": {
"post": {
"description": "基本设置(更新)",
@@ -8737,6 +8863,53 @@ const docTemplate = `{
}
}
},
"/api/settCenter/web/setDomainBasic": {
"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/userFeedback/cate/list": {
"post": {
"description": "分类列表",
@@ -10529,6 +10702,10 @@ const docTemplate = `{
"md.AdvertisingVisitList": {
"type": "object",
"properties": {
"custom_ecpm": {
"type": "string",
"example": "ecpm"
},
"ecpm": {
"type": "string",
"example": "ecpm"
@@ -17245,6 +17422,22 @@ const docTemplate = `{
}
}
},
"setCenter.KuaizhanBasicReq": {
"type": "object",
"properties": {
"kuaizhan_url": {
"type": "string"
}
}
},
"setCenter.KuaizhanBasicResp": {
"type": "object",
"properties": {
"kuaizhan_url": {
"type": "string"
}
}
},
"setCenter.WebBasicReq": {
"type": "object",
"properties": {
@@ -17298,6 +17491,17 @@ const docTemplate = `{
"type": "string"
}
}
},
"setCenter.WebDomainBasicReq": {
"type": "object",
"properties": {
"down_web_domain": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"securityDefinitions": {
@@ -17319,8 +17523,6 @@ var SwaggerInfo = &swag.Spec{
Description: "管理后台接口文档",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {


+ 204
- 1
docs/swagger.json Voir le fichier

@@ -1648,7 +1648,9 @@
"name": "req",
"in": "body",
"required": true,
"schema": {}
"schema": {
"type": "object"
}
}
],
"responses": {
@@ -8560,6 +8562,91 @@
}
}
},
"/api/settCenter/kuaizhan/getBasic": {
"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.KuaizhanBasicResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/kuaizhan/setBasic": {
"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.KuaizhanBasicReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/settCenter/oss/aliYun/getBasic": {
"get": {
"description": "对象存储设置(获取)",
@@ -8683,6 +8770,44 @@
}
}
},
"/api/settCenter/web/getDomainBasic": {
"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/setBasic": {
"post": {
"description": "基本设置(更新)",
@@ -8730,6 +8855,53 @@
}
}
},
"/api/settCenter/web/setDomainBasic": {
"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/userFeedback/cate/list": {
"post": {
"description": "分类列表",
@@ -10522,6 +10694,10 @@
"md.AdvertisingVisitList": {
"type": "object",
"properties": {
"custom_ecpm": {
"type": "string",
"example": "ecpm"
},
"ecpm": {
"type": "string",
"example": "ecpm"
@@ -17238,6 +17414,22 @@
}
}
},
"setCenter.KuaizhanBasicReq": {
"type": "object",
"properties": {
"kuaizhan_url": {
"type": "string"
}
}
},
"setCenter.KuaizhanBasicResp": {
"type": "object",
"properties": {
"kuaizhan_url": {
"type": "string"
}
}
},
"setCenter.WebBasicReq": {
"type": "object",
"properties": {
@@ -17291,6 +17483,17 @@
"type": "string"
}
}
},
"setCenter.WebDomainBasicReq": {
"type": "object",
"properties": {
"down_web_domain": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"securityDefinitions": {


+ 134
- 1
docs/swagger.yaml Voir le fichier

@@ -770,6 +770,9 @@ definitions:
type: object
md.AdvertisingVisitList:
properties:
custom_ecpm:
example: ecpm
type: string
ecpm:
example: ecpm
type: string
@@ -5426,6 +5429,16 @@ definitions:
within_days:
type: integer
type: object
setCenter.KuaizhanBasicReq:
properties:
kuaizhan_url:
type: string
type: object
setCenter.KuaizhanBasicResp:
properties:
kuaizhan_url:
type: string
type: object
setCenter.WebBasicReq:
properties:
android_down_url:
@@ -5462,6 +5475,13 @@ definitions:
web_logo_url:
type: string
type: object
setCenter.WebDomainBasicReq:
properties:
down_web_domain:
items:
type: string
type: array
type: object
host: localhost:4001
info:
contact:
@@ -6549,7 +6569,8 @@ paths:
in: body
name: req
required: true
schema: {}
schema:
type: object
produces:
- application/json
responses:
@@ -11122,6 +11143,62 @@ paths:
summary: 修改角色状态
tags:
- 权限管理
/api/settCenter/kuaizhan/getBasic:
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.KuaizhanBasicResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 基础设置-网站信息-基本设置(获取)
tags:
- 基础设置
/api/settCenter/kuaizhan/setBasic:
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.KuaizhanBasicReq'
produces:
- application/json
responses:
"200":
description: success
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 基础设置-网站信息-基本设置(更新)
tags:
- 基础设置
/api/settCenter/oss/aliYun/getBasic:
get:
consumes:
@@ -11203,6 +11280,31 @@ paths:
summary: 基础设置-网站信息-基本设置(获取)
tags:
- 基础设置
/api/settCenter/web/getDomainBasic:
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/setBasic:
post:
consumes:
@@ -11234,6 +11336,37 @@ paths:
summary: 基础设置-网站信息-基本设置(更新)
tags:
- 基础设置
/api/settCenter/web/setDomainBasic:
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/user_feedback/cate/del:
post:
consumes:


Chargement…
Annuler
Enregistrer