Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
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
8aa1f4d2
authored
Jul 04, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
dcefbeb0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
19 deletions
dist/js/goodmanage/index.js
dist/js/goodmanage/uploadsingle.js
dist/js/person/login.js
dist/js/goodmanage/index.js
View file @
8aa1f4d2
...
@@ -76,7 +76,15 @@
...
@@ -76,7 +76,15 @@
}
}
});
});
});
});
}
else
if
(
res
.
errcode
==
110001
)
{
}
else
if
(
res
.
errcode
===
501
){
layer
.
msg
(
res
.
errmsg
,
function
()
{
window
.
location
.
href
=
home_url
+
'/login'
;
});
}
else
if
(
res
.
errcode
==
110001
)
{
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
...
...
dist/js/goodmanage/uploadsingle.js
View file @
8aa1f4d2
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
var
str
=
'期货'
;
var
str
=
'期货'
;
data
.
value
==
'
期货'
?
str
=
'期货'
:
str
=
'现
货'
;
data
.
value
==
'
现货'
?
str
=
'现货'
:
str
=
'期
货'
;
var
getTpl
=
deliveryHtml
.
innerHTML
;
var
getTpl
=
deliveryHtml
.
innerHTML
;
...
...
dist/js/person/login.js
View file @
8aa1f4d2
...
@@ -98,7 +98,6 @@
...
@@ -98,7 +98,6 @@
}
}
},
},
calcForm
:
function
(
ele
,
type
)
{
calcForm
:
function
(
ele
,
type
)
{
var
$mobile
=
$
(
ele
).
find
(
'input[name="mobile"]'
),
var
$mobile
=
$
(
ele
).
find
(
'input[name="mobile"]'
),
$password
=
$
(
ele
).
find
(
'input[name="password"]'
),
$password
=
$
(
ele
).
find
(
'input[name="password"]'
),
...
@@ -134,7 +133,7 @@
...
@@ -134,7 +133,7 @@
}
}
if
(
!
$code
.
val
()
&&
type
===
2
)
{
if
(
!
$code
.
val
()
&&
type
===
2
)
{
$code
.
parent
(
'.input-wrap'
).
addClass
(
'error'
);
$code
.
parent
(
'.input-wrap'
).
addClass
(
'error'
);
...
@@ -257,24 +256,25 @@
...
@@ -257,24 +256,25 @@
});
});
//
密
码提交
//
验证
码提交
layui
.
form
.
on
(
'submit(
login
)'
,
function
(
data
)
{
layui
.
form
.
on
(
'submit(
verifyCode
)'
,
function
(
data
)
{
if
(
opt
.
calcForm
(
data
.
form
,
1
))
{
if
(
opt
.
calcForm
(
data
.
form
,
2
))
{
$
(
data
.
elem
).
addClass
(
"layui-btn-disabled"
);
$
(
data
.
elem
).
addClass
(
"layui-btn-disabled"
);
if
(
!
opt
.
isClick
)
{
if
(
!
opt
.
isClick
)
{
opt
.
isClick
=
true
;
opt
.
isClick
=
true
;
IcController
.
getData
(
apis
.
authlogin
,
'POST'
,
data
.
field
,
function
(
res
)
{
IcController
.
getData
(
apis
.
auth
Mobile
login
,
'POST'
,
data
.
field
,
function
(
res
)
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
//注入token
//注入token
Util
.
setCookie
(
'token'
,
res
.
data
.
access_token
,
1
,
cookieHostname
);
Util
.
setCookie
(
'token'
,
res
.
data
.
access_token
,
1
,
cookieHostname
);
window
.
location
.
href
=
home_url
+
'/homes'
;
window
.
location
.
href
=
home_url
+
'/homes'
;
}
else
{
}
else
{
layer
.
msg
(
res
.
err_msg
);
layer
.
msg
(
res
.
err_msg
);
...
@@ -287,27 +287,28 @@
...
@@ -287,27 +287,28 @@
});
});
}
}
}
}
});
});
//
验证
码提交
//
密
码提交
layui
.
form
.
on
(
'submit(
verifyCode
)'
,
function
(
data
)
{
layui
.
form
.
on
(
'submit(
login
)'
,
function
(
data
)
{
if
(
opt
.
calcForm
(
data
.
form
,
1
))
{
if
(
opt
.
calcForm
(
data
.
form
,
2
))
{
$
(
data
.
elem
).
addClass
(
"layui-btn-disabled"
);
$
(
data
.
elem
).
addClass
(
"layui-btn-disabled"
);
if
(
!
opt
.
isClick
)
{
if
(
!
opt
.
isClick
)
{
opt
.
isClick
=
true
;
opt
.
isClick
=
true
;
IcController
.
getData
(
apis
.
auth
Mobile
login
,
'POST'
,
data
.
field
,
function
(
res
)
{
IcController
.
getData
(
apis
.
authlogin
,
'POST'
,
data
.
field
,
function
(
res
)
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
//注入token
//注入token
Util
.
setCookie
(
'token'
,
res
.
data
.
access_token
,
1
,
cookieHostname
);
Util
.
setCookie
(
'token'
,
res
.
data
.
access_token
,
1
,
cookieHostname
);
window
.
location
.
href
=
home_url
+
'/homes'
;
window
.
location
.
href
=
home_url
+
'/homes'
;
}
else
{
}
else
{
layer
.
msg
(
res
.
err_msg
);
layer
.
msg
(
res
.
err_msg
);
...
@@ -321,8 +322,24 @@
...
@@ -321,8 +322,24 @@
}
}
}
}
});
});
$
(
"body"
).
keydown
(
function
()
{
if
(
event
.
keyCode
==
"13"
)
{
if
(
$
(
".layui-form"
).
is
(
":visible"
))
{
$
(
".layui-form"
).
find
(
'a.btn'
).
trigger
(
'click'
);
}
}
});
return
this
;
return
this
;
}
,
}
},
$
(
function
()
{
},
$
(
function
()
{
LoginController
.
init
();
LoginController
.
init
();
})
})
...
...
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