package com.supplier.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 页面
 */
@Controller
@RequestMapping("page")
public class IndexController {

    /**
     * 主页
     * @param model
     * @return
     */
    @RequestMapping("/index")
    public String index(Model model, String token){
        model.addAttribute("token", token);
        return "indexHome";
    }

    /**
     * 首页统计
     * @param model
     * @return
     */
    @RequestMapping("/homeIndex")
    public String homeIndex(Model model){
        return "home/index";
    }

    /**
     * 首页轮播
     * @param model
     * @return
     */
    @RequestMapping("/honePageIndex")
    public String honePageIndex(Model model){
        return "homePage/index";
    }

    /**
     * 需求单列表
     * @param model
     * @return
     */
    @RequestMapping("/demandForSingleIndex")
    public String demandForSingleIndex(Model model, String idVal){
        model.addAttribute("idVal", idVal);
        return "demandForSingle/index";
    }

    /**
     * 提供报价
     * @param model
     * @return
     */
    @RequestMapping("/demandForSingleOffer")
    public String demandForSingleOffer(Model model, String uuid){
        model.addAttribute("uuid", uuid);
        return "demandForSingle/offer";
    }

    /**
     * 个人信息
     * @param model
     * @return
     */
    @RequestMapping("/personalIndex")
    public String personalIndex(Model model){
        return "personal/index";
    }


    /**
     * 个人信息
     * @param model
     * @return
     */
    @RequestMapping("/ceshi")
    public String ceshi(Model model){
        return "personal/ceshi";
    }
}
