当前位置: 首页 > wzjs >正文

聊城有制作网站的吗软件推广怎么赚钱

聊城有制作网站的吗,软件推广怎么赚钱,wordpress七牛云cdn,网站做优化是什么意思记录:fastadmin表格数据逗号分隔的id关联展示数据名称并实现搜索 1,在查询后增加显示代码 $fields [[field>tags_ids, //关联数据字段display>tags_name, //附加的字段名称primary>id, //关联表主键column>tags_name, //关联表中读取需要显…
记录:fastadmin表格数据逗号分隔的id关联展示数据名称并实现搜索

1,在查询后增加显示代码


$fields = [['field'=>'tags_ids', //关联数据字段'display'=>'tags_name', //附加的字段名称'primary'=>'id', //关联表主键'column'=>'tags_name', //关联表中读取需要显示的字段'model'=>'', //关联模型'table'=>'fa_litestore_tags' //关联表,关联表和关联模型二选一]
];
addtion($list,$fields); //list是数组
// addtion($list->items(),$fields); // list是对象

2,增加搜索功能代码

// 特殊搜索处理
$wheres = [];
$filter = json_decode($this->request->get('filter'), true);
$op = json_decode($this->request->get('op'), true);
if(!empty($filter['tags_name'])){$keyword = $filter['tags_name'];$tagsIds = implode(',', Db::name('litestore_tags')->where(['tags_name'=>['like',"%$keyword%"]])->column('id'));$rex = explode(',', $tagsIds);foreach ($rex as $v){$wheres[] = ['exp',Db::raw("FIND_IN_SET('$v', tags_ids)")];}unset($filter['tags_name']);unset($op['tags_name']);
}
$this->request->get(['filter'=>json_encode($filter)]);
$this->request->get(['op'=>json_encode($op)]);

3,完整示例

/*** 查看*/public function index(){//当前是否为关联查询$this->relationSearch = true;//设置过滤方法$this->request->filter(['strip_tags']);if ($this->request->isAjax()){//如果发送的来源是Selectpage,则转发到Selectpageif ($this->request->request('keyField')){return $this->selectpage();}// 特殊搜索处理$wheres = [];$filter = json_decode($this->request->get('filter'), true);$op = json_decode($this->request->get('op'), true);if(!empty($filter['tags_name'])){$keyword = $filter['tags_name'];$tagsIds = implode(',', Db::name('litestore_tags')->where(['tags_name'=>['like',"%$keyword%"]])->column('id'));$rex = explode(',', $tagsIds);foreach ($rex as $v){$wheres[] = ['exp',Db::raw("FIND_IN_SET('$v', tags_ids)")];}unset($filter['tags_name']);unset($op['tags_name']);}$this->request->get(['filter'=>json_encode($filter)]);$this->request->get(['op'=>json_encode($op)]);list($where, $sort, $order, $offset, $limit) = $this->buildparams();$total = $this->model->with(['category'])    ->where($where)->where($wheres)->where(['sign'=>'10'])->where(['is_delete'=>0])->order($sort, $order)->count();$list = $this->model->with(['category'])    ->where($where)->where($wheres)->where(['sign'=>'10'])->where(['is_delete'=>0])->order($sort, $order)->limit($offset, $limit)->select();$fields = [['field'=>'tags_ids', //关联数据字段'display'=>'tags_name', //附加的字段名称'primary'=>'id', //关联表主键'column'=>'tags_name', //关联表中读取需要显示的字段'model'=>'', //关联模型'table'=>'fa_litestore_tags' //关联表,关联表和关联模型二选一]];addtion($list,$fields); //list是数组// addtion($list->items(),$fields); // list是对象foreach ($list as &$row) {$row->getRelation('category')->visible(['name']);}$list = collection($list)->toArray();$result = array("total" => $total, "rows" => $list);return json($result);}return $this->view->fetch();}

图示:
在这里插入图片描述

http://www.dtcms.com/wzjs/191949.html

相关文章:

  • 网页设计精选网站谷歌官网登录入口
  • 网站迭代全媒体运营师
  • 管理网站模板下载中山360推广
  • 织梦网站支付安装广州网站优化公司如何
  • 多语言网站怎么实现百度推广哪种效果好
  • 网站建设公司中南京seo外包
  • 做众筹的网站有几个什么平台可以推销自己的产品
  • 帮人做图挣外快的网站网站seo推广平台
  • 网站限制浏览次数是怎么做的武汉seo管理
  • 珠宝网站建设以服务营销出名的企业
  • 渠道游戏官网seo关键词分析
  • 陕西企业电脑网站制作大白兔网络营销策划书
  • 网站app的区别制作网页的工具软件
  • 网页制作中的常见问题北京百度seo服务
  • 网站建设公司推广方案百度新闻官网
  • pc网站怎么做com域名多少钱一年
  • 做网站商机常州网站seo
  • 怎么做一个自己网站天津seo
  • 番禺区网站建设哪里有在线资源链接
  • 政府网站建设 报价百度用户服务中心
  • 赣州市网站建设公司建站推广网站
  • be备案网站网站建设教程
  • 新房网站建设公司google seo是什么意思
  • 网站设计如何开始semi
  • 轰趴猫wordpress关键词排名优化公司推荐
  • 网站优化怎么做论坛最新域名查询ip
  • 网站建设经费方案湖南网站优化
  • 荣成做网站的公司加快实施创新驱动发展战略
  • 定制网站建设服务公司黄页推广引流网站
  • 做网站包含的技术谷歌seo和百度seo区别