@@ -87,7 +87,7 @@ trait Order | |||
if (!in_array($where['status'], [-1, -2, -3])) { | |||
$where['pid'] = [0, -1]; | |||
} | |||
$where['store_id'] = 0; | |||
// $where['store_id'] = 0; | |||
$where['type'] = trim($where['type'], ' '); | |||
return app('json')->success($this->services->getOrderList($where, ['*'], ['split' => function ($query) { | |||
$query->field('id,pid'); |
@@ -88,11 +88,12 @@ class CoinController extends BaseServices | |||
// $result[$k]['status'] = '已领取'; | |||
// } | |||
} | |||
//$total = $CoinLog->alias('c')->join($Kouling->getTable() . ' k', 'c.kouling_id = k.id')->count(); | |||
$data = app('json')->successful($result); | |||
// $data = json_decode($data, true); | |||
// $data['total'] = $total; | |||
return $data; | |||
$total = $CoinLog->alias('c')->join($Kouling->getTable() . ' k', 'c.kouling_id = k.id')->where($where)->count(); | |||
$res['data'] = $result; | |||
$res['total'] = $total; | |||
$res['status'] = 200; | |||
$res['msg'] = ''; | |||
return json_encode($res); | |||
} | |||
// public function coinlog(Request $request) | |||
// { |
@@ -192,7 +192,7 @@ class PublicController extends BaseController | |||
unset($menusInfo[$key]); | |||
} | |||
} | |||
if ($value['name'] == '分润商品') { | |||
if ($value['name'] == '分红商品') { | |||
if ($agent_level < 3) { | |||
unset($menusInfo[$key]); | |||
} |
@@ -232,6 +232,7 @@ class UserController | |||
} else { | |||
$item['time_key'] = date('Y年m月d日', $add_time); | |||
} | |||
$item['product_price'] = two_num($item['product_price'] + $item['coin']); | |||
} | |||
$time_data = array_merge(array_unique(array_column($result['list'], 'time_key'))); | |||
} |
@@ -51,6 +51,7 @@ class StoreProductLog extends BaseModel | |||
'store_name', | |||
'image', | |||
'product_price'=>'price', | |||
'coin'=>'coin', | |||
'stock', | |||
'is_show' | |||
]); |
@@ -97,6 +97,8 @@ class StoreProductRelationServices extends BaseServices | |||
$list[$k]['pid'] = $product['product']['id'] ?? 0; | |||
$list[$k]['store_name'] = $product['product']['store_name'] ?? 0; | |||
$list[$k]['price'] = $product['product']['price'] ?? 0; | |||
$list[$k]['coin'] = $product['product']['coin'] ?? 0; | |||
$list[$k]['price'] = two_num($list[$k]['price'] + $list[$k]['coin']); | |||
$list[$k]['ot_price'] = $product['product']['ot_price'] ?? 0; | |||
$list[$k]['sales'] = $product['product']['sales'] ?? 0; | |||
$list[$k]['image'] = get_thumb_water($product['product']['image'] ?? 0); |