diff --git a/app/hdl/comm/hdl_comm.go b/app/hdl/comm/hdl_comm.go index 23c5d91..9823915 100644 --- a/app/hdl/comm/hdl_comm.go +++ b/app/hdl/comm/hdl_comm.go @@ -19,7 +19,7 @@ import ( // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Success 200 {string} "许可链接" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/comm/getOssUrl [get] +// @Router /api/v1/comm/getOssUrl [get] func GetOssUrl(c *gin.Context) { redisConn := cache.GetPool().Get() sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn) diff --git a/app/hdl/hdl_demo.go b/app/hdl/hdl_demo.go index ebe1ae2..14dd771 100644 --- a/app/hdl/hdl_demo.go +++ b/app/hdl/hdl_demo.go @@ -23,7 +23,7 @@ import ( // @Param req body interface{} true "用户名密码" // @Success 200 {object} map[string]interface{} "token" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/demo [post] +// @Router /api/v1/demo [post] func Demo(c *gin.Context) { var args interface{} if c.Request.Method == "GET" { diff --git a/docs/docs.go b/docs/docs.go index ba106dc..cf03ab3 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -24,7 +24,7 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { - "/api/comm/getOssUrl": { + "/api/v1/comm/getOssUrl": { "get": { "description": "上传许可链接(获取)", "consumes": [ @@ -62,7 +62,7 @@ const docTemplate = `{ } } }, - "/api/demo": { + "/api/v1/demo": { "post": { "description": "Demo样例测试", "consumes": [ @@ -277,8 +277,8 @@ const docTemplate = `{ // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", - Host: "mp.xbkai.com", - BasePath: "/api", + Host: "ddxq.izhim.com", + BasePath: "/api/v1", Schemes: []string{}, Title: "蛋蛋星球-APP客户端", Description: "APP客户端-Api接口", diff --git a/docs/swagger.json b/docs/swagger.json index 5b78d61..492cec4 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -15,10 +15,10 @@ }, "version": "1.0" }, - "host": "mp.xbkai.com", - "basePath": "/api", + "host": "ddxq.izhim.com", + "basePath": "/api/v1", "paths": { - "/api/comm/getOssUrl": { + "/api/v1/comm/getOssUrl": { "get": { "description": "上传许可链接(获取)", "consumes": [ @@ -56,7 +56,7 @@ } } }, - "/api/demo": { + "/api/v1/demo": { "post": { "description": "Demo样例测试", "consumes": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 3edc2da..aa46c29 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,4 +1,4 @@ -basePath: /api +basePath: /api/v1 definitions: md.LoginReq: properties: @@ -62,7 +62,7 @@ definitions: example: 具体错误原因 type: string type: object -host: mp.xbkai.com +host: ddxq.izhim.com info: contact: email: 1239118001@qq.com @@ -76,7 +76,7 @@ info: title: 蛋蛋星球-APP客户端 version: "1.0" paths: - /api/comm/getOssUrl: + /api/v1/comm/getOssUrl: get: consumes: - application/json @@ -101,7 +101,7 @@ paths: summary: 通用请求-对象存储-上传许可链接(获取) tags: - 对象存储 - /api/demo: + /api/v1/demo: post: consumes: - application/json diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml index 92c3c12..ab6bfef 100644 --- a/k8s/ingress.yaml +++ b/k8s/ingress.yaml @@ -1,17 +1,17 @@ kind: Ingress apiVersion: extensions/v1beta1 metadata: - name: egg-admin # ingress名称 + name: egg-app # ingress名称 namespace: egg annotations: kubesphere.io/creator: dengbiao spec: rules: - - host: ddstar.izhim.cn # 使用的域名 + - host: ddxq.izhim.com # 使用的域名 http: paths: - path: / pathType: ImplementationSpecific backend: - serviceName: egg-admin # 流量转发到的服务 - servicePort: 80 \ No newline at end of file + serviceName: egg-app # 流量转发到的服务 + servicePort: 4011 \ No newline at end of file diff --git a/main.go b/main.go index b0affd1..5819bf9 100644 --- a/main.go +++ b/main.go @@ -42,7 +42,7 @@ func init() { // @license.name Apache 2.0 // @license.url http://www.apache.org/licenses/LICENSE-2.0.html // @host ddxq.izhim.com -// @BasePath /api +// @BasePath /api/v1 func main() { r := router.Init() // 创建路由