You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
34
hyhproject/home2/controller/Brands.php
Executable file
34
hyhproject/home2/controller/Brands.php
Executable file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace wstmart\home\controller;
|
||||
use wstmart\common\model\Brands as M;
|
||||
/**
|
||||
* ============================================================================
|
||||
* 品牌控制器
|
||||
*/
|
||||
class Brands extends Base{
|
||||
/**
|
||||
* 品牌街
|
||||
*/
|
||||
public function index(){
|
||||
$m = new M();
|
||||
$pagesize = 25;
|
||||
$brandsList = $m->pageQuery($pagesize);
|
||||
$this->assign('list',$brandsList);
|
||||
|
||||
$g = model('goodsCats');
|
||||
$goodsCats = $g->listQuery(0);
|
||||
$this->assign('goodscats',$goodsCats);
|
||||
|
||||
|
||||
$selectedId = (int)input("id");
|
||||
$this->assign('selectedId',$selectedId);
|
||||
return $this->fetch('brands_list');
|
||||
}
|
||||
/**
|
||||
* 获取品牌列表
|
||||
*/
|
||||
public function listQuery(){
|
||||
$m = new M();
|
||||
return ['status'=>1,'list'=>$m->listQuery(input('post.catId/d'))];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user