2019-10-29 21:52:45 +08:00

89 lines
2.2 KiB
PHP
Executable File

<?php
namespace wstmart\app\controller;
use wstmart\common\model\Shopping as M;
/**
* ============================================================================
* 逛商铺处理类
*/
class Shopping extends Base{
/**
* 获取助微吧轮播
* @return [type] [description]
*/
public function getHelpCarousel(){
$m = new M();
exit(json_encode($m->getHelpCarousel()));
}
/**
* 获取助微吧轮播
* @return [type] [description]
*/
public function getHelpShopCarousel(){
$m = new M();
exit(json_encode($m->getHelpShopCarousel()));
}
/**
* 搜索助微吧商品列表
* @return [type] [description]
*/
public function getHelpShops(){
$m = new M();
exit(json_encode($m->getHelpShops()));
}
public function getHelpSaleShops(){
$m = new M();
exit(json_encode($m->getHelpSaleShops()));
}
public function searchHelpGoods(){
$m = new M();
exit(jsonReturn($m->searchHelpGoods()));
}
/**
* 获取逛商都/助微吧推荐商品
* @return [type] [description]
*/
public function getGoods(){
$m = new M();
exit(json_encode($m->getGoods()));
// $m = Model('common/Table');
// $m->setTable('shops');
}
/**
* 获取逛商铺轮播
* @return [type] [description]
*/
public function getCarousel(){
$m = new M();
exit(json_encode($m->getCarousel()));
}
/**
* 获取逛商铺列表
* @return [type] [description]
*/
public function getShops(){
$m = new M();
exit(json_encode($m->getShops()));
}
/**
* 获取商铺首页
* @return [type] [description]
*/
public function getShopInfo(){
$m = Model('shops');
exit(json_encode($m->getShopIndex()));
// $m = Model('common/Table');
// $m->setTable('shops');
}
/**
* 获取店铺首页商品列表
*/
public function getShopIndexGoodsList(){
$m = Model('common/Shops');
$rs = $m->getShopIndexGoodsList(0,'goodsId,goodsImg,goodsName,shopPrice,saleNum,discountRate','goodsOrder DESC,saleNum DESC,goodsId DESC');
exit(json_encode($rs));
}
}