Browse Source

栏目排序 从小到大

master
ahbmz 3 years ago
parent
commit
bdf78a556a
  1. 2
      app/api/controller/Content.php

2
app/api/controller/Content.php

@ -145,7 +145,7 @@ class Content extends Base
$_db = Db::name('product'); $_db = Db::name('product');
$_data = $_db->where('cate_id', $cate_id)->field('id,image,cate_id,title') $_data = $_db->where('cate_id', $cate_id)->field('id,image,cate_id,title')
->where('status', 1) ->where('status', 1)
->page($page, $limit)->select(); ->page($page, $limit)->order('sort DESC')->select();
$_data = $this->replace_img_http($_data->toArray()); $_data = $this->replace_img_http($_data->toArray());
return $this->result($_data, 1, ''); return $this->result($_data, 1, '');
} }

Loading…
Cancel
Save