<?php
namespace app\api\model;

use think\Model;

/**
 * 分类
 */
class Viewpoint extends Model
{

    /**
     * 表名,
     */
    protected $table = 'ta_viewpoint';

    public function data_list($id="viewpoint"){
        //观点或者新闻列表
            $where['type']=$id;
//            var_dump($where);die;
            $list=$this->where($where)->field('*')->select();
//            var_dump($list);die;
            return $list;
    }

    public function details($id){
        $list=$this->where('id',$id)->field('*')->find();
//            var_dump($list);die;
        return $list;
    }




}