Merge pull request '1' (#805) from feat-IRONFANS-235-Robin into main
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/805
This commit is contained in:
commit
25352fbf06
|
@ -70,7 +70,6 @@ const (
|
||||||
RavenIQTestEmailConfigKey = "Raven_IQ_test_email_config"
|
RavenIQTestEmailConfigKey = "Raven_IQ_test_email_config"
|
||||||
OfficialEmailKey = "official_email"
|
OfficialEmailKey = "official_email"
|
||||||
InstallInfoKey = "install_info"
|
InstallInfoKey = "install_info"
|
||||||
IsIosInstallButtonVisibleKey = "is_ios_install_button_visible"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// del_flag
|
// del_flag
|
||||||
|
|
|
@ -82,17 +82,6 @@ func OpGetIsMomentImageEncryptEnabled(ctx *gin.Context) {
|
||||||
ReplyOk(ctx, isEnabled)
|
ReplyOk(ctx, isEnabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
func OpGetInstallInfo(ctx *gin.Context) {
|
||||||
cfg, ec := service.DefaultConfigService.OpGetInstallInfo(ctx)
|
cfg, ec := service.DefaultConfigService.OpGetInstallInfo(ctx)
|
||||||
if ec != errcode.ErrCodeOk {
|
if ec != errcode.ErrCodeOk {
|
||||||
|
|
|
@ -311,7 +311,6 @@ func Init(r *gin.Engine) {
|
||||||
// ios安装按钮
|
// ios安装按钮
|
||||||
apiAppGroup := r.Group("/api/app", PrepareToC())
|
apiAppGroup := r.Group("/api/app", PrepareToC())
|
||||||
apiAppGroup.POST("install_info", middleware.JSONParamValidator(base.BaseRequest{}), OpGetInstallInfo)
|
apiAppGroup.POST("install_info", middleware.JSONParamValidator(base.BaseRequest{}), OpGetInstallInfo)
|
||||||
apiAppGroup.POST("is_ios_install_button_visible", middleware.JSONParamValidator(base.BaseRequest{}), OpGetIsIosInstallButtonVisible)
|
|
||||||
|
|
||||||
// =============================== 以下是服务,只允许内网调用 ===============================
|
// =============================== 以下是服务,只允许内网调用 ===============================
|
||||||
|
|
||||||
|
|
|
@ -216,21 +216,6 @@ func (s *ConfigService) OpGetIsMomentImageEncryptEnabled(ctx *gin.Context) (isEn
|
||||||
return
|
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) {
|
func (s *ConfigService) OpGetInstallInfo(ctx *gin.Context) (cfg *apollostruct.InstallCfg, ec errcode.ErrCode) {
|
||||||
ec = errcode.ErrCodeOk
|
ec = errcode.ErrCodeOk
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue