You've already forked qlg.tsgz.moe
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
H5436787D.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.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;
|
|
}
|
|
|
|
}
|