123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package services
- import (
- "github.com/gin-gonic/gin"
- "hongze/hongze_yb_en_api/models/english_report_email"
- )
- type LoginReq struct {
- Account string `description:"账号"`
- CountryCode string `description:"区号"`
- Type int `description:"类型 1:邮箱 2:手机"`
- Password string `description:"密码"`
- }
- type LoginResp struct {
- Authorization string
- AdminName string `description:"系统用户名称"`
- RealName string `description:"系统用户姓名"`
- RoleName string `description:"角色名称"`
- RoleTypeCode string `description:"角色类型编码"`
- SysRoleTypeCode string `description:"角色类型编码"`
- AdminId int `description:"系统用户id"`
- ProductName string `description:"产品名称:admin,ficc,权益"`
- Authority int `description:"管理权限,0:无,1:部门负责人,2:小组负责人,或者ficc销售主管,4:ficc销售组长"`
- }
- type RegisterReq struct {
- Password string
- Name string //客户名称
- CompanyName string //公司名称
- Email string //邮箱地址
- SmsCode string //验证码
- }
- type ModifyPwdReq struct {
- OldPwd string `description:"旧密码"`
- NewPwd string `description:"新密码"`
- }
- type UserInfo struct {
- english_report_email.Email
- LoginToken string
- }
- // GetInfoByClaims 从Claims中获取用户信息
- func GetInfoByClaims(c *gin.Context) (userInfo UserInfo) {
- //获取jwt数据失败
- claims, _ := c.Get("userInfo")
- userInfo = claims.(UserInfo)
- return
- }
- type BindMobileReq struct {
- CountryCode string `description:"区号"`
- Mobile string
- SmsCode string //验证码
- }
- type ForgetPwdReq struct {
- Type int `description:"类型 1:邮箱 2:手机"`
- CountryCode string `description:"区号"`
- Account string `description:"账号"`
- Password string `description:"密码"`
- SmsCode string
- }
- type ModifyMobile struct {
- CountryCode string `description:"区号"`
- OldMobile string
- NewMobile string
- SmsCode string
- }
|