diff --git a/src/App.vue b/src/App.vue index 61ed51d4..a0fae218 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,13 @@ diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index fc330374..a09d10be 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -1,36 +1,46 @@ diff --git a/src/components/MDinput/index.vue b/src/components/MDinput/index.vue index c0164cc4..22cfee3b 100644 --- a/src/components/MDinput/index.vue +++ b/src/components/MDinput/index.vue @@ -1,147 +1,147 @@ diff --git a/src/components/PanThumb/index.vue b/src/components/PanThumb/index.vue index 00b2b2e0..3ea6a601 100644 --- a/src/components/PanThumb/index.vue +++ b/src/components/PanThumb/index.vue @@ -1,145 +1,140 @@ + diff --git a/src/components/Screenfull/index.vue b/src/components/Screenfull/index.vue index c78f4745..39e4ce09 100644 --- a/src/components/Screenfull/index.vue +++ b/src/components/Screenfull/index.vue @@ -1,50 +1,53 @@ diff --git a/src/components/SplitPane/Pane.vue b/src/components/SplitPane/Pane.vue index c6765df0..5695355f 100644 --- a/src/components/SplitPane/Pane.vue +++ b/src/components/SplitPane/Pane.vue @@ -1,41 +1,44 @@ - diff --git a/src/components/SplitPane/Resizer.vue b/src/components/SplitPane/Resizer.vue index e6499c9b..5497ac7f 100644 --- a/src/components/SplitPane/Resizer.vue +++ b/src/components/SplitPane/Resizer.vue @@ -1,71 +1,72 @@ + + diff --git a/src/components/SplitPane/index.vue b/src/components/SplitPane/index.vue index 40b2b57f..a7f1af5e 100644 --- a/src/components/SplitPane/index.vue +++ b/src/components/SplitPane/index.vue @@ -1,111 +1,111 @@ - + + diff --git a/src/components/Sticky/index.vue b/src/components/Sticky/index.vue index 4cf6af45..7490801a 100644 --- a/src/components/Sticky/index.vue +++ b/src/components/Sticky/index.vue @@ -1,73 +1,74 @@ - diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue index 403e028b..878ecde5 100644 --- a/src/components/Tinymce/index.vue +++ b/src/components/Tinymce/index.vue @@ -6,79 +6,79 @@ diff --git a/src/components/Upload/singleImage3.vue b/src/components/Upload/singleImage3.vue index 2a01d0e1..82c282fc 100644 --- a/src/components/Upload/singleImage3.vue +++ b/src/components/Upload/singleImage3.vue @@ -1,154 +1,146 @@ + diff --git a/src/components/jsonEditor/index.vue b/src/components/jsonEditor/index.vue index c49d482f..e36582d0 100644 --- a/src/components/jsonEditor/index.vue +++ b/src/components/jsonEditor/index.vue @@ -4,61 +4,61 @@ - diff --git a/src/components/twoDndList/index.vue b/src/components/twoDndList/index.vue index c7c3577e..fda43b2b 100644 --- a/src/components/twoDndList/index.vue +++ b/src/components/twoDndList/index.vue @@ -3,7 +3,7 @@

{{list1Title}}

-
+
[{{element.author}}] {{element.title}}
@@ -17,7 +17,7 @@

{{list2Title}}

-
+
[{{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 @@ - + 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 @@ 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 @@
admin账号为:admin@wallstreetcn.com 密码随便填
editor账号:editor@wallstreetcn.com 密码随便填
+ 邮箱登录成功,请选择第三方验证 - + +
diff --git a/src/views/login/socialsignin.vue b/src/views/login/socialsignin.vue index 4b4f9e33..89dd061e 100644 --- a/src/views/login/socialsignin.vue +++ b/src/views/login/socialsignin.vue @@ -1,66 +1,68 @@ + diff --git a/src/views/permission/index.vue b/src/views/permission/index.vue index c3159395..92f6df98 100644 --- a/src/views/permission/index.vue +++ b/src/views/permission/index.vue @@ -9,24 +9,24 @@ diff --git a/src/views/qiniu/upload.vue b/src/views/qiniu/upload.vue index 7250458b..a91057ab 100644 --- a/src/views/qiniu/upload.vue +++ b/src/views/qiniu/upload.vue @@ -1,10 +1,5 @@