Skip to content

Commit

Permalink
Merge pull request zxwk1998#73 from fwfmiao/master
Browse files Browse the repository at this point in the history
更新
  • Loading branch information
good luck authored Aug 6, 2020
2 parents 0d84a9f + 949ba51 commit 1696caa
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 27 deletions.
8 changes: 3 additions & 5 deletions mock/controller/roleManagement.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { mock } from "mockjs";
const totalCount = 2;
const List = [
{
Expand All @@ -17,8 +16,7 @@ export default [
response(config) {
const { title = "", pageNo = 1, pageSize = 20 } = config.body;
let mockList = List.filter((item) => {
if (title && item.title.indexOf(title) < 0) return false;
return true;
return !(title && item.title.indexOf(title) < 0);
});
const pageList = mockList.filter(
(item, index) =>
Expand All @@ -35,7 +33,7 @@ export default [
{
url: "/roleManagement/doEdit",
type: "post",
response(config) {
response() {
return {
code: 200,
msg: "模拟保存成功",
Expand All @@ -45,7 +43,7 @@ export default [
{
url: "/roleManagement/doDelete",
type: "post",
response(config) {
response() {
return {
code: 200,
msg: "模拟删除成功",
Expand Down
8 changes: 4 additions & 4 deletions mock/controller/table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { mock } from "mockjs";
import { handleRandomImage } from "../utils";

const List = [];
const count = 999;
for (let i = 0; i < count; i++) {
Expand Down Expand Up @@ -50,8 +51,7 @@ export default [
}
const { title = "", pageNo = 1, pageSize = 20 } = config.body;
let mockList = List.filter((item) => {
if (title && item.title.indexOf(title) < 0) return false;
return true;
return !(title && item.title.indexOf(title) < 0);
});
const pageList = mockList.filter(
(item, index) =>
Expand All @@ -68,7 +68,7 @@ export default [
{
url: "/table/doEdit",
type: "post",
response(config) {
response() {
return {
code: 200,
msg: "模拟保存成功",
Expand All @@ -78,7 +78,7 @@ export default [
{
url: "/table/doDelete",
type: "post",
response(config) {
response() {
return {
code: 200,
msg: "模拟删除成功",
Expand Down
4 changes: 1 addition & 3 deletions mock/controller/user.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { handleRandomImage } from "../utils";
const accessTokens = {
admin: "admin-accessToken",
editor: "editor-accessToken",
Expand All @@ -9,7 +8,7 @@ export default [
{
url: "/publicKey",
type: "post",
response(config) {
response() {
return {
code: 200,
msg: "success",
Expand Down Expand Up @@ -83,7 +82,6 @@ export default [
};
},
},

{
url: "/logout",
type: "post",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"clipboard": "^2.0.6",
"codemirror": "^5.56.0",
"core-js": "^3.6.5",
"dayjs": "^1.8.31",
"dayjs": "^1.8.32",
"echarts": "^4.8.0",
"echarts-wordcloud": "^1.1.3",
"element-ui": "^2.13.2",
Expand All @@ -65,7 +65,7 @@
"vue-amap": "^0.5.10",
"vue-echarts": "^5.0.0-beta.0",
"vue-qart": "^2.2.0",
"vue-router": "^3.3.4",
"vue-router": "^3.4.1",
"vuedraggable": "^2.24.0",
"vuex": "^3.5.1",
"zx-comparison": "^1.0.3",
Expand Down
1 change: 1 addition & 0 deletions src/api/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export function logout() {
method: "post",
});
}

export function register() {
return request({
url: "/register",
Expand Down
7 changes: 3 additions & 4 deletions src/colorfulIcon/svg/vab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/config/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import getPageTitle from "@/utils/pageTitle";
import {
authentication,
loginInterception,
routesWhiteList,
progressBar,
recordRoute,
routesWhiteList,
} from "./settings";

VabProgress.configure({
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/support.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { MessageBox } from "element-ui";
import { donation } from "@/config/settings";
import { repository, dependencies } from "../../package.json";
import { dependencies, repository } from "../../package.json";

if (!!window.ActiveXObject || "ActiveXObject" in window) {
MessageBox({
title: "温馨提示",
Expand Down
1 change: 1 addition & 0 deletions src/plugins/vabKeel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Heading, Img, Keel, Text } from "zx-keel";
import "zx-keel/dist/zx-keel.css";

const VabKeel = Keel;
const VabKeelHeading = Heading;
const VabKeelImg = Img;
Expand Down
1 change: 1 addition & 0 deletions src/plugins/vabMarkdownEditor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ZxMarkdownEditor from "zx-markdown-editor";
import "zx-markdown-editor/dist/zx-markdown-editor.css";

const VabMarkdownEditor = ZxMarkdownEditor;
export default VabMarkdownEditor;
1 change: 1 addition & 0 deletions src/plugins/vabVerify.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import VabVerify from "zx-verify";
import "zx-verify/dist/zx-verify.css";

export default VabVerify;
4 changes: 2 additions & 2 deletions src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const mutations = {
state.accessToken = accessToken;
setAccessToken(accessToken);
},
setusername(state, username) {
setUsername(state, username) {
state.username = username;
},
setAvatar(state, avatar) {
Expand Down Expand Up @@ -77,7 +77,7 @@ const actions = {
let { permissions, username, avatar } = data;
if (permissions && username && Array.isArray(permissions)) {
commit("setPermissions", permissions);
commit("setusername", username);
commit("setUsername", username);
commit("setAvatar", avatar);
return permissions;
} else {
Expand Down
3 changes: 0 additions & 3 deletions src/views/vab/echarts/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,6 @@
text: "2099年世界GDP(亿元)",
subtext: "数据来自vue-admin-beautiful杜撰",
},
tooltip: {
trigger: "item",
},
dataRange: {
orient: "horizontal",
min: 0,
Expand Down
3 changes: 1 addition & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ const resolve = (dir) => {

const mockServer = () => {
if (process.env.NODE_ENV === "development") {
const mockServer = require("./mock/mockServer.js");
return mockServer;
return require("./mock/mockServer.js");
} else {
return "";
}
Expand Down

0 comments on commit 1696caa

Please sign in to comment.