You've already forked qlg.tsgz.moe
终极提交~
This commit is contained in:
@ -451,11 +451,14 @@ class Shops extends Base{
|
||||
/**
|
||||
* 获取店铺首页商品列表
|
||||
*/
|
||||
public function getShopIndexGoodsList($shopId=0,$field='*',$order='goodsId DESC'){
|
||||
public function getShopIndexGoodsList($shopId=0,$field='*',$order='goodsId DESC', $from=0){
|
||||
$shopId = empty($shopId) ? (int)input('post.shopId') : $shopId;
|
||||
$from = empty($from) ? (int)input('post.from_id', 0) : $from;
|
||||
$m = new TM();
|
||||
$m->setTable('goods');
|
||||
$rs = $m->getSelect(['shopId'=>$shopId,'isSale'=>1,'goodsStatus'=>1,'dataFlag'=>1],$field,$order);
|
||||
$where = ['shopId'=>$shopId,'isSale'=>1,'goodsStatus'=>1,'dataFlag'=>1];
|
||||
if($from==3){$where['discountRate'] = [">=", dataConf('discountRateGtToHelpShopping')];}
|
||||
$rs = $m->getSelect($where,$field,$order);
|
||||
foreach ($rs['Rows'] as &$v) {
|
||||
$v['goodsImg'] = WSTImg($v['goodsImg'],3);
|
||||
}
|
||||
|
Reference in New Issue
Block a user