|
@@ -986,12 +986,12 @@ func (this *UserLoginController) CheckUserLdap() {
|
|
|
br.Msg = "操作成功"
|
|
|
}
|
|
|
|
|
|
-// ICPLicense
|
|
|
-// @Title icp备案信息
|
|
|
-// @Description icp备案信息
|
|
|
+// BaseInfo
|
|
|
+// @Title 基础信息
|
|
|
+// @Description 基础信息
|
|
|
// @Success 200 Ret=200 获取成功
|
|
|
-// @router /icp_license [get]
|
|
|
-func (this *UserLoginController) ICPLicense() {
|
|
|
+// @router /base_info [get]
|
|
|
+func (this *UserLoginController) BaseInfo() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
|
defer func() {
|
|
|
if br.ErrMsg == "" {
|
|
@@ -1001,14 +1001,67 @@ func (this *UserLoginController) ICPLicense() {
|
|
|
this.ServeJSON()
|
|
|
}()
|
|
|
|
|
|
- item, e := models.GetBusinessConfByKey("ICPLicense")
|
|
|
+ icp, e := models.GetBusinessConfByKey("ICPLicense")
|
|
|
if e != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取商家配置失败, Err: " + e.Error()
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- br.Data = item
|
|
|
+ title, e := models.GetBusinessConfByKey("ETATitle")
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取商家配置失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ tabNameMobile, e := models.GetBusinessConfByKey("TabNameMobile")
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取商家配置失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ logoCn, e := models.GetBusinessConfByKey("LogoCN")
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取商家配置失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ logoEn, e := models.GetBusinessConfByKey("LogoEN")
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取商家配置失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ logoMobile, e := models.GetBusinessConfByKey("LogoMobile")
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取商家配置失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ type BaseInfoResp struct {
|
|
|
+ Icp *models.BusinessConf `description:"Icp信息"`
|
|
|
+ ETATitle *models.BusinessConf `description:"eta系统名称"`
|
|
|
+ TabNameMobile *models.BusinessConf `description:"tab页名称"`
|
|
|
+ LogoCn *models.BusinessConf `description:"中文logo"`
|
|
|
+ LogoEn *models.BusinessConf `description:"英文logo"`
|
|
|
+ LogoMobile *models.BusinessConf `description:"移动端logo"`
|
|
|
+ }
|
|
|
+
|
|
|
+ resp := BaseInfoResp{
|
|
|
+ Icp: icp,
|
|
|
+ ETATitle: title,
|
|
|
+ TabNameMobile: tabNameMobile,
|
|
|
+ LogoCn: logoCn,
|
|
|
+ LogoEn: logoEn,
|
|
|
+ LogoMobile: logoMobile,
|
|
|
+ }
|
|
|
+
|
|
|
+ br.Data = resp
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|