From de992c50a680b81282cdbb318905003c3a28afba Mon Sep 17 00:00:00 2001 From: Pan Date: Thu, 6 Jul 2017 17:56:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 12 +- src/assets/{ => 401_images}/401.gif | Bin src/assets/{ => 404_images}/404.png | Bin src/assets/{ => 404_images}/404_cloud.png | Bin src/components/Charts/keyboard.vue | 3 +- src/components/Charts/keyboard2.vue | 3 +- src/components/Charts/lineMarker.vue | 3 +- src/components/Charts/mixchart.vue | 3 +- src/components/Dropzone/index.vue | 347 +++++++++---------- src/components/ErrLog/index.vue | 83 ++--- src/components/Hamburger/index.vue | 62 ++-- src/components/MDinput/index.vue | 264 +++++++------- src/components/MdEditor/index.vue | 183 +++++----- src/components/PanThumb/index.vue | 247 +++++++------ src/components/Screenfull/index.vue | 77 +++-- src/components/SplitPane/Pane.vue | 69 ++-- src/components/SplitPane/Resizer.vue | 115 ++++--- src/components/SplitPane/index.vue | 188 +++++----- src/components/Sticky/index.vue | 131 +++---- src/components/Tinymce/index.vue | 206 +++++------ src/components/Upload/singleImage.vue | 102 +++--- src/components/Upload/singleImage2.vue | 229 ++++++------ src/components/Upload/singleImage3.vue | 284 ++++++++------- src/components/jsonEditor/index.vue | 98 +++--- src/components/twoDndList/index.vue | 226 ++++++------ src/filters/index.js | 5 - src/main.js | 6 +- src/mock/login.js | 10 +- src/router/index.js | 2 - src/store/getters.js | 3 - src/store/modules/user.js | 18 +- src/views/charts/keyboard.vue | 9 +- src/views/charts/keyboard2.vue | 9 +- src/views/charts/line.vue | 9 +- src/views/charts/mixchart.vue | 9 +- src/views/components/avatarUpload.vue | 61 ++-- src/views/components/countTo.vue | 134 +++---- src/views/components/dndlist.vue | 50 +-- src/views/components/dropzone.vue | 32 +- src/views/components/jsoneditor.vue | 19 +- src/views/components/markdown.vue | 36 +- src/views/components/mixin.vue | 30 +- src/views/components/splitpane.vue | 101 +++--- src/views/components/sticky.vue | 41 +-- src/views/components/tinymce.vue | 16 +- src/views/dashboard/default/index.vue | 144 ++++---- src/views/dashboard/editor/barChart.vue | 3 +- src/views/dashboard/editor/index.vue | 190 +++++----- src/views/dashboard/editor/lineChart.vue | 4 +- src/views/dashboard/editor/pieChart.vue | 3 +- src/views/dashboard/index.vue | 61 ++-- src/views/errlog/index.vue | 22 +- src/views/error/401.vue | 34 +- src/views/error/404.vue | 348 ++++++++++--------- src/views/example/form.vue | 246 ++++++------- src/views/example/table/dragTable.vue | 106 +++--- src/views/example/table/dynamictable.vue | 4 +- src/views/example/table/inlineEditTable.vue | 74 ++-- src/views/example/table/table.vue | 364 ++++++++++---------- src/views/excel/index.vue | 65 ++-- src/views/introduction/index.vue | 2 +- src/views/layout/AppMain.vue | 24 +- src/views/layout/Layout.vue | 138 ++++---- src/views/layout/Levelbar.vue | 62 ++-- src/views/layout/Navbar.vue | 210 +++++------ src/views/layout/Sidebar.vue | 30 +- src/views/layout/SidebarItem.vue | 72 ++-- src/views/layout/TabsView.vue | 53 ++- src/views/login/index.vue | 247 +++++++------ src/views/login/socialsignin.vue | 114 +++--- src/views/permission/index.vue | 36 +- src/views/qiniu/upload.vue | 55 ++- src/views/theme/index.vue | 61 ++-- 73 files changed, 3156 insertions(+), 3151 deletions(-) rename src/assets/{ => 401_images}/401.gif (100%) rename src/assets/{ => 404_images}/404.png (100%) rename src/assets/{ => 404_images}/404_cloud.png (100%) 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 @@