diff --git a/app/router/router.go b/app/router/router.go index 0138f0f..bd4dc36 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -91,6 +91,8 @@ func routeCommunityTeamOwnStore(r *gin.RouterGroup) { r.POST("/login", storeHdl.Login) r.POST("/login/send_sms", storeHdl.LoginSendSms) r.POST("/login/fast_in", storeHdl.LoginFastIn) + r.GET("/gd/key", storeHdl.GdKey) + r.Use(mw.AuthJWT) r.GET("/sub_region_list", storeHdl.GetRegionChildNode) r.POST("/sms", storeHdl.Sms) diff --git a/app/store/hdl/hdl_user.go b/app/store/hdl/hdl_user.go index f6a8beb..4d06076 100644 --- a/app/store/hdl/hdl_user.go +++ b/app/store/hdl/hdl_user.go @@ -22,13 +22,15 @@ import ( // @Router /api/v1/communityTeam/ownStore/user [GET] func User(c *gin.Context) { user := svc.GetUser(c) + third_gd_web_app_key := db.SysCfgGet(c, "third_gd_web_app_key") res := map[string]string{ - "head_img": user.Profile.AvatarUrl, - "nickname": user.Info.Nickname, - "phone": user.Info.Phone, - "state": "0", - "info": "", - "store_type": "0", + "head_img": user.Profile.AvatarUrl, + "nickname": user.Info.Nickname, + "phone": user.Info.Phone, + "state": "0", + "info": "", + "store_type": "0", + "third_gd_web_app_key": third_gd_web_app_key, } storeCheck := db.StoreAuditByUid(svc.MasterDb(c), user.Info.Uid) if storeCheck != nil { @@ -53,6 +55,14 @@ func User(c *gin.Context) { e.OutSuc(c, res, nil) return } +func GdKey(c *gin.Context) { + third_gd_web_app_key := db.SysCfgGet(c, "third_gd_web_app_key") + res := map[string]string{ + "third_gd_web_app_key": third_gd_web_app_key, + } + e.OutSuc(c, res, nil) + return +} func Base(c *gin.Context) { user := svc.GetUser(c)