助购吧点店铺点商品列表内商品应用助购吧筛选

This commit is contained in:
2019-10-29 21:47:26 +08:00
parent 82064c43d5
commit 03aa71bdbd
3 changed files with 5 additions and 3 deletions

View File

@ -453,11 +453,13 @@ class Shops extends Base{
*/
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;
$from = empty($from) ? input('post.from_id', 0) : $from;
$m = new TM();
$m->setTable('goods');
$where = ['shopId'=>$shopId,'isSale'=>1,'goodsStatus'=>1,'dataFlag'=>1];
if($from==3){$where['discountRate'] = [">=", dataConf('discountRateGtToHelpShopping')];}
if((int)$from == 3){
$where['discountRate'] = [">=", dataConf('discountRateGtToHelpShopping')];
}
$rs = $m->getSelect($where,$field,$order);
foreach ($rs['Rows'] as &$v) {
$v['goodsImg'] = WSTImg($v['goodsImg'],3);