🎨 路径变更

This commit is contained in:
x ronger 2020-09-08 08:00:32 +08:00
parent c0d38994a1
commit 8c6bc1a60e
4 changed files with 15 additions and 16 deletions

View File

@ -10,19 +10,19 @@
<i class="el-icon-s-data"></i> <i class="el-icon-s-data"></i>
<span slot="title">Dashboard</span> <span slot="title">Dashboard</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="admin-user"> <el-menu-item index="admin-users">
<i class="el-icon-s-custom"></i> <i class="el-icon-s-custom"></i>
<span slot="title">用户管理</span> <span slot="title">用户管理</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="admin-role"> <el-menu-item index="admin-roles">
<i class="el-icon-s-check"></i> <i class="el-icon-s-check"></i>
<span slot="title">角色管理</span> <span slot="title">角色管理</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="admin-topic"> <el-menu-item index="admin-topics">
<i class="el-icon-postcard"></i> <i class="el-icon-postcard"></i>
<span slot="title">专题管理</span> <span slot="title">专题管理</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="admin-tag"> <el-menu-item index="admin-tags">
<i class="el-icon-postcard"></i> <i class="el-icon-postcard"></i>
<span slot="title">标签管理</span> <span slot="title">标签管理</span>
</el-menu-item> </el-menu-item>

View File

@ -89,7 +89,7 @@
import {mapState} from 'vuex'; import {mapState} from 'vuex';
export default { export default {
name: "role", name: "roles",
fetch({store, params, error}) { fetch({store, params, error}) {
return Promise.all([ return Promise.all([
store store
@ -122,7 +122,7 @@
let _ts = this; let _ts = this;
_ts.$set(_ts, 'dialogVisible', true); _ts.$set(_ts, 'dialogVisible', true);
_ts.$set(_ts, 'title', '编辑角色信息'); _ts.$set(_ts, 'title', '编辑角色信息');
_ts.$set(_ts, 'role', role); _ts.$set(_ts, 'role', roles);
}, },
updateRole() { updateRole() {
let _ts = this; let _ts = this;
@ -144,20 +144,20 @@
toggleStatus(index, role) { toggleStatus(index, role) {
let _ts = this; let _ts = this;
let title, status; let title, status;
if (role.status == 0) { if (roles.status == 0) {
title = '禁用'; title = '禁用';
status = 1; status = 1;
} else { } else {
title = '启用'; title = '启用';
status = 0; status = 0;
} }
_ts.$confirm('确定' + title + '角色 ' + role.name + '?', '提示', { _ts.$confirm('确定' + title + '角色 ' + roles.name + '?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
_ts.$axios.$patch('/api/admin/role/update-status', { _ts.$axios.$patch('/api/admin/role/update-status', {
idRole: role.idRole, idRole: roles.idRole,
status: status status: status
}).then(function (res) { }).then(function (res) {
if (res && res.message) { if (res && res.message) {

View File

@ -98,7 +98,7 @@
import {mapState} from 'vuex'; import {mapState} from 'vuex';
export default { export default {
name: "user", name: "users",
fetch({store, params, error}) { fetch({store, params, error}) {
return Promise.all([ return Promise.all([
store store
@ -130,8 +130,8 @@
}, },
handleRole(index, user) { handleRole(index, user) {
let _ts = this; let _ts = this;
_ts.$set(_ts, 'idUser', user.idUser); _ts.$set(_ts, 'idUser', users.idUser);
_ts.$axios.$get('/api/admin/user/' + user.idUser + '/role') _ts.$axios.$get('/api/admin/user/' + users.idUser + '/role')
.then(function (res) { .then(function (res) {
_ts.$set(_ts, 'dialogVisible', true); _ts.$set(_ts, 'dialogVisible', true);
_ts.$set(_ts, 'idRole', res[0].idRole); _ts.$set(_ts, 'idRole', res[0].idRole);
@ -140,20 +140,20 @@
toggleStatus(index, user) { toggleStatus(index, user) {
let _ts = this; let _ts = this;
let title, status; let title, status;
if (user.status == 0) { if (users.status == 0) {
title = '禁用'; title = '禁用';
status = 1; status = 1;
} else { } else {
title = '启用'; title = '启用';
status = 0; status = 0;
} }
_ts.$confirm('确定' + title + '用户' + user.nickname + '(' + user.account + ')?', '提示', { _ts.$confirm('确定' + title + '用户' + users.nickname + '(' + users.account + ')?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
_ts.$axios.$patch('/api/admin/user/update-status', { _ts.$axios.$patch('/api/admin/user/update-status', {
idUser: user.idUser, idUser: users.idUser,
status: status status: status
}).then(function (res) { }).then(function (res) {
if (res && res.message) { if (res && res.message) {

View File

@ -1,5 +1,4 @@
import Vue from 'vue'; import Vue from 'vue';
import { isBrowser } from '~/environment';
export const ARTICLE_API_PATH = '/api/article' export const ARTICLE_API_PATH = '/api/article'
export const BASE_API_PATH = '/api/console' export const BASE_API_PATH = '/api/console'