1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- 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, exist := c.Get("userInfo")
- if exist {
- 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
- }
|