add iconfont && trim email
This commit is contained in:
parent
45c11f9fe4
commit
db83dd50d1
File diff suppressed because one or more lines are too long
|
@ -64,12 +64,13 @@ const user = {
|
||||||
actions: {
|
actions: {
|
||||||
// 邮箱登录
|
// 邮箱登录
|
||||||
LoginByEmail({ commit }, userInfo) {
|
LoginByEmail({ commit }, userInfo) {
|
||||||
|
const email = userInfo.email.trim();
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
loginByEmail(userInfo.email, userInfo.password).then(response => {
|
loginByEmail(email, userInfo.password).then(response => {
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
Cookies.set('X-Ivanka-Token', response.data.token);
|
Cookies.set('X-Ivanka-Token', response.data.token);
|
||||||
commit('SET_TOKEN', data.token);
|
commit('SET_TOKEN', data.token);
|
||||||
commit('SET_EMAIL', userInfo.email);
|
commit('SET_EMAIL', email);
|
||||||
resolve();
|
resolve();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Created by jiachenpan on 16/11/18.
|
* Created by jiachenpan on 16/11/18.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import showdown from 'showdown' // markdown转化
|
import showdown from 'showdown' // markdown转化
|
||||||
const converter = new showdown.Converter();
|
const converter = new showdown.Converter();
|
||||||
|
|
||||||
|
@ -61,8 +60,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 格式化时间
|
// 格式化时间
|
||||||
|
|
||||||
|
|
||||||
export function getQueryObject(url) {
|
export function getQueryObject(url) {
|
||||||
url = url == null ? window.location.href : url;
|
url = url == null ? window.location.href : url;
|
||||||
const search = url.substring(url.lastIndexOf('?') + 1);
|
const search = url.substring(url.lastIndexOf('?') + 1);
|
||||||
|
@ -79,8 +76,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*get getByteLen
|
*get getByteLen
|
||||||
* @param {Sting} val input value
|
* @param {Sting} val input value
|
||||||
|
@ -149,7 +144,6 @@
|
||||||
if (duration <= 0) return;
|
if (duration <= 0) return;
|
||||||
const difference = to - element.scrollTop;
|
const difference = to - element.scrollTop;
|
||||||
const perTick = difference / duration * 10;
|
const perTick = difference / duration * 10;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log(new Date())
|
console.log(new Date())
|
||||||
element.scrollTop = element.scrollTop + perTick;
|
element.scrollTop = element.scrollTop + perTick;
|
||||||
|
@ -162,7 +156,6 @@
|
||||||
if (!element || !className) {
|
if (!element || !className) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let classString = element.className;
|
let classString = element.className;
|
||||||
const nameIndex = classString.indexOf(className);
|
const nameIndex = classString.indexOf(className);
|
||||||
if (nameIndex === -1) {
|
if (nameIndex === -1) {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
/* 是否是公司邮箱*/
|
/* 是否是公司邮箱*/
|
||||||
export function isWscnEmail(str) {
|
export function isWscnEmail(str) {
|
||||||
const reg = /^[a-z0-9](?:[-_.+]?[a-z0-9]+)*@wallstreetcn\.com$/i;
|
const reg = /^[a-z0-9](?:[-_.+]?[a-z0-9]+)*@wallstreetcn\.com$/i;
|
||||||
return reg.test(str);
|
return reg.test(str.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 合法uri*/
|
/* 合法uri*/
|
||||||
|
|
Loading…
Reference in New Issue