fix some issu
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Product;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
@@ -179,7 +180,10 @@ class ProductPriceSyncService
|
||||
|
||||
$CP = null;
|
||||
try {
|
||||
$cooper = Http::timeout(8)->get('https://www.livedata.ir/main/static/p.json', [])->json();
|
||||
$cooper = Http::timeout(8)
|
||||
->withOptions(Controller::httpClientOptions([], 8.0))
|
||||
->get('https://www.livedata.ir/main/static/p.json', [])
|
||||
->json();
|
||||
if (isset($cooper['s_301006'], $cooper['s_200103'])) {
|
||||
$CP = (($cooper['s_301006'] / 1000000) * $cooper['s_200103']) * 10;
|
||||
}
|
||||
@@ -238,6 +242,7 @@ class ProductPriceSyncService
|
||||
|
||||
try {
|
||||
$RPrices = Http::timeout(8)
|
||||
->withOptions(Controller::httpClientOptions([], 8.0))
|
||||
->get('http://212.23.201.173:8381/price_list', [])
|
||||
->json();
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
Reference in New Issue
Block a user