package org.jeecg.api.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.api.bean.LoginReq;
import org.jeecg.api.service.AppletLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.jeecg.common.api.vo.Result;

/**
 * 集中所有登录接口
 */

@Api(tags="项目通用-登录")
@RestController
@RequestMapping("/login_common")
@Slf4j
public class AppletLoginController {

    @Autowired
    private AppletLoginService appletLoginService;

    //微信小程序授权登录
    @ApiOperation(value="微信小程序授权登录", notes="微信小程序授权登录")
	@GetMapping(value = "/appletLogin")
	public Result<Object> appletLogin(LoginReq loginReq){
        return appletLoginService.appletLogin(loginReq);
    }



    //绑定手机号码
    @ApiOperation(value="绑定手机号码", notes="绑定手机号码")
    @GetMapping(value = "/bindPhone")
    public Result<Object> bindPhone(LoginReq loginReq){
        return appletLoginService.bindPhone(loginReq);
    }





}

