Product.php 1.6 KB
<?php

namespace app\web\controller;

use think\Session;
use think\Cookie;
use think\Request;
use app\web\validate\User as UserValidate;

/**
 * 抽奖管理
 * Class prize
 * @package app\web\controller
 */
class Product extends BaseController
{

    //登录页面
    public function login()
    {
        $this->view->engine->layout(false);
        return $this->fetch();
    }
    public function tologin(Request $request)
    {
        $data = $request->param();

        $name="ybao";
        $pwd="ybao888";
        if($name != $data['name']){

                $data=[
                    'code'=>100,
                    'msg'=>'用户名错误'
                ];
            return json_encode($data);
        }elseif($pwd != $data['pwd']){

            $data=[
                'code'=>100,
                'msg'=>'密码错误'
            ];
            return json_encode($data);
        }else{
            $data=[
                'code'=>200,
                'msg'=>'验证成功'
            ];
            return json_encode($data);

        }
    }



    //商品列表
    public function index()
    {
        $this->view->engine->layout(false);
        return $this->fetch();
    }
    //订单列表
    public function order()
    {
        $this->view->engine->layout(false);
        return $this->fetch();
    }







    //用户列表
    public function rule()
    {
        $this->view->engine->layout(false);
        return $this->fetch();
    }
    //抽奖多渠道
    public function division()
    {
        $this->view->engine->layout(false);
        return $this->fetch();
    }

}