[后台-前端]修改后台右上角用户区域,增加退出,我的提交等链接[CI SKIP]
This commit is contained in:
@@ -72,6 +72,7 @@ define("admin", ["jquery", "avalon"], function ($, avalon) {
|
|||||||
var vm = avalon.define({
|
var vm = avalon.define({
|
||||||
$id: "admin",
|
$id: "admin",
|
||||||
template_url: "template/" + hash + ".html",
|
template_url: "template/" + hash + ".html",
|
||||||
|
username: "",
|
||||||
groupId: -1,
|
groupId: -1,
|
||||||
problemId: -1,
|
problemId: -1,
|
||||||
adminNavList: [],
|
adminNavList: [],
|
||||||
@@ -93,6 +94,7 @@ define("admin", ["jquery", "avalon"], function ($, avalon) {
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if(!data.code){
|
if(!data.code){
|
||||||
|
vm.username = data.data.username;
|
||||||
if (data.data.admin_type == 2){
|
if (data.data.admin_type == 2){
|
||||||
vm.adminNavList = superAdminNav;
|
vm.adminNavList = superAdminNav;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body ms-controller="admin">
|
||||||
|
|
||||||
<!-- nav begin -->
|
<!-- nav begin -->
|
||||||
<nav class="navbar navbar-masthead navbar-default navbar-static-top">
|
<nav class="navbar navbar-masthead navbar-default navbar-static-top">
|
||||||
@@ -39,13 +39,13 @@
|
|||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
李扬
|
{{ username }}
|
||||||
<span class="caret"></span></a>
|
<span class="caret"></span></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">我的提交</a></li>
|
<li><a href="/submissions/">我的提交</a></li>
|
||||||
<li><a href="#">我的资料</a></li>
|
<li><a href="#">我的资料</a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
<li><a href="#">退出</a></li>
|
<li><a href="/logout/">退出</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<![endif]-->
|
<![endif]-->
|
||||||
<!-- browser happy end -->
|
<!-- browser happy end -->
|
||||||
|
|
||||||
<div class="container main" ms-controller="admin">
|
<div class="container main">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- admin left begin-->
|
<!-- admin left begin-->
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user