<?php

namespace app\api\controller\v1;

use app\api\controller\Api;

class Viewpoint
{


    public $restMethodList = 'get|post|put|';

    public function index()
    {


    }

    public function read($id){
        //get
        $result=new Api();
//        if(empty($id)){
//            return $result->sendSuccess("",'信息丢失','403');
//        }
        $groupModel = model('Viewpoint');
//        var_dump($id);die;
        $list=$groupModel->data_list($id);

        if($list){
            return $result->sendSuccess($list,'SUCCESS','200');
        }else{
            return $result->sendSuccess($list,'SUCCESS','200');
        }
    }
    public function details($id){
        $result=new Api();
        $groupModel = model('Viewpoint');
//        var_dump($id);die;
        $list=$groupModel->details($id);

        if($list){
            return $result->sendSuccess($list,'SUCCESS','200');
        }else{
            return $result->sendSuccess($list,'SUCCESS','200');
        }
    }


}