commit
This commit is contained in:
@@ -42,13 +42,20 @@ func (ctrl *EmployeeController) SendXHSCode(c *gin.Context) {
|
||||
// 获取当前登录用户ID
|
||||
employeeID := c.GetInt("employee_id")
|
||||
|
||||
err := ctrl.service.SendXHSCode(req.XHSPhone, employeeID)
|
||||
data, err := ctrl.service.SendXHSCode(req.XHSPhone, employeeID)
|
||||
if err != nil {
|
||||
common.Error(c, common.CodeInternalError, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
common.SuccessWithMessage(c, "验证码已发送,请在小红书APP中查看", nil)
|
||||
// 检查是否需要扫码验证
|
||||
if needCaptcha, ok := data["need_captcha"].(bool); ok && needCaptcha {
|
||||
// 发送验证码时触发风控,返回二维码
|
||||
common.SuccessWithMessage(c, "需要扫码验证", data)
|
||||
return
|
||||
}
|
||||
|
||||
common.SuccessWithMessage(c, "验证码已发送,请在小红书APP中查看", data)
|
||||
}
|
||||
|
||||
// GetProfile 获取员工个人信息
|
||||
|
||||
Reference in New Issue
Block a user