Browse Source

新增获取用户详情接口

rdluck 4 năm trước cách đây
mục cha
commit
41d4831e24
6 tập tin đã thay đổi với 323 bổ sung134 xóa
  1. 35 35
      controllers/base_auth.go
  2. 196 75
      controllers/wechat.go
  3. 1 1
      lastupdate.tmp
  4. 1 0
      models/db.go
  5. 8 11
      models/session.go
  6. 82 12
      models/wx_user.go

+ 35 - 35
controllers/base_auth.go

@@ -6,6 +6,7 @@ import (
 	"github.com/astaxie/beego"
 	"net/http"
 	"net/url"
+	"strconv"
 
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/utils"
@@ -21,7 +22,7 @@ func init() {
 
 type BaseAuthController struct {
 	beego.Controller
-	//User *models.WxUserItem
+	User *models.WxUserItem
 	Token string
 }
 
@@ -44,40 +45,39 @@ func (this *BaseAuthController) Prepare() {
 				this.StopRun()
 				return
 			}
-			//session, err := models.GetSessionByToken(authorization)
-			//if err != nil {
-			//	if err.Error() == utils.ErrNoRow() {
-			//		this.JSON(models.BaseResponse{Ret: 408, Msg: "信息已变更,请重新登陆!", ErrMsg: "Token 信息已变更:Token: " + authorization}, false, false)
-			//		this.StopRun()
-			//		return
-			//	}
-			//	this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "获取用户信息异常,Eerr:" + err.Error()}, false, false)
-			//	this.StopRun()
-			//	return
-			//}
-			//if session == nil {
-			//	this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "sesson is empty "}, false, false)
-			//	this.StopRun()
-			//	return
-			//}
-			//wxUser, err := models.GetWxUserItemByUserId(session.UserId)
-			//if err != nil {
-			//	if err.Error() == utils.ErrNoRow() {
-			//		this.JSON(models.BaseResponse{Ret: 408, Msg: "信息已变更,请重新登陆!", ErrMsg: "获取admin 信息失败 " + strconv.Itoa(session.UserId)}, false, false)
-			//		this.StopRun()
-			//		return
-			//	}
-			//	this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "获取wx_user信息异常,Eerr:" + err.Error()}, false, false)
-			//	this.StopRun()
-			//	return
-			//}
-			//if wxUser == nil {
-			//	this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "admin is empty "}, false, false)
-			//	this.StopRun()
-			//	return
-			//}
-
-			//this.User = wxUser
+			session, err := models.GetSessionByToken(authorization)
+			if err != nil {
+				if err.Error() == utils.ErrNoRow() {
+					this.JSON(models.BaseResponse{Ret: 408, Msg: "信息已变更,请重新登陆!", ErrMsg: "Token 信息已变更:Token: " + authorization}, false, false)
+					this.StopRun()
+					return
+				}
+				this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "获取用户信息异常,Eerr:" + err.Error()}, false, false)
+				this.StopRun()
+				return
+			}
+			if session == nil {
+				this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "sesson is empty "}, false, false)
+				this.StopRun()
+				return
+			}
+			wxUser, err := models.GetWxUserItemByUserId(session.UserId)
+			if err != nil {
+				if err.Error() == utils.ErrNoRow() {
+					this.JSON(models.BaseResponse{Ret: 408, Msg: "信息已变更,请重新登陆!", ErrMsg: "获取admin 信息失败 " + strconv.Itoa(session.UserId)}, false, false)
+					this.StopRun()
+					return
+				}
+				this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "获取wx_user信息异常,Eerr:" + err.Error()}, false, false)
+				this.StopRun()
+				return
+			}
+			if wxUser == nil {
+				this.JSON(models.BaseResponse{Ret: 408, Msg: "网络异常,请稍后重试!", ErrMsg: "admin is empty "}, false, false)
+				this.StopRun()
+				return
+			}
+			this.User = wxUser
 		} else {
 			this.JSON(models.BaseResponse{Ret: 408, Msg: "请求异常,请联系客服!", ErrMsg: "POST之外的请求,暂不支持"}, false, false)
 			this.StopRun()

+ 196 - 75
controllers/wechat.go

@@ -53,39 +53,35 @@ func (this *WechatCommonController) WechatLogin() {
 	}
 	firstLogin := 1
 	userId := 0
-	if wxInfo.OpenID != "" {
-		wxUser, err := models.GetWxUserItemByOpenId(wxInfo.UnionID)
-		if err != nil && err.Error() != utils.ErrNoRow() {
-			br.Msg = "获取用户信息失败"
-			br.ErrMsg = "根据openid获取用户信息失败,Eerr:" + err.Error()
+	wxUser, err := models.GetWxUserItemByUnionid(wxInfo.UnionID)
+	if err != nil && err.Error() != utils.ErrNoRow() {
+		br.Msg = "获取用户信息失败"
+		br.ErrMsg = "根据openid获取用户信息失败,Eerr:" + err.Error()
+		return
+	}
+	if wxUser == nil || (err != nil && err.Error() == utils.ErrNoRow()) {
+		user := new(models.WxUser)
+		user.OpenId = wxInfo.OpenID
+		user.CompanyId = 1
+		user.CreatedTime = time.Now()
+		user.UnionId = wxInfo.UnionID
+		user.Unionid = wxInfo.UnionID
+		user.FirstLogin = 1
+		user.Enabled = 1
+		user.RegisterPlatform = 1
+		user.RegisterTime = time.Now()
+		user.SessionKey = wxInfo.SessionKey
+		newId, err := models.AddWxUser(user)
+		if err != nil {
+			br.Msg = "登录失败"
+			br.ErrMsg = "登录失败,新增联系人失败,Eerr:" + err.Error()
 			return
 		}
-		if wxUser == nil || (err != nil && err.Error() == utils.ErrNoRow()) {
-			user := new(models.WxUser)
-			user.OpenId = wxInfo.OpenID
-			user.CompanyId = 1
-			user.CreatedTime = time.Now()
-			user.UnionId = wxInfo.UnionID
-			user.Unionid = wxInfo.UnionID
-			user.FirstLogin = 1
-			user.Enabled = 1
-			user.RegisterPlatform = 1
-			user.RegisterTime = time.Now()
-			newId, err := models.AddWxUser(user)
-			if err != nil {
-				br.Msg = "登录失败"
-				br.ErrMsg = "登录失败,新增联系人失败,Eerr:" + err.Error()
-				return
-			}
-			userId = int(newId)
-		} else {
-			firstLogin = wxUser.FirstLogin
-			userId = wxUser.UserId
-		}
+		userId = int(newId)
 	} else {
-		br.Msg = "获取用户信息失败"
-		br.ErrMsg = "获取unionId失败,unionId:" + wxInfo.UnionID
-		return
+		firstLogin = wxUser.FirstLogin
+		userId = wxUser.UserId
+		models.ModifyWxUserSessionKey(wxInfo.SessionKey, userId)
 	}
 
 	var token string
@@ -102,8 +98,9 @@ func (this *WechatCommonController) WechatLogin() {
 		token = utils.MD5(strconv.Itoa(userId)) + utils.MD5(timeUnixStr)
 		//新增session
 		{
-			session := new(models.Session)
+			session := new(models.CygxSession)
 			session.OpenId = wxInfo.OpenID
+			session.UnionId = wxInfo.UnionID
 			session.UserId = userId
 			session.CreatedTime = time.Now()
 			session.LastUpdatedTime = time.Now()
@@ -158,58 +155,182 @@ func (this *WechatCommonController) WechatLogin() {
 	br.Success = true
 	br.Msg = "登录成功"
 	br.Data = resp
-	//登录日志
-	//{
-	//	returnResult, err := json.Marshal(br)
-	//	if err != nil {
-	//		utils.FileLog.Info(this.Ctx.Input.URI() + " Err:%s" + err.Error())
-	//	}
-	//	utils.FileLog.Info(this.Ctx.Input.URI()+" code: %s , return data: %s", code, string(returnResult))
-	//}
 }
 
-// @Title 微信获取签名接口
-// @Description 微信获取签名接口
-// @Param   Url   query   string  true       "url地址"
-// @Success 200 {object} models.WechatSign
-// @router /getWxSign [get]
-func (this *WechatController) GetWxSign() {
+// @Title 小程序获取用户信息
+// @Description 小程序获取用户信息接口(需要登录)
+// @Param	request	body models.WxGetUserInfoReq true "type json string"
+// @Success 200 {object} models.WxGetUserInfoResp
+// @router /getUserInfo [post]
+func (this *WechatController) GetUserInfo() {
 	br := new(models.BaseResponse).Init()
 	defer func() {
 		this.Data["json"] = br
 		this.ServeJSON()
 	}()
-	//getUrl := this.GetString("Url")
+	var req models.WxGetUserInfoReq
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	if req.RawData == "" || req.EncryptedData == "" || req.Signature == "" || req.Iv == "" {
+		br.Msg = "参数错误"
+		return
+	}
+	user := this.User
+	if user == nil {
+		br.Msg = "请登陆"
+		br.Ret = 408
+		return
+	}
+	sessionKey := user.SessionKey
+	userInfo, err := weapp.DecryptUserInfo(sessionKey, req.RawData, req.EncryptedData, req.Signature, req.Iv)
+	if err != nil {
+		br.Msg = "解析用户信息失败"
+		br.ErrMsg = "解析用户信息失败,DecryptUserInfo Err:" + err.Error()
+		return
+	}
+	userId := 0
+	//修改用户微信信息
+	oldUser, err := models.GetWxUserItemByUnionid(userInfo.UnionID)
+	if err != nil && err.Error() != utils.ErrNoRow() {
+		br.Msg = "获取用户信息失败"
+		br.ErrMsg = "获取用户信息失败 Err:" + err.Error()
+		return
+	}
+	if oldUser == nil || (err != nil && err.Error() == utils.ErrNoRow()) {
+		err = models.ModifyWxUserInfo(userInfo.UnionID, userInfo.Nickname, userInfo.Province, userInfo.City, userInfo.Country, userInfo.Avatar, userInfo.Gender, user.UserId)
+		if err != nil && err.Error() != utils.ErrNoRow() {
+			br.Msg = "获取用户信息失败"
+			br.ErrMsg = "修改用户信息失败 Err:" + err.Error()
+			return
+		}
+		userId = user.UserId
+	} else {
+		if user.UserId == oldUser.UserId {
+			err = models.ModifyWxUserInfo(userInfo.UnionID, userInfo.Nickname, userInfo.Province, userInfo.City, userInfo.Country, userInfo.Avatar, userInfo.Gender, user.UserId)
+			if err != nil && err.Error() != utils.ErrNoRow() {
+				br.Msg = "获取用户信息失败"
+				br.ErrMsg = "修改用户信息失败 Err:" + err.Error()
+				return
+			}
+			userId = user.UserId
+		} else {
+			userId = oldUser.UserId
+			err = models.ModifyWxUserInfo(userInfo.UnionID, userInfo.Nickname, userInfo.Province, userInfo.City, userInfo.Country, userInfo.Avatar, userInfo.Gender, oldUser.UserId)
+			if err != nil && err.Error() != utils.ErrNoRow() {
+				br.Msg = "获取用户信息失败"
+				br.ErrMsg = "修改用户信息失败 Err:" + err.Error()
+				return
+			}
+			err = models.DeleteWxUserByUserId(user.UserId)
+			if err != nil {
+				br.Msg = "删除用户信息失败"
+				br.ErrMsg = "删除用户信息失败 Err:" + err.Error()
+				return
+			}
+		}
+	}
 
-	//accessToken, err := services.WxGetAccessToken()
-	//if err != nil {
-	//	br.Msg = "获取用户信息失败"
-	//	br.ErrMsg = "获取access_token失败,err:" + err.Error()
-	//	return
-	//}
-	//
-	//ticket, err := services.GetWxTicket(accessToken)
-	//if err != nil {
-	//	br.Msg = "获取Ticket失败,请联系客服"
-	//	br.ErrMsg = "获取Ticket失败,Err" + err.Error()
-	//	return
-	//}
-	//if ticket == "" {
-	//	br.Msg = "获取Ticket失败,请联系客服"
-	//	br.ErrMsg = "ticket为空" + ticket
-	//	return
-	//}
-	//nonceStr := utils.GetRandStringNoSpecialChar(16)
-	//signature, nonceString, timestamp := services.GetWxSignature(ticket, getUrl, nonceStr)
-	//
-	//resp := new(models.WechatSign)
-	//resp.AppId = utils.WxAppId
-	//resp.NonceStr = nonceString
-	//resp.Timestamp = timestamp
-	//resp.Url = getUrl
-	//resp.Signature = signature
+	var token string
+	tokenItem, err := models.GetTokenByUid(userId)
+	if err != nil && err.Error() != utils.ErrNoRow() {
+		br.Msg = "登录失败"
+		br.ErrMsg = "登录失败,获取token失败:" + err.Error()
+		return
+	}
+
+	if tokenItem == nil || (err != nil && err.Error() == utils.ErrNoRow()) {
+		timeUnix := time.Now().Unix()
+		timeUnixStr := strconv.FormatInt(timeUnix, 10)
+		token = utils.MD5(strconv.Itoa(userId)) + utils.MD5(timeUnixStr)
+		//新增session
+		{
+			session := new(models.CygxSession)
+			session.OpenId = userInfo.OpenID
+			session.UnionId = userInfo.UnionID
+			session.UserId = userId
+			session.CreatedTime = time.Now()
+			session.LastUpdatedTime = time.Now()
+			session.ExpireTime = time.Now().AddDate(0, 3, 0)
+			session.AccessToken = token
+			err = models.AddSession(session)
+			if err != nil {
+				br.Msg = "登录失败"
+				br.ErrMsg = "登录失败,新增用户session信息失败:" + err.Error()
+				return
+			}
+		}
+	} else {
+		token = tokenItem.AccessToken
+	}
+	resp := new(models.WxGetUserInfoResp)
+	resp.NickName = userInfo.Nickname
+	resp.Gender = userInfo.Gender
+	resp.Province = userInfo.Province
+	resp.Language = userInfo.Language
+	resp.Country = userInfo.Country
+	resp.City = userInfo.City
+	resp.AvatarUrl = userInfo.Avatar
+	resp.Unionid = userInfo.UnionID
+	resp.Appid = userInfo.Watermark.AppID
+	resp.Timestamp = userInfo.Watermark.Timestamp
+	resp.Authorization = token
+	br.Msg = "获取成功!"
+	br.Ret = 200
+	br.Success = true
+}
+
+// @Title 小程序获取用户绑定手机号
+// @Description 小程序获取用户绑定手机号接口(需要登录)
+// @Param	request	body models.WxGetPhoneNumberReq true "type json string"
+// @Success 200 {object} models.WxGetPhoneNumberResp
+// @router /getPhoneNumber [post]
+func (this *WechatController) GetPhoneNumber() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	var req models.WxGetPhoneNumberReq
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	if req.EncryptedData == "" || req.Iv == "" {
+		br.Msg = "参数错误"
+		return
+	}
+	user := this.User
+	if user == nil {
+		br.Msg = "请登陆"
+		br.Ret = 408
+		return
+	}
+	sessionKey := user.SessionKey
+	wxMobile, err := weapp.DecryptMobile(sessionKey, req.EncryptedData, req.Iv)
+	if err != nil {
+		br.Msg = "解析用户手机号信息失败"
+		br.ErrMsg = "解析用户手机号信息失败,Err:" + err.Error()
+		return
+	}
+	err = models.ModifyUsersMobile(user.UserId, wxMobile.PurePhoneNumber)
+	if err != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取失败,Err:" + err.Error()
+		return
+	}
+	resp := new(models.WxGetPhoneNumberResp)
+	resp.Authorization = this.Token
+	resp.PhoneNumber = wxMobile.PhoneNumber
+	resp.PurePhoneNumber = wxMobile.PurePhoneNumber
+	resp.CountryCode = wxMobile.CountryCode
+	br.Msg = "获取成功!"
 	br.Ret = 200
 	br.Success = true
-	br.Msg = "获取签名成功"
-	//br.Data = resp
+	br.Data = resp
 }

+ 1 - 1
lastupdate.tmp

@@ -1 +1 @@
-{"E:\\code\\go\\src\\hongze\\hongze_cygx\\controllers":1611828436481460900}
+{"E:\\code\\go\\src\\hongze\\hongze_cygx\\controllers":1611901964288200000}

+ 1 - 0
models/db.go

@@ -21,5 +21,6 @@ func init() {
 	//注册对象
 	orm.RegisterModel(
 		new(WxUser),
+		new(CygxSession),
 	)
 }

+ 8 - 11
models/session.go

@@ -5,8 +5,9 @@ import (
 	"time"
 )
 
-type Session struct {
+type CygxSession struct {
 	SessionId       int `orm:"column(session_id);pk"`
+	UnionId         string
 	UserId          int
 	OpenId          string
 	AccessToken     string
@@ -15,34 +16,30 @@ type Session struct {
 	LastUpdatedTime time.Time
 }
 
-func GetSessionByToken(token string) (item *Session, err error) {
-	sql := `SELECT * FROM session WHERE access_token=? AND expire_time> NOW() ORDER BY session_id DESC LIMIT 1 `
+func GetSessionByToken(token string) (item *CygxSession, err error) {
+	sql := `SELECT * FROM cygx_session WHERE access_token=? AND expire_time> NOW() ORDER BY session_id DESC LIMIT 1 `
 	o := orm.NewOrm()
-	o.Using("rddp")
 	err = o.Raw(sql, token).QueryRow(&item)
 	return
 }
 
 func GetSessionCountByToken(token string) (count int, err error) {
-	sql := `SELECT COUNT(1) AS count FROM session WHERE access_token=? AND expire_time> NOW() ORDER BY session_id DESC LIMIT 1 `
+	sql := `SELECT COUNT(1) AS count FROM cygx_session WHERE access_token=? AND expire_time> NOW() ORDER BY session_id DESC LIMIT 1 `
 	o := orm.NewOrm()
-	o.Using("rddp")
 	err = o.Raw(sql, token).QueryRow(&count)
 	return
 }
 
 //添加用户session信息
-func AddSession(item *Session) (err error) {
+func AddSession(item *CygxSession) (err error) {
 	o := orm.NewOrm()
-	o.Using("rddp")
 	_, err = o.Insert(item)
 	return
 }
 
-func GetTokenByUid(uid int) (item *Session, err error) {
-	sql := `SELECT * FROM session WHERE user_id=? AND expire_time> NOW() ORDER BY session_id DESC LIMIT 1 `
+func GetTokenByUid(uid int) (item *CygxSession, err error) {
+	sql := `SELECT * FROM cygx_session WHERE user_id=? AND expire_time> NOW() ORDER BY session_id DESC LIMIT 1 `
 	o := orm.NewOrm()
-	o.Using("rddp")
 	err = o.Raw(sql, uid).QueryRow(&item)
 	return
 }

+ 82 - 12
models/wx_user.go

@@ -42,6 +42,7 @@ type WxUser struct {
 	RegisterPlatform int       `description:"注册平台,1:微信端,2:PC网页端"`
 	IsFreeLogin      bool      `description:"是否免登陆,true:免登陆,false:非免登陆"`
 	LoginTime        time.Time `description:"最近一次登录时间"`
+	SessionKey       string    `description:"微信小程序会话密钥"`
 }
 
 //添加用户信息
@@ -68,6 +69,7 @@ type WxUserItem struct {
 	LoginTime       time.Time `description:"登录时间"`
 	CreatedTime     time.Time `description:"创建时间"`
 	LastUpdatedTime time.Time `description:"最近一次修改时间"`
+	SessionKey      string    `description:"微信小程序会话密钥"`
 }
 
 func GetWxUserItemByUnionid(unionid string) (item *WxUserItem, err error) {
@@ -88,16 +90,84 @@ func GetWxUserItemByOpenId(openId string) (item *WxUserItem, err error) {
 	return
 }
 
-
 type WxLoginResp struct {
-	Authorization  string
-	UserId         int
-	FirstLogin     int
-	Headimgurl     string `description:"用户头像"`
-	Mobile         string `description:"手机号"`
-	Email          string `description:"邮箱"`
-	CompanyName    string `description:"客户名称"`
-	Status         string `description:"状态"`
-	EndDate        string `description:"到期日期"`
-	ProductName    string `description:"客户类型名称"`
-}
+	Authorization string
+	UserId        int
+	FirstLogin    int
+	Headimgurl    string `description:"用户头像"`
+	Mobile        string `description:"手机号"`
+	Email         string `description:"邮箱"`
+	CompanyName   string `description:"客户名称"`
+	Status        string `description:"状态"`
+	EndDate       string `description:"到期日期"`
+	ProductName   string `description:"客户类型名称"`
+}
+
+type WxGetUserInfoReq struct {
+	RawData       string `description:"rawData"`
+	Signature     string `description:"signature"`
+	EncryptedData string `description:"encryptedData"`
+	Iv            string `description:"iv"`
+}
+
+//修改用户会话key
+func ModifyWxUserSessionKey(sessionKey string, userId int) (err error) {
+	o := orm.NewOrm()
+	sql := `UPDATE wx_user SET session_key=? WHERE user_id=? `
+	_, err = o.Raw(sql, sessionKey, userId).Exec()
+	return
+}
+
+//添加用户信息
+func ModifyWxUserInfo(unionId, nickName, province, city, country, avatar string, gender, userId int) (err error) {
+	o := orm.NewOrm()
+	sql := `UPDATE wx_user SET union_id=?,unionid=?,nick_name=?,sex=?,province=?,city=?,country=?,headimgurl=?, WHERE user_id=? `
+	_, err = o.Raw(sql, unionId, unionId, nickName, gender, province, city, country, avatar, userId).Exec()
+	return
+}
+
+//修改用户会话key
+func DeleteWxUserByUserId(userId int) (err error) {
+	o := orm.NewOrm()
+	sql := `DELETE FROM wx_user WHERE user_id=? `
+	_, err = o.Raw(sql, userId).Exec()
+	return
+}
+
+type WxGetUserInfoResp struct {
+	UsersId       int       `orm:"column(id);pk"`
+	Mobile        string    `description:"手机号"`
+	NickName      string    `description:"昵称"`
+	Gender        int       `description:"用户性别 1:男性,2:女性,0:未知(默认)"`
+	CreateTime    time.Time `description:"注册时间"`
+	ModifyTime    time.Time `description:"修改时间"`
+	AvatarUrl     string    `description:"头像地址"`
+	OpenId        string    `description:"open_id"`
+	Unionid       string    `description:"unionid"`
+	City          string    `description:"城市"`
+	Province      string    `description:"省"`
+	Country       string    `description:"国家"`
+	Language      string    `description:"语言"`
+	Appid         string    `description:"Appid"`
+	Timestamp     int64     `description:"时间戳"`
+	Authorization string    `description:"登陆凭证,后续接口调用时,带在请求头里面Key:Authorization"`
+}
+
+type WxGetPhoneNumberReq struct {
+	EncryptedData string `description:"encryptedData"`
+	Iv            string `description:"iv"`
+}
+
+func ModifyUsersMobile(usersId int, phoneNumber string) (err error) {
+	o := orm.NewOrm()
+	sql := `UPDATE wx_user SET mobile=? WHERE user_id=? `
+	_, err = o.Raw(sql, phoneNumber, usersId).Exec()
+	return
+}
+
+type WxGetPhoneNumberResp struct {
+	Authorization   string `description:"登陆凭证,后续接口调用时,带在请求头里面Key:Authorization"`
+	PhoneNumber     string `description:"用户绑定的手机号(国外手机号会有区号)"`
+	PurePhoneNumber string `description:"没有区号的手机号"`
+	CountryCode     string `description:"区号"`
+}