|
@@ -54,7 +54,9 @@ go(function () {
|
|
|
class Index extends Controller
|
|
|
{
|
|
|
protected $JdSdk;
|
|
|
- protected $response;
|
|
|
+ protected $responseState;
|
|
|
+ protected $responseStock;
|
|
|
+ protected $responsePrice;
|
|
|
|
|
|
public function index()
|
|
|
{
|
|
@@ -89,7 +91,7 @@ class Index extends Controller
|
|
|
|
|
|
$this->JdSdk = new JdSdk();
|
|
|
|
|
|
- $this->response = $this->JdSdk->api_product_sku_state($skuArr);
|
|
|
+ $this->responseState = $this->JdSdk->api_product_sku_state($skuArr);
|
|
|
|
|
|
|
|
|
|
|
@@ -102,7 +104,7 @@ class Index extends Controller
|
|
|
$wait->done();
|
|
|
});
|
|
|
|
|
|
- $this->response()->write($this->response . PHP_EOL);
|
|
|
+ $this->response()->write($this->responseState . PHP_EOL);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -131,13 +133,13 @@ class Index extends Controller
|
|
|
|
|
|
$this->JdSdk = new JdSdk();
|
|
|
|
|
|
- $response = $this->JdSdk->api_stock_get_new_stock_by_id($skuNums, $area);
|
|
|
+ $this->responseStock = $this->JdSdk->api_stock_get_new_stock_by_id($skuNums, $area);
|
|
|
|
|
|
//return $response;
|
|
|
$wait->done();
|
|
|
});
|
|
|
|
|
|
- $this->response()->write($this->response . PHP_EOL);
|
|
|
+ $this->response()->write($this->responseStock . PHP_EOL);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -161,14 +163,14 @@ class Index extends Controller
|
|
|
|
|
|
$this->JdSdk = new JdSdk();
|
|
|
|
|
|
- $response = $this->JdSdk->api_price_get_price($skuStr);
|
|
|
+ $this->responsePrice = $this->JdSdk->api_price_get_price($skuStr);
|
|
|
|
|
|
//$this->response()->write($response . PHP_EOL);
|
|
|
|
|
|
//return $response;
|
|
|
$wait->done();
|
|
|
});
|
|
|
- $this->response()->write($this->response . PHP_EOL);
|
|
|
+ $this->response()->write($this->responsePrice . PHP_EOL);
|
|
|
}
|
|
|
|
|
|
|