diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php
index 40efd9f..b6b8add 100755
--- a/backend/views/layouts/main.php
+++ b/backend/views/layouts/main.php
@@ -1,3 +1,4 @@
+
@@ -27,6 +29,11 @@ AppAsset::register($this);
= $this->render('sidebar') ?>
+ session->hasFlash('error') || Yii::$app->session->hasFlash('success')) {
+ echo Alert::widget();
+ }
+ ?>
diff --git a/backend/views/layouts/sidebar.php b/backend/views/layouts/sidebar.php
index b8d3c24..93ec000 100755
--- a/backend/views/layouts/sidebar.php
+++ b/backend/views/layouts/sidebar.php
@@ -21,8 +21,8 @@ use iron\widgets\Menu;
]
],
['label' => '商品管理', 'url' => '#', 'icon' => 'far fa-archive', 'items' => [
- ['label' => '规格管理', 'url' => ['/antgoods/attribute/index']],
['label' => '后台商品分类', 'url' => ['/antgoods/category/index']],
+ ['label' => '规格管理', 'url' => ['/antgoods/attribute/index']],
['label' => '前端商品分类', 'url' => ['/antgoods/shop-category/index']],
['label' => '品牌管理', 'url' => ['/antgoods/brand/index']],
['label' => '供应商管理', 'url' => ['/antgoods/supplier/index']],
diff --git a/common/widgets/Alert.php b/common/widgets/Alert.php
index 7281fa8..40f1fc9 100644
--- a/common/widgets/Alert.php
+++ b/common/widgets/Alert.php
@@ -2,6 +2,7 @@
namespace common\widgets;
use Yii;
+use yii\bootstrap4\Widget;
/**
* Alert widget renders a message from session flash. All flash messages are displayed
@@ -22,7 +23,7 @@ use Yii;
* @author Kartik Visweswaran
* @author Alexander Makarov
*/
-class Alert extends \yii\bootstrap\Widget
+class Alert extends Widget
{
/**
* @var array the alert types configuration for the flash messages.
@@ -59,7 +60,7 @@ class Alert extends \yii\bootstrap\Widget
}
foreach ((array) $flash as $i => $message) {
- echo \yii\bootstrap\Alert::widget([
+ echo \yii\bootstrap4\Alert::widget([
'body' => $message,
'closeButton' => $this->closeButton,
'options' => array_merge($this->options, [