审查视图

app/portal/model/GoodsModel.php 518 字节
sgj authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<?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=''){
        $goods=$this->where($map)->select();
        return $goods;
    }
sgj authored
21
sgj authored
22 23 24 25 26 27
    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;
    }
sgj authored
28
sgj authored
29
}