Browse Source

演示产品查看

master
李可松 4 years ago
parent
commit
c1023669fb
  1. 4
      app/Http/Controllers/Api/AgentProductController.php

4
app/Http/Controllers/Api/AgentProductController.php

@ -60,9 +60,9 @@ class AgentProductController extends Controller
// TODO 优惠券查询待优化
if (AgentProduct::withTrashed()->where('agent_id', $this->agent_id)->count() === 0) { //演示产品用
$where = ['id' => $id, 'agent_id' => $this->agent_id, 'status' => ProductStatus::ON_SALE];
} else {
$where = ['id' => $id, 'status' => ProductStatus::ON_SALE];
} else {
$where = ['id' => $id, 'agent_id' => $this->agent_id, 'status' => ProductStatus::ON_SALE];
}
$agent_product = AgentProduct::query()
->with(['coupon:tag,agent_product_id'])

Loading…
Cancel
Save