You've already forked qlg.tsgz.moe
addons
app_download_files
extend
hyhproject
admin
app
common
home
home2
behavior
common
conf
controller
Ads.php
Alipays.php
Areas.php
Base.php
Brands.php
Carts.php
Cashconfigs.php
Cashdraws.php
Error.php
Favorites.php
Goods.php
Goodsappraises.php
Goodscats.php
Goodsconsult.php
Goodsvirtuals.php
Helpcenter.php
Imports.php
Index.php
Informs.php
Invoices.php
Logmoneys.php
Messages.php
News.php
Ordercomplains.php
Orderrefunds.php
Orders.php
Reports.php
Settlements.php
Shopcats.php
Shopconfigs.php
Shopfreights.php
Shoproles.php
Shops.php
Shopusers.php
Switchs.php
Tmp.php
Unionpays.php
Useraddress.php
Users.php
Userscores.php
Wallets.php
Weixinpays.php
model
validate
view
mobile2
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5436787D.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
99 lines
2.0 KiB
PHP
Executable File
99 lines
2.0 KiB
PHP
Executable File
<?php
|
|
namespace wstmart\home\controller;
|
|
use wstmart\common\model\ShopCats as M;
|
|
/**
|
|
* ============================================================================
|
|
* 门店分类控制器
|
|
*/
|
|
class Shopcats extends Base{
|
|
protected $beforeActionList = ['checkShopAuth'];
|
|
|
|
/**
|
|
* 列表
|
|
*/
|
|
public function index(){
|
|
$m = new M();
|
|
$list = $m->getCatAndChild(session('WST_USER.shopId'),input('post.parentId/d'));
|
|
// mark 添加省份 20180518 by zl
|
|
$areas = $m->getAreas();
|
|
$this->assign('areas',$areas);
|
|
// 判断是否是自营 如果是自营就显示省份
|
|
$shopId = (int)session('WST_USER.shopId');;
|
|
$this->assign('shopId',$shopId);
|
|
// end
|
|
$this->assign('list',$list);
|
|
return $this->fetch("shops/shopcats/list");
|
|
}
|
|
|
|
/**
|
|
* 修改名称
|
|
*/
|
|
public function editName(){
|
|
$m = new M();
|
|
$rs = array();
|
|
if(input('post.id/d')>0){
|
|
$rs = $m->editName();
|
|
}
|
|
return $rs;
|
|
}
|
|
/**
|
|
* 修改排序
|
|
*/
|
|
public function editSort(){
|
|
$m = new M();
|
|
$rs = array();
|
|
if(input('post.id/d')>0){
|
|
$rs = $m->editSort();
|
|
}
|
|
return $rs;
|
|
}
|
|
/**
|
|
* 批量保存商品分类
|
|
*/
|
|
public function batchSaveCats(){
|
|
$m = new M();
|
|
$rs = $m->batchSaveCats();
|
|
return $rs;
|
|
}
|
|
/**
|
|
* 删除操作
|
|
*/
|
|
public function del(){
|
|
$m = new M();
|
|
$rs = $m->del();
|
|
return $rs;
|
|
}
|
|
|
|
/**
|
|
* 列表查询
|
|
*/
|
|
public function listQuery(){
|
|
$m = new M();
|
|
$list = $m->listQuery((int)session('WST_USER.shopId'),input('post.parentId/d'));
|
|
$rs = array();
|
|
$rs['status'] = 1;
|
|
$rs['list'] = $list;
|
|
return $rs;
|
|
}
|
|
|
|
public function changeCatStatus(){
|
|
$m = new M();
|
|
$rs = $m->changeCatStatus();
|
|
return $rs;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 设置分类特产省份 mark 20180515
|
|
*/
|
|
public function setSpecial(){
|
|
$m = new M();
|
|
$rs = $m->setSpecial();
|
|
return $rs;
|
|
}
|
|
|
|
}
|