package com.cirle.scientific.controller.index;

import com.cirle.scientific.utils.DeviceUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/")
@Api("首页相关接口")
public class RootIndexController {

    @GetMapping("")
    @ApiOperation("")
    public String index(HttpServletRequest request){

        if(DeviceUtil.isMobileDevice(request)){
            System.out.println("手机端----------------------");
            return "html5/index/index1";
        }else{
            System.out.println("pc端------------------------");
            return "web/index";
        }
    }

}
