Merge branch 'feat-IRONFANS-235-Robin' into test
This commit is contained in:
commit
e014d2b80a
|
@ -72,7 +72,6 @@ const (
|
|||
NotifBannerInfoKey = "notif_banner_info"
|
||||
InstallInfoKey = "install_info"
|
||||
AcctPunishmentRealEndTimeKey = "acct_punishment_real_endtime"
|
||||
IsIosInstallButtonVisibleKey = "is_ios_install_button_visible"
|
||||
)
|
||||
|
||||
// del_flag
|
||||
|
|
|
@ -93,17 +93,6 @@ func OpGetBannerInfo(ctx *gin.Context) {
|
|||
ReplyOk(ctx, list)
|
||||
}
|
||||
|
||||
func OpGetIsIosInstallButtonVisible(ctx *gin.Context) {
|
||||
isVisible, ec := service.DefaultConfigService.OpGetIsIosInstallButtonVisible(ctx)
|
||||
if ec != errcode.ErrCodeOk {
|
||||
logger.Error("OpGetIsIosInstallButtonVisible fail, ec: %v", ec)
|
||||
ReplyErrCodeMsg(ctx, ec)
|
||||
return
|
||||
}
|
||||
|
||||
ReplyOk(ctx, isVisible)
|
||||
}
|
||||
|
||||
func OpGetInstallInfo(ctx *gin.Context) {
|
||||
cfg, ec := service.DefaultConfigService.OpGetInstallInfo(ctx)
|
||||
if ec != errcode.ErrCodeOk {
|
||||
|
|
|
@ -322,7 +322,6 @@ func Init(r *gin.Engine) {
|
|||
// ios安装按钮
|
||||
apiAppGroup := r.Group("/api/app", PrepareToC())
|
||||
apiAppGroup.POST("install_info", middleware.JSONParamValidator(base.BaseRequest{}), OpGetInstallInfo)
|
||||
apiAppGroup.POST("is_ios_install_button_visible", middleware.JSONParamValidator(base.BaseRequest{}), OpGetIsIosInstallButtonVisible)
|
||||
|
||||
// =============================== 以下是服务,只允许内网调用 ===============================
|
||||
|
||||
|
|
|
@ -232,21 +232,6 @@ func (s *ConfigService) OpGetBannerInfo(ctx *gin.Context) (list []string, ec err
|
|||
return
|
||||
}
|
||||
|
||||
func (s *ConfigService) OpGetIsIosInstallButtonVisible(ctx *gin.Context) (isVisible int64, ec errcode.ErrCode) {
|
||||
ec = errcode.ErrCodeOk
|
||||
|
||||
isIosInstallButtonVisible, err := apollo.GetIntValue(consts.IsIosInstallButtonVisibleKey, apollo.ApolloOpts().SetNamespace("application"))
|
||||
if err != nil {
|
||||
logger.Error("Apollo read failed : %v", err)
|
||||
ec = errcode.ErrCodeApolloReadFail
|
||||
return
|
||||
}
|
||||
|
||||
isVisible = int64(isIosInstallButtonVisible)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (s *ConfigService) OpGetInstallInfo(ctx *gin.Context) (cfg *apollostruct.InstallCfg, ec errcode.ErrCode) {
|
||||
ec = errcode.ErrCodeOk
|
||||
|
||||
|
|
Loading…
Reference in New Issue