GoodsModel.php 670 字节
<?php
/**
 * Created by PhpStorm.
 * auther: sgj
 * Date: 2018/12/17
 * Time: 16:29
 */

namespace app\portal\model;


use think\Model;

class GoodsModel extends Model
{
    public function getList($map=''){
        if (empty($map)){
            $map1['delete_time']=null;
            $goods=$this->where($map1)->select();
            return $goods;
        }
        $goods=$this->where($map)->select();
        return $goods;
    }


    public function getGoodInfo($id){
        $good=$this->where('id',$id)->find()->toArray();
        $good['pic']=json_decode($good['pic'],true);
        $good['content']=getContent($good['content']);
         return $good;
    }

}