Files
addons
app_download_files
extend
hyhproject
admin
behavior
common
conf
controller
Accreds.php
Addons.php
Adgoods.php
Adpositions.php
Ads.php
Areas.php
Articlecats.php
Articles.php
Attributes.php
Banks.php
Base.php
Brands.php
Carts.php
Cashdraws.php
Chargeitems.php
Cronjobs.php
Datacats.php
Datas.php
Ectday.php
Ectdeal.php
Ecttarget.php
Express.php
Friendlinks.php
Goods.php
Goodsappraises.php
Goodscats.php
Goodsclassify.php
Goodsconsult.php
Homemenus.php
Hooks.php
Images.php
Index.php
Informs.php
LogSysData.php
Logmoneys.php
Logoperates.php
Logsms.php
Logstafflogins.php
Member.php
Menus.php
Messages.php
Mobilebtns.php
Navs.php
Ordercomplains.php
Orderrefunds.php
Orders.php
Payments.php
Platform.php
Privileges.php
Recommends.php
Reports.php
Roles.php
Settlements.php
Shops.php
Speccats.php
Staffs.php
Styles.php
Sysconfigs.php
Templatemsgs.php
TradeRule.php
Userranks.php
Users.php
Userscores.php
Wsysconfigs.php
Wxmenus.php
Wxpassivereplys.php
Wxtemplatemsgs.php
Wxusers.php
model
validate
view
app
common
home
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_startup.php
get_version.php
get_version_new.php
index.html
index.php
reg.lock
robots.txt
qlg.tsgz.moe/hyhproject/admin/controller/Goodsclassify.php
2019-09-06 23:53:10 +08:00

204 lines
5.5 KiB
PHP
Executable File

<?php
namespace wstmart\admin\controller;
use wstmart\admin\model\GoodsClassify as M;
/**
* ============================================================================
* 商品控制器
*/
class Goodsclassify extends Base{
/*查看商品总分类*/
public function index(){
return $this->fetch('list');
}
/**获取商品总分类分页*/
public function pageQuery(){
$m = new M();
$rs = $m->pageQuery();
return WSTGrid($rs);
}
/**获取总分类数据*/
public function get(){
$m = new M();
$rs = $m->getById(input("goodsclassifyId/d"));
return $rs;
}
//添加商品总分类
public function add(){
$m=new M();
$rs=$m->add();
return $rs;
}
//修改商品总分类
public function edit(){
$m=new M();
$rs=$m->edit();
return $rs;
}
/**
* 获取商品分类数据
*/
public function gets(){
$m = new M();
$rs = $m->getByIds(input("goodsclassifyId/d"));
return $rs;
}
//获取商品分类详情
public function catdetail(){
$m=new M();
$row= $m->catdetail();
$id=input('goodsclassifyId');
$this->assign("id",$id);
return $this->fetch('catdetail');
}
//获取商品分类分页
public function catdetailPage(){
$m = new M();
$rs = $m->catdetailPage();
$rs['status'] = 1;
return WSTGrid($rs);
}
/**删除商品总分类下的商品分类*/
public function catdel(){
$m = new M();
return $m->catdel();
}
//获取商品详情
public function detail(){
$m=new M();
$row= $m->detail();
$id=input('catId');
$this->assign("id",$id);
return $this->fetch('detail');
}
//获取商品详情页面
public function detailByPage(){
$m = new M();
$rs = $m->detailByPage();
$rs['status'] = 1;
return WSTGrid($rs);
}
/**删除商品总分类*/
public function del(){
$m = new M();
return $m->del();
}
/*添加商品分类*/
public function add_cat(){
$m = new M();
return $m->add_cat();
}
//获取设置活动页页面
public function setdetail(){
$id=input('goodsclassifyId');
$result=db('goods_classify')->where('goodsclassifyId',$id)->value('goodsclassifyName');
$this->assign(["id"=>$id,'result'=>$result]);
$classify=db('recom_classify')->where('classifyId',$id)->field('recomId,recomName')->select();
$this->assign('classify',$classify);
return $this->fetch('setdetail');
}
//获取商品详情页面
public function setdetailPage(){
$m = new M();
$rs = $m->setdetailPage();
return WSTGrid($rs);
}
//更改活动商品的排序号
public function changeSet(){
$m = new M();
$rs = $m->changeSet();
return $rs;
}
//获取设置活动页页面
public function recom(){
$id=input('goodsclassifyId');
$result=db('goods_classify')->where('goodsclassifyId',$id)->value('goodsclassifyName');
$this->assign(["id"=>$id,'result'=>$result]);
$classify=db('recom_classify')->where('classifyId',$id)->field('recomId,recomName')->select();
$this->assign('classify',$classify);
return $this->fetch('recom');
}
//更改活动商品的排序号
public function changeRecom(){
$m = new M();
$rs = $m->changeRecom();
return $rs;
}
//删除推荐商品
public function recomActiveDel(){
$m = new M();
return $m->recomActiveDel();
}
/**获取总分类数据*/
public function getrecomActive(){
$m = new M();
$rs = $m->getrecomActiveId(input("recomActiveId/d"));
return $rs;
}
//添加商品总分类
public function addrecomActive(){
$m=new M();
$rs=$m->addrecomActive();
return $rs;
}
//获取商品详情页面
public function recomPage(){
$m = new M();
$rs = $m->recomPage();
return WSTGrid($rs);
}
/*查看活动页的活动分类*/
public function cats(){
$this->assign('classifyId',input('classifyId'));
$classify=db('goods_classify')->where('goodsclassifyId',input('classifyId'))->value('goodsclassifyName');
$this->assign('classify',$classify);
return $this->fetch('cats');
}
//查看活动页的活动详情
public function catsPage(){
$m = new M();
$rs = $m->catsPage();
return WSTGrid($rs);
}
/**
* 获取活动数据
*/
public function getCats(){
$m = new M();
$rs = $m->getCatsId(input("recomId/d"));
return $rs;
}
/*添加分类活动分类*/
public function addCats(){
$m = new M();
return $m->addCats();
}
/*更改分类活动分类*/
public function editCats(){
$m = new M();
return $m->editCats();
}
//删除活动页活动分类
public function catsDel(){
$m = new M();
return $m->catsDel();
}
/**
* 获取活动商品详情
*/
public function getGoods(){
$m = new M();
$rs = $m->getGoodsId(input("id/d"));
return $rs;
}
/*添加分类活动分类*/
public function addGoods(){
$m = new M();
return $m->addGoods();
}
//删除活动商品
public function goodsDel(){
$m = new M();
return $m->goodsDel();
}
}