Browse Source

feat:backend添加微信公众号模块,菜单增加自定义菜单栏目

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
513cb4359f
  1. 75
      backend/views/layouts/main.php
  2. 5
      backend/views/layouts/sidebar.php

75
backend/views/layouts/main.php

@ -13,40 +13,45 @@ AppAsset::register($this);
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<?php $this->registerCsrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<?php if (YII_ENV == 'dev'){?>
<!-- 开发环境版本,包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<?php } else {?>
<!-- 生产环境版本,优化了尺寸和速度 -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<?php } ?>
<?php $this->head() ?>
</head>
<body class="hold-transition skin-blue-light sidebar-mini">
<?php $this->beginBody() ?>
<div class="wrapper">
<?php
if (Yii::$app->session->hasFlash('error') || Yii::$app->session->hasFlash('success')) {
echo Alert::widget();
}
?>
<div class="content">
<section class="content-header">
<?= $this->render('breadcrumb') ?>
</section>
<section class="content">
<?= $content ?>
</section>
</div>
<head>
<meta charset="<?= Yii::$app->charset ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<?php $this->registerCsrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<?php if (YII_ENV == 'dev'){?>
<!-- 开发环境版本,包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<?php } else {?>
<!-- 生产环境版本,优化了尺寸和速度 -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<?php } ?>
<?php $this->head() ?>
</head>
<body class="hold-transition skin-blue-light sidebar-mini">
<?php $this->beginBody() ?>
<div class="wrapper">
<?= $this->render('header') ?>
</div>
<?php $this->endBody() ?>
</body>
<?= $this->render('sidebar') ?>
<div class="content-wrapper">
<?php
if (Yii::$app->session->hasFlash('error') || Yii::$app->session->hasFlash('success')) {
echo Alert::widget();
}
?>
<section class="content-header">
<?= $this->render('breadcrumb') ?>
</section>
<section class="content">
<?= $content ?>
</section>
</div>
<?= $this->render('footer') ?>
</div>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
<?php $this->endPage() ?>

5
backend/views/layouts/sidebar.php

@ -43,7 +43,10 @@ use iron\widgets\Menu;
['label' => '评论', 'url' => ['/shop/comment/index']],
]
],
['label' => '微信公众号管理', 'url' => '#', 'icon' => 'far fa-comments', 'items' => [
['label' => '自定义菜单', 'url' => ['/wx-public-account/public-account/custom-menu']],
]
],
]
]);
?>

Loading…
Cancel
Save