Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄瑜
VueElementTemplate
Commits
db83dd50
Commit
db83dd50
authored
Apr 26, 2017
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add iconfont && trim email
parent
45c11f9f
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
10 deletions
+32
-10
iconfont.js
src/assets/iconfont/iconfont.js
+28
-0
user.js
src/store/modules/user.js
+3
-2
index.js
src/utils/index.js
+0
-7
validate.js
src/utils/validate.js
+1
-1
No files found.
src/assets/iconfont/iconfont.js
View file @
db83dd50
This diff is collapsed.
Click to expand it.
src/store/modules/user.js
View file @
db83dd50
...
...
@@ -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
);
...
...
src/utils/index.js
View file @
db83dd50
/**
* 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
)
{
...
...
src/utils/validate.js
View file @
db83dd50
...
...
@@ -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*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment