Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
yunxin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
72ad639a
authored
Feb 28, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
login
parent
df8211dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
public/pc/js/controller/login.js
public/pc/js/global.js
resources/views/pc/Login.blade.php
public/pc/js/controller/login.js
View file @
72ad639a
...
...
@@ -6,14 +6,14 @@
this
.
handleBind
(
this
);
},
getUserName
:
function
()
{
var
val
=
$
(
"input[name='
user
name']"
).
val
();
var
val
=
$
(
"input[name='
account_
name']"
).
val
();
if
(
val
)
{
return
val
;
}
return
false
;
},
getPasswd
:
function
()
{
var
val
=
$
(
"input[name='p
w
d']"
).
val
();
var
val
=
$
(
"input[name='p
asswor
d']"
).
val
();
if
(
val
)
{
return
val
;
}
...
...
@@ -35,10 +35,10 @@
dataType
:
'json'
,
timeout
:
10000
,
success
:
function
(
res
)
{
if
(
resp
.
code
>
0
)
{
layer
.
msg
(
resp
.
msg
);
}
else
{
if
(
res
.
code
==
0
)
{
typeof
callback
==
'function'
&&
callback
(
res
);
}
else
{
layer
.
msg
(
res
.
msg
);
}
},
error
:
function
(
res
)
{
...
...
@@ -74,18 +74,23 @@
//提交
$
(
opt
.
submit
).
on
(
'click'
,
function
()
{
if
(
opt
.
calcForm
(
opt
))
{
opt
.
getData
(
function
(
res
)
{
setCookie
(
'yunxin_token'
,
resp
.
data
)
var
params
=
{
'account_name'
:
$
(
"input[name='account_name']"
).
val
(),
'password'
:
$
.
md5
(
$
(
"input[name='password']"
).
val
()),
'code'
:
$
(
"input[name='code']"
).
val
()
}
opt
.
getData
(
params
,
function
(
res
)
{
Util
.
setCookie
(
'yunxin_token'
,
res
.
data
,
1
,
cookieHostname
)
window
.
location
.
href
=
"/web/orderList"
});
}
});
$
(
"input[name='
user
name']"
).
on
(
'blur'
,
function
()
{
$
(
"input[name='
account_
name']"
).
on
(
'blur'
,
function
()
{
opt
.
calcForm
(
opt
);
});
$
(
"input[name='p
w
d']"
).
on
(
'blur'
,
function
()
{
$
(
"input[name='p
asswor
d']"
).
on
(
'blur'
,
function
()
{
opt
.
calcForm
(
opt
);
});
...
...
public/pc/js/global.js
View file @
72ad639a
...
...
@@ -101,5 +101,5 @@
window
.
Util
=
Util
;
}
})(
window
);
var
cookieHostname
=
window
.
location
.
hostname
.
split
(
"."
)[
1
]
+
"."
+
window
.
location
.
hostname
.
split
(
"."
)[
2
];
resources/views/pc/Login.blade.php
View file @
72ad639a
...
...
@@ -42,14 +42,14 @@
<i
class=
"icn i-1"
></i>
<b
class=
"lineBlock emptys"
></b>
</div>
<input
type=
"text"
placeholder=
"请输入手机号/邮箱/企业用户名"
name=
"
user
name"
>
<input
type=
"text"
placeholder=
"请输入手机号/邮箱/企业用户名"
name=
"
account_
name"
>
</div>
<div
class=
"inp-wrap"
>
<div
class=
"arr"
>
<i
class=
"icn i-2"
></i>
<b
class=
"lineBlock emptys"
></b>
</div>
<input
type=
"text"
placeholder=
"请输入登录密码"
name=
"p
w
d"
>
<input
type=
"text"
placeholder=
"请输入登录密码"
name=
"p
asswor
d"
>
</div>
<div
class=
"code clr"
>
<div
class=
"code-inp fl"
>
...
...
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