add iconfont && trim email

This commit is contained in:
Pan 2017-04-26 14:50:02 +08:00
parent 45c11f9fe4
commit db83dd50d1
4 changed files with 32 additions and 10 deletions

File diff suppressed because one or more lines are too long

View file

@ -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);

View file

@ -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) {

View file

@ -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*/