Commit 14aeb988 by 杨树贤

修复bug

parent ab7bac05
...@@ -47,6 +47,7 @@ class IndexController extends Controller ...@@ -47,6 +47,7 @@ class IndexController extends Controller
public function Index($request) public function Index($request)
{ {
$service = new IndexService(); $service = new IndexService();
try {
$statistics = $service->getDailySupplierAddStatistics(); $statistics = $service->getDailySupplierAddStatistics();
$this->data['dates'] = array_values(array_column($statistics['all'], 'date')); $this->data['dates'] = array_values(array_column($statistics['all'], 'date'));
$this->data['all_increase_statistics'] = array_values(array_column($statistics['all'], 'count')); $this->data['all_increase_statistics'] = array_values(array_column($statistics['all'], 'count'));
...@@ -61,6 +62,10 @@ class IndexController extends Controller ...@@ -61,6 +62,10 @@ class IndexController extends Controller
'value' => $userId, 'value' => $userId,
]; ];
} }
} catch (\Exception $exception) {
}
return $this->view('首页'); return $this->view('首页');
} }
......
...@@ -44,7 +44,9 @@ class SkuController extends Controller ...@@ -44,7 +44,9 @@ class SkuController extends Controller
public function SkuList($request) public function SkuList($request)
{ {
$orgId = !empty(request()->user->org_id) ? request()->user->org_id : 1;
$this->data['isIedge'] = $orgId == 1 ? false : true;
$this->data['orgId'] = $orgId;
$skuTags = TagsModel::getTagNamesByTagUse(16, 2); $skuTags = TagsModel::getTagNamesByTagUse(16, 2);
$this->data['skuTags'] = $skuTags; $this->data['skuTags'] = $skuTags;
//获取筛选框的品牌数据 //获取筛选框的品牌数据
...@@ -125,6 +127,9 @@ class SkuController extends Controller ...@@ -125,6 +127,9 @@ class SkuController extends Controller
//批量设置sku显示类型 //批量设置sku显示类型
public function BatchUpdateGoodsLabel($request) public function BatchUpdateGoodsLabel($request)
{ {
$orgId = !empty(request()->user->org_id) ? request()->user->org_id : 1;
$this->data['isIedge'] = $orgId == 1 ? false : true;
$this->data['orgId'] = $orgId;
$this->data['title'] = '批量设置sku显示类型'; $this->data['title'] = '批量设置sku显示类型';
$suppliers = SupplierChannelModel::where('is_type', 0)->where('status', 2) $suppliers = SupplierChannelModel::where('is_type', 0)->where('status', 2)
->select(['supplier_name', 'supplier_code'])->get(); ->select(['supplier_name', 'supplier_code'])->get();
......
...@@ -10,7 +10,7 @@ use Illuminate\Support\Facades\DB; ...@@ -10,7 +10,7 @@ use Illuminate\Support\Facades\DB;
class BaseService class BaseService
{ {
public $logId = 1; public $orgId = 1;
public function __construct() public function __construct()
{ {
......
...@@ -15,9 +15,7 @@ class AppServiceProvider extends ServiceProvider ...@@ -15,9 +15,7 @@ class AppServiceProvider extends ServiceProvider
public function boot() public function boot()
{ {
//共享全局模板变量 //共享全局模板变量
$orgId = !empty(request()->user->org_id) ? request()->user->org_id : 1;
View::share('orgId', $orgId);
View::share('isIedge', $orgId == 1 ? false : true);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment