package com.everyday.word.controller.user;
|
|
import com.everyday.word.utils.AliyunOneKeyLoginUtil;
|
import com.everyday.word.vo.AcceptData;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.yeshi.utils.JsonUtil;
|
import org.yeshi.utils.StringUtil;
|
|
import javax.servlet.http.HttpSession;
|
|
/**
|
* @author hxh
|
* @title: UserController
|
* @description:
|
* @date 2025/2/7 15:59
|
*/
|
@Controller
|
@RequestMapping("user/login")
|
public class LoginController {
|
|
/**
|
* @return java.lang.String
|
* @author hxh
|
* @description 电话号码登录
|
* @date 16:08 2025/2/7
|
* @param: acceptData
|
* @param: session
|
**/
|
@ResponseBody
|
@RequestMapping("phone")
|
public String phoneLogin(AcceptData acceptData, HttpSession session) {
|
|
|
return JsonUtil.loadTrueResult("");
|
}
|
|
/**
|
* @return java.lang.String
|
* @author hxh
|
* @description 一键登录
|
* @date 16:09 2025/2/7
|
* @param: acceptData
|
* @param: token
|
* @param: session
|
**/
|
@ResponseBody
|
@RequestMapping("one_key")
|
public String oneKeyLogin(AcceptData acceptData, String token, HttpSession session) {
|
String phone = AliyunOneKeyLoginUtil.getMobile(token, "");
|
if (StringUtil.isNullOrEmpty(phone)) {
|
return JsonUtil.loadFalseResult("手机号获取失败");
|
}
|
return JsonUtil.loadTrueResult("");
|
}
|
|
@ResponseBody
|
@RequestMapping("wx")
|
public String wxLogin(AcceptData acceptData, String token, HttpSession session) {
|
return JsonUtil.loadTrueResult("");
|
}
|
|
@ResponseBody
|
@RequestMapping("qq")
|
public String qqLogin(AcceptData acceptData, String token, HttpSession session) {
|
return JsonUtil.loadTrueResult("");
|
}
|
|
|
}
|