fix: common去除Impi层
This commit is contained in:
@@ -10,15 +10,14 @@ import (
|
||||
|
||||
// 实例化控制层 CommontController 结构体
|
||||
var NewCommont = &CommontController{
|
||||
commontService: commonService.NewCommontImpl,
|
||||
commontService: commonService.NewCommont,
|
||||
}
|
||||
|
||||
// 通用请求
|
||||
//
|
||||
// PATH /
|
||||
type CommontController struct {
|
||||
// 通用请求服务
|
||||
commontService commonService.ICommont
|
||||
commontService *commonService.Commont // 通用请求服务
|
||||
}
|
||||
|
||||
// 哈希加密
|
||||
@@ -36,17 +35,12 @@ func (s *CommontController) I18n(c *gin.Context) {
|
||||
|
||||
i18nLang := i18n.TKey(language, "i18n")
|
||||
hello := i18n.TKey(language, "hello")
|
||||
ivs := i18n.TTemplate(language, "errorFields", nil)
|
||||
errorFields := i18n.TTemplate(language, "errorFields", map[string]any{
|
||||
"num": 1000,
|
||||
"hello": "你好",
|
||||
"h2o2": false,
|
||||
"fileName": " ====",
|
||||
errorFields := i18n.TTemplate(language, "dictData.errLabelExists", map[string]any{
|
||||
"name": " ====",
|
||||
})
|
||||
c.JSON(200, map[string]any{
|
||||
"lang": language,
|
||||
"i18nLang": i18nLang,
|
||||
"ivs": ivs,
|
||||
"hello": hello,
|
||||
"errorFields": errorFields,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user