Merge remote-tracking branch 'origin/main' into mtest 1
This commit is contained in:
commit
0277f51c12
|
@ -70,6 +70,7 @@ const (
|
|||
OfficialEmailKey = "official_email"
|
||||
SmsSplitRatioKey = "sms_split_ratio"
|
||||
NotifBannerInfoKey = "notif_banner_info"
|
||||
IsIosInstallButtonVisibleKey = "is_ios_install_button_visible"
|
||||
)
|
||||
|
||||
// del_flag
|
||||
|
|
|
@ -92,3 +92,14 @@ 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)
|
||||
}
|
||||
|
|
|
@ -316,6 +316,10 @@ func Init(r *gin.Engine) {
|
|||
apiRavenIQTestVisitGroup.POST("create", middleware.JSONParamValidator(Raven_IQ_test_visitproto.ApiCreateReq{}), ApiCreateRavenIQTestVisit)
|
||||
apiRavenIQTestVisitGroup.POST("count", middleware.JSONParamValidator(Raven_IQ_test_visitproto.ApiCountReq{}), ApiGetRavenIQTestVisitCount)
|
||||
|
||||
// ios安装按钮
|
||||
apiAppGroup := r.Group("/api/app", PrepareToC())
|
||||
apiAppGroup.POST("is_ios_install_button_visible", middleware.JSONParamValidator(base.BaseRequest{}), OpGetIsIosInstallButtonVisible)
|
||||
|
||||
// =============================== 以下是服务,只允许内网调用 ===============================
|
||||
|
||||
// op相关,直接调用服务,不调用gateway
|
||||
|
|
|
@ -231,3 +231,18 @@ 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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue