Files
addons
app_download_files
extend
hyhproject
admin
app
common
home
behavior
common
conf
controller
Base.php
Goods.php
Goodscats.php
Index.php
Shopcats.php
Shopconfigs.php
Shopfreights.php
Shoproles.php
Shops.php
Shopusers.php
Users.php
model
validate
view
home2
mobile2
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5B854518.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_startup.php
get_version.php
get_version_new.php
index.html
index.php
reg.lock
robots.txt
qlg.tsgz.moe/hyhproject/home/controller/Shoproles.php
2019-09-06 23:53:10 +08:00

75 lines
1.4 KiB
PHP
Executable File

<?php
namespace wstmart\home\controller;
use wstmart\home\model\ShopRoles as M;
/**
* ============================================================================
* 门店角色控制器
*/
class Shoproles extends Base{
protected $beforeActionList = ['checkShopAuth'];
/**
* 列表
*/
public function index(){
$m = new M();
$list = $m->pageQuery();
$this->assign('list',$list);
return $this->fetch("shops/shoproles/list");
}
/**
* 查询
*/
public function pageQuery(){
$m = new M();
return $m->pageQuery();
}
/**
* 新增角色
*/
public function add(){
$m = new M();
$object = $m->getEModel('shop_roles');
$data = ['object'=>$object];
return $this->fetch('shops/shoproles/edit',$data);
}
/**
* 新增角色
*/
public function toAdd(){
$m = new M();
return $m->add();
}
/**
* 修改角色
*/
public function edit(){
$m = new M();
$object = $m->getById((int)input('get.id'));
$data = ['object'=>$object];
return $this->fetch('shops/shoproles/edit',$data);
}
/**
* 修改角色
*/
public function toEdit(){
$m = new M();
return $m->edit();
}
/**
* 删除操作
*/
public function del(){
$m = new M();
$rs = $m->del();
return $rs;
}
}