diff --git a/src/assets/iconfont/iconfont.js b/src/assets/iconfont/iconfont.js index fce13fd7..31cb15a4 100644 --- a/src/assets/iconfont/iconfont.js +++ b/src/assets/iconfont/iconfont.js @@ -1,6 +1,20 @@ ;(function(window) { var svgSprite = '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + '' + '' + '' + @@ -20,6 +34,20 @@ '' + '' + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + '' + '' + '' + diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 5e1228c1..1b20fb72 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -64,12 +64,13 @@ const user = { actions: { // 邮箱登录 LoginByEmail({ commit }, userInfo) { + const email = userInfo.email.trim(); return new Promise((resolve, reject) => { - loginByEmail(userInfo.email, userInfo.password).then(response => { + loginByEmail(email, userInfo.password).then(response => { const data = response.data; Cookies.set('X-Ivanka-Token', response.data.token); commit('SET_TOKEN', data.token); - commit('SET_EMAIL', userInfo.email); + commit('SET_EMAIL', email); resolve(); }).catch(error => { reject(error); diff --git a/src/utils/index.js b/src/utils/index.js index 05479596..c95b4ab4 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,7 +1,6 @@ /** * Created by jiachenpan on 16/11/18. */ - import showdown from 'showdown' // markdown转化 const converter = new showdown.Converter(); @@ -61,8 +60,6 @@ } // 格式化时间 - - export function getQueryObject(url) { url = url == null ? window.location.href : url; const search = url.substring(url.lastIndexOf('?') + 1); @@ -79,8 +76,6 @@ } - - /** *get getByteLen * @param {Sting} val input value @@ -149,7 +144,6 @@ if (duration <= 0) return; const difference = to - element.scrollTop; const perTick = difference / duration * 10; - setTimeout(() => { console.log(new Date()) element.scrollTop = element.scrollTop + perTick; @@ -162,7 +156,6 @@ if (!element || !className) { return; } - let classString = element.className; const nameIndex = classString.indexOf(className); if (nameIndex === -1) { diff --git a/src/utils/validate.js b/src/utils/validate.js index c293a160..3dbc5fec 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -5,7 +5,7 @@ /* 是否是公司邮箱*/ export function isWscnEmail(str) { const reg = /^[a-z0-9](?:[-_.+]?[a-z0-9]+)*@wallstreetcn\.com$/i; - return reg.test(str); + return reg.test(str.trim()); } /* 合法uri*/