+
[{{element.author}}] {{element.title}}
@@ -26,131 +26,133 @@
diff --git a/src/filters/index.js b/src/filters/index.js
index 682d5195..64b5d76d 100644
--- a/src/filters/index.js
+++ b/src/filters/index.js
@@ -24,7 +24,6 @@ export function parseTime(time, cFormat) {
time = +time * 1000
}
-
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}';
let date;
if (typeof time == 'object') {
@@ -75,8 +74,6 @@ export function formatTime(time, option) {
}
}
-
-
/* 数字 格式化*/
export function nFormatter(num, digits) {
const si = [
@@ -95,14 +92,12 @@ export function nFormatter(num, digits) {
return num.toString();
}
-
export function html2Text(val) {
const div = document.createElement('div');
div.innerHTML = val;
return div.textContent || div.innerText;
}
-
export function toThousandslsFilter(num) {
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','));
}
diff --git a/src/main.js b/src/main.js
index cd00bfc9..68bb5661 100644
--- a/src/main.js
+++ b/src/main.js
@@ -20,7 +20,6 @@ import vueWaves from './directive/waves';// 水波纹指令
import errLog from 'store/errLog';// error log组件
import './mock/index.js'; // 该项目所有请求使用mockjs模拟
-
// register globally
Vue.component('multiselect', Multiselect);
Vue.component('Sticky', Sticky);
@@ -28,8 +27,6 @@ Vue.component('icon-svg', IconSvg)
Vue.use(ElementUI);
Vue.use(vueWaves);
-Vue.config.productionTip = false;
-
// register global utility filters.
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
@@ -78,11 +75,12 @@ router.beforeEach((to, from, next) => {
}
});
-
router.afterEach(() => {
NProgress.done(); // 结束Progress
});
+Vue.config.productionTip = false;
+
// 生产环境错误日志
if (process.env === 'production') {
Vue.config.errorHandler = function(err, vm) {
diff --git a/src/mock/login.js b/src/mock/login.js
index a752d359..a8d0dea5 100644
--- a/src/mock/login.js
+++ b/src/mock/login.js
@@ -6,25 +6,21 @@ const userMap = {
token: 'admin',
introduction: '我是超级管理员',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
- name: 'Super Admin',
- uid: '001'
+ name: 'Super Admin'
},
editor: {
role: ['editor'],
token: 'editor',
introduction: '我是编辑',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
- name: 'Normal Editor',
- uid: '002'
-
+ name: 'Normal Editor'
},
developer: {
role: ['develop'],
token: 'develop',
introduction: '我是开发',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
- name: '工程师小王',
- uid: '003'
+ name: '工程师小王'
}
}
diff --git a/src/router/index.js b/src/router/index.js
index 78d1b725..b0741b22 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -29,7 +29,6 @@ const SplitPane = _import('components/splitpane');
const CountTo = _import('components/countTo');
const Mixin = _import('components/mixin');
-
/* charts */
const chartIndex = _import('charts/index');
const KeyboardChart = _import('charts/keyboard');
@@ -63,7 +62,6 @@ const Tab = _import('example/tab/index');
/* permission */
const Permission = _import('permission/index');
-
Vue.use(Router);
/**
diff --git a/src/store/getters.js b/src/store/getters.js
index 4497ba44..375ed59a 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -4,10 +4,7 @@ const getters = {
token: state => state.user.token,
avatar: state => state.user.avatar,
name: state => state.user.name,
- uid: state => state.user.uid,
- email: state => state.user.email,
introduction: state => state.user.introduction,
- auth_type: state => state.user.auth_type,
status: state => state.user.status,
roles: state => state.user.roles,
setting: state => state.user.setting,
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index a134f44f..b6f2b8bd 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -5,10 +5,7 @@ const user = {
state: {
user: '',
status: '',
- email: '',
code: '',
- uid: undefined,
- auth_type: '',
token: Cookies.get('Admin-Token'),
name: '',
avatar: '',
@@ -20,21 +17,12 @@ const user = {
},
mutations: {
- SET_AUTH_TYPE: (state, type) => {
- state.auth_type = type;
- },
SET_CODE: (state, code) => {
state.code = code;
},
SET_TOKEN: (state, token) => {
state.token = token;
},
- SET_UID: (state, uid) => {
- state.uid = uid;
- },
- SET_EMAIL: (state, email) => {
- state.email = email;
- },
SET_INTRODUCTION: (state, introduction) => {
state.introduction = introduction;
},
@@ -70,7 +58,6 @@ const user = {
const data = response.data;
Cookies.set('Admin-Token', response.data.token);
commit('SET_TOKEN', data.token);
- commit('SET_EMAIL', email);
resolve();
}).catch(error => {
reject(error);
@@ -78,7 +65,6 @@ const user = {
});
},
-
// 获取用户信息
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
@@ -87,7 +73,6 @@ const user = {
commit('SET_ROLES', data.role);
commit('SET_NAME', data.name);
commit('SET_AVATAR', data.avatar);
- commit('SET_UID', data.uid);
commit('SET_INTRODUCTION', data.introduction);
resolve(response);
}).catch(error => {
@@ -100,7 +85,7 @@ const user = {
LoginByThirdparty({ commit, state }, code) {
return new Promise((resolve, reject) => {
commit('SET_CODE', code);
- loginByThirdparty(state.status, state.email, state.code, state.auth_type).then(response => {
+ loginByThirdparty(state.status, state.email, state.code).then(response => {
commit('SET_TOKEN', response.data.token);
Cookies.set('Admin-Token', response.data.token);
resolve();
@@ -110,7 +95,6 @@ const user = {
});
},
-
// 登出
LogOut({ commit, state }) {
return new Promise((resolve, reject) => {
diff --git a/src/views/charts/keyboard.vue b/src/views/charts/keyboard.vue
index 44aa752f..ee5e538d 100644
--- a/src/views/charts/keyboard.vue
+++ b/src/views/charts/keyboard.vue
@@ -7,10 +7,11 @@
diff --git a/src/views/components/countTo.vue b/src/views/components/countTo.vue
index f0d6cb42..a405381d 100644
--- a/src/views/components/countTo.vue
+++ b/src/views/components/countTo.vue
@@ -3,7 +3,7 @@
countTo component
+ :separator='_separator' :prefix='_prefix' :suffix='_suffix' :autoplay='false'>
@@ -22,72 +22,72 @@
diff --git a/src/views/components/sticky.vue b/src/views/components/sticky.vue
index 6e29d19f..06e71e18 100644
--- a/src/views/components/sticky.vue
+++ b/src/views/components/sticky.vue
@@ -1,6 +1,6 @@
-
+
平台
@@ -32,7 +32,7 @@
发布
-
+
Sticky header 当页面滚动到预设的位置会吸附在顶部
@@ -90,33 +90,34 @@
我是占位
-
-
+
diff --git a/src/views/dashboard/editor/barChart.vue b/src/views/dashboard/editor/barChart.vue
index dcbb357a..05d00f88 100644
--- a/src/views/dashboard/editor/barChart.vue
+++ b/src/views/dashboard/editor/barChart.vue
@@ -1,6 +1,7 @@
-
+
+
diff --git a/src/views/error/401.vue b/src/views/error/401.vue
index bddfc1de..4982b460 100644
--- a/src/views/error/401.vue
+++ b/src/views/error/401.vue
@@ -28,25 +28,25 @@
diff --git a/src/views/example/form.vue b/src/views/example/form.vue
index c48fcb91..b053ed84 100644
--- a/src/views/example/form.vue
+++ b/src/views/example/form.vue
@@ -120,141 +120,141 @@
diff --git a/src/views/layout/Levelbar.vue b/src/views/layout/Levelbar.vue
index cb40084d..0f98a698 100644
--- a/src/views/layout/Levelbar.vue
+++ b/src/views/layout/Levelbar.vue
@@ -8,42 +8,42 @@
diff --git a/src/views/layout/Navbar.vue b/src/views/layout/Navbar.vue
index 5929e620..7e375037 100644
--- a/src/views/layout/Navbar.vue
+++ b/src/views/layout/Navbar.vue
@@ -1,119 +1,119 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 首页
-
-
-
-
- 项目地址
-
-
- 退出登录
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 首页
+
+
+
+
+ 项目地址
+
+
+ 退出登录
+
+
+
diff --git a/src/views/layout/Sidebar.vue b/src/views/layout/Sidebar.vue
index 169b168e..863b4cc5 100644
--- a/src/views/layout/Sidebar.vue
+++ b/src/views/layout/Sidebar.vue
@@ -1,24 +1,24 @@
-
-
-
+
+
+
diff --git a/src/views/layout/SidebarItem.vue b/src/views/layout/SidebarItem.vue
index 1d31d1ff..22d1de50 100644
--- a/src/views/layout/SidebarItem.vue
+++ b/src/views/layout/SidebarItem.vue
@@ -1,47 +1,47 @@
-
-
-
-
- {{item.children[0].name}}
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
-
-
+
+
+
+
+ {{item.children[0].name}}
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
diff --git a/src/views/layout/TabsView.vue b/src/views/layout/TabsView.vue
index 34b9c860..8cab4f6f 100644
--- a/src/views/layout/TabsView.vue
+++ b/src/views/layout/TabsView.vue
@@ -5,48 +5,47 @@
{{tag.name}}
-
+
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 4207dddf..e7597f91 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -20,72 +20,74 @@