|
@@ -123,7 +123,7 @@ class Info
|
|
|
}
|
|
|
|
|
|
# 获取店铺的商品列表
|
|
|
- public function getGoods($shop, $column = false, $price_type = false, $sell_type = false, $status = false, $uid = -1)
|
|
|
+ public function getGoods($shop, $column = false, $price_type = false, $sell_type = false, $status = false, $uid = -1, $buy_type = 1)
|
|
|
{
|
|
|
$table = 'shop/goods';
|
|
|
$where['shop_id'] = isset($shop['id']) ? $shop['id'] : $shop;
|
|
@@ -163,14 +163,23 @@ class Info
|
|
|
foreach ($data as $k => $v) {
|
|
|
$d = $this->getGoodsInfo($where['shop_id'], $v, false, true, true, $uid);
|
|
|
if ($d) {
|
|
|
- if ($d['total'] <= 0) {
|
|
|
- if ($d['sku_type'] == 2) {
|
|
|
- $result_2[] = $d;
|
|
|
+ if ($buy_type == 1) {
|
|
|
+ if ($d['total'] <= 0) {
|
|
|
+ if ($d['sku_type'] == 2) {
|
|
|
+ $result_2[] = $d;
|
|
|
+ }
|
|
|
+ // $result_2[] = $d;
|
|
|
+ } else {
|
|
|
+ $result_1[] = $d;
|
|
|
}
|
|
|
- // $result_2[] = $d;
|
|
|
} else {
|
|
|
- $result_1[] = $d;
|
|
|
+ if ($d['total'] <= 0) {
|
|
|
+ $result_2[] = $d;
|
|
|
+ } else {
|
|
|
+ $result_1[] = $d;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|