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
570dca8b
authored
Jun 28, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
css
parent
4128839e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
198 additions
and
23 deletions
Application/Home/View/Login/index.html
Application/Home/View/Register/index.html
Application/Home/View/public/header.html
dist/css/person.css
dist/css/person.css.map
dist/css/person.less
dist/js/global/global.min.js
dist/js/person/login.js
dist/js/person/register.js
Application/Home/View/Login/index.html
View file @
570dca8b
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<p
class=
"t1"
>
IC业务助手
</p>
<p
class=
"t1"
>
IC业务助手
</p>
<p
class=
"t2"
>
让询报价更轻松、便捷
</p>
<p
class=
"t2"
>
让询报价更轻松、便捷
</p>
</div>
</div>
<!--微信绑定-->
<div
class=
"wechat"
style=
"display: none"
>
<div
class=
"wechat"
style=
"display: none"
>
<a
href=
"javascript:;"
class=
"btn"
>
<a
href=
"javascript:;"
class=
"btn"
>
<i
class=
"iconfont iconjuxing22 va-m"
></i>
<i
class=
"iconfont iconjuxing22 va-m"
></i>
...
@@ -25,6 +26,7 @@
...
@@ -25,6 +26,7 @@
<a
href=
"javascript:;"
>
密码登录
</a>
<a
href=
"javascript:;"
>
密码登录
</a>
</p>
</p>
</div>
</div>
<!--绑定手机号-->
<div
class=
"bind-mobile layui-form"
style=
"display: none"
>
<div
class=
"bind-mobile layui-form"
style=
"display: none"
>
<div
class=
"input-wrap"
>
<div
class=
"input-wrap"
>
<i
class=
"iconfont iconjuxing23 va-m"
></i>
<i
class=
"iconfont iconjuxing23 va-m"
></i>
...
@@ -45,6 +47,7 @@
...
@@ -45,6 +47,7 @@
<a
href=
"javascript:;"
class=
"btn"
>
绑定手机号
</a>
<a
href=
"javascript:;"
class=
"btn"
>
绑定手机号
</a>
</div>
</div>
</div>
</div>
<!--验证码登录-->
<div
class=
"verify-code layui-form"
style=
"display: none"
>
<div
class=
"verify-code layui-form"
style=
"display: none"
>
<div
class=
"input-wrap"
>
<div
class=
"input-wrap"
>
<i
class=
"iconfont iconjuxing23 va-m"
></i>
<i
class=
"iconfont iconjuxing23 va-m"
></i>
...
@@ -72,23 +75,26 @@
...
@@ -72,23 +75,26 @@
</p>
</p>
</div>
</div>
</div>
</div>
<!--密码登录-->
<div
class=
"login layui-form"
>
<div
class=
"login layui-form"
>
<div
class=
"input-wrap"
>
<div
class=
"input-wrap"
>
<i
class=
"iconfont iconjuxing23 va-m"
></i>
<i
class=
"iconfont iconjuxing23 va-m"
></i>
<input
type=
"text"
class=
"w w1 va-m"
placeholder=
"请输入手机号"
>
<input
type=
"text"
class=
"w w1 va-m"
placeholder=
"请输入手机号"
name=
"mobile"
>
<div
class=
"sel lineBlock va-m"
>
<div
class=
"sel lineBlock va-m"
>
<select
name=
"interest"
>
<select>
<option
value=
"0"
>
中国 +86
</option>
<option
value=
"0"
>
中国 +86
</option>
<option
value=
"1"
>
香港 +86
</option>
<option
value=
"1"
>
香港 +86
</option>
</select>
</select>
</div>
</div>
</div>
</div>
<div
class=
"input-wrap
error
"
>
<div
class=
"input-wrap"
>
<i
class=
"iconfont iconpassword va-m"
></i>
<i
class=
"iconfont iconpassword va-m"
></i>
<input
type=
"text"
class=
"w w1 va-m"
placeholder=
"请输入密码"
>
<div
class=
"pwd lineBlock"
>
<i
class=
"iconfont iconjuxing27 va-m lineBlock"
></i>
<input
type=
"password"
class=
"w w1 va-m"
placeholder=
"请输入密码"
name=
"password"
>
</div>
<i
class=
"iconfont iconiconxiantiaoshouji va-m lineBlock eyes"
></i>
</div>
</div>
<div
class=
"error-text"
>
<div
class=
"error-text"
style=
"display: none"
>
<i
class=
"iconfont iconjuxing20 va-m"
></i>
<i
class=
"iconfont iconjuxing20 va-m"
></i>
<span
class=
"va-m"
>
验证码错误,请重新输入
</span>
<span
class=
"va-m"
>
验证码错误,请重新输入
</span>
</div>
</div>
...
@@ -96,10 +102,10 @@
...
@@ -96,10 +102,10 @@
<a
href=
"javascript:;"
class=
"fr"
>
忘记密码?
</a>
<a
href=
"javascript:;"
class=
"fr"
>
忘记密码?
</a>
</div>
</div>
<div
class=
"btn-wrap"
>
<div
class=
"btn-wrap"
>
<a
href=
"javascript:;"
class=
"btn"
>
登录
</a>
<a
href=
"javascript:;"
class=
"btn"
lay-submit
lay-filter=
"login"
>
登录
</a>
</div>
</div>
<div
class=
"operate clr"
>
<div
class=
"operate clr"
>
<a
href=
"javascript:;"
class=
"fl l"
>
密
码登录
</a>
<a
href=
"javascript:;"
class=
"fl l"
>
验证
码登录
</a>
<p
class=
"fr r"
>
<p
class=
"fr r"
>
<span>
还没账户?
</span>
<span>
还没账户?
</span>
<a
href=
"passporticsales/register"
>
免费注册
</a>
<a
href=
"passporticsales/register"
>
免费注册
</a>
...
@@ -113,7 +119,15 @@
...
@@ -113,7 +119,15 @@
<include
file=
"public/foot"
/>
<include
file=
"public/foot"
/>
<script
src=
"__PUBLIC__/js/person/login.js"
></script>
<script
src=
"__PUBLIC__/js/person/login.js"
></script>
<script
type=
"text/html"
id=
"pwdHtml"
>
{{
#
if
(
d
.
flag
==
1
)
{
}}
<
input
type
=
"text"
class
=
"w w1 va-m"
placeholder
=
"请输入密码"
name
=
"password"
value
=
"{{d.value}}"
>
{{
#
}
else
{
}}
<
input
type
=
"password"
class
=
"w w1 va-m"
placeholder
=
"请输入密码"
name
=
"password"
value
=
"{{d.value}}"
>
{{
#
}
}}
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
Application/Home/View/Register/index.html
View file @
570dca8b
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<div
class=
"pwd lineBlock"
>
<div
class=
"pwd lineBlock"
>
<input
type=
"password"
class=
"w w1 va-m"
placeholder=
"请输入密码"
name=
"password"
>
<input
type=
"password"
class=
"w w1 va-m"
placeholder=
"请输入密码"
name=
"password"
>
</div>
</div>
<i
class=
"iconfont icon
juxing27
va-m lineBlock eyes"
></i>
<i
class=
"iconfont icon
iconxiantiaoshouji
va-m lineBlock eyes"
></i>
</div>
</div>
<!--验证码-->
<!--验证码-->
<div
class=
"input-wrap"
id=
"verifiCode"
style=
"display: none"
>
<div
class=
"input-wrap"
id=
"verifiCode"
style=
"display: none"
>
...
...
Application/Home/View/public/header.html
View file @
570dca8b
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
<![endif]-->
<![endif]-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/layui/css/layui.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/layui/css/layui.css"
>
<script>
<script>
var
cookieHostname
=
window
.
location
.
hostname
.
split
(
"."
)[
1
]
+
"."
+
window
.
location
.
hostname
.
split
(
"."
)[
2
];
var
auth_url
=
'authapi'
,
var
auth_url
=
'authapi'
,
so_url
=
'soapi'
,
so_url
=
'soapi'
,
user_url
=
'userapi'
,
user_url
=
'userapi'
,
...
...
dist/css/person.css
View file @
570dca8b
...
@@ -237,12 +237,14 @@ body {
...
@@ -237,12 +237,14 @@ body {
font-size
:
14px
;
font-size
:
14px
;
color
:
#0d84d1
;
color
:
#0d84d1
;
}
}
.person
.wrap
.login
.iconiconxiantiaoshouji
,
.person
.wrap
.login
.iconjuxing27
{
.person
.wrap
.login
.iconjuxing27
{
font-size
:
20px
;
font-size
:
20px
;
color
:
#adb6bf
;
color
:
#adb6bf
;
width
:
112px
;
width
:
112px
;
text-align
:
left
;
text-align
:
left
;
padding-left
:
55px
;
padding-left
:
55px
;
cursor
:
pointer
;
}
}
.person
.wrap
.login
.pwd
{
.person
.wrap
.login
.pwd
{
margin-bottom
:
60px
;
margin-bottom
:
60px
;
...
...
dist/css/person.css.map
View file @
570dca8b
This diff is collapsed.
Click to expand it.
dist/css/person.less
View file @
570dca8b
...
@@ -286,12 +286,13 @@ body {
...
@@ -286,12 +286,13 @@ body {
}
}
}
}
.iconjuxing27 {
.icon
iconxiantiaoshouji,.icon
juxing27 {
font-size: 20px;
font-size: 20px;
color: #adb6bf;
color: #adb6bf;
width: 112px;
width: 112px;
text-align: left;
text-align: left;
padding-left: 55px;
padding-left: 55px;
cursor: pointer;
}
}
.pwd {
.pwd {
...
...
dist/js/global/global.min.js
View file @
570dca8b
...
@@ -3,15 +3,19 @@
...
@@ -3,15 +3,19 @@
init
:
function
()
{
init
:
function
()
{
this
.
mounted
(
this
).
handleBind
(
this
);
this
.
mounted
(
this
).
handleBind
(
this
);
},
},
getData
:
function
(
url
,
type
,
param
,
callback
,)
{
getData
:
function
(
url
,
type
,
param
,
callback
,
isload
)
{
//是否启动loadin效果
if
(
isload
==
undefined
){
var
index
=
layer
.
load
(
1
,
{
var
index
=
layer
.
load
(
1
,
{
offset
:
[
'50%'
,
"50%"
],
offset
:
[
'50%'
,
"50%"
],
shade
:
false
shade
:
false
});
});
}
var
platform
=
{
var
platform
=
{
source
:
2
,
source
:
2
token
:
Util
.
getCookie
(
'token'
)
||
''
};
};
var
params
=
$
.
extend
({},
platform
,
param
);
var
params
=
$
.
extend
({},
platform
,
param
);
...
@@ -21,7 +25,6 @@
...
@@ -21,7 +25,6 @@
if
((
navigator
.
userAgent
.
indexOf
(
'MSIE'
)
>=
0
)
&&
(
navigator
.
userAgent
.
indexOf
(
'Opera'
)
<
0
))
{
if
((
navigator
.
userAgent
.
indexOf
(
'MSIE'
)
>=
0
)
&&
(
navigator
.
userAgent
.
indexOf
(
'Opera'
)
<
0
))
{
dataTypeXpx
=
"jsonp"
;
dataTypeXpx
=
"jsonp"
;
}
}
var
cookieHostname
=
window
.
location
.
hostname
.
split
(
"."
)[
1
]
+
"."
+
window
.
location
.
hostname
.
split
(
"."
)[
2
];
$
.
ajax
({
$
.
ajax
({
type
:
type
,
type
:
type
,
...
@@ -88,12 +91,12 @@
...
@@ -88,12 +91,12 @@
* @param domain
* @param domain
* @returns {boolean}
* @returns {boolean}
*/
*/
setCookie
:
function
(
name
,
value
,
time
)
{
setCookie
:
function
(
name
,
value
,
time
,
domain
)
{
//
domain = domain ? ";domain=" + domain : "";
domain
=
domain
?
";domain="
+
domain
:
""
;
var
Days
=
time
;
var
Days
=
time
;
var
exp
=
new
Date
();
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
value
+
";expires="
+
exp
.
toGMTString
();
document
.
cookie
=
name
+
"="
+
value
+
";expires="
+
exp
.
toGMTString
()
+
";path=/"
+
domain
;
return
true
;
return
true
;
},
},
/**
/**
...
@@ -116,11 +119,12 @@
...
@@ -116,11 +119,12 @@
* 删除cookie
* 删除cookie
* @param name
* @param name
*/
*/
delCookie
:
function
(
name
)
{
delCookie
:
function
(
name
,
domain
)
{
var
exp
=
new
Date
();
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
-
1
);
exp
.
setTime
(
exp
.
getTime
()
-
1
);
var
cval
=
this
.
getCookie
(
name
);
var
cval
=
this
.
getCookie
(
name
);
if
(
cval
!=
null
)
document
.
cookie
=
name
+
"="
+
cval
+
";expires="
+
exp
.
toGMTString
();
if
(
cval
!=
null
)
document
.
cookie
=
name
+
"="
+
cval
+
";expires="
+
exp
.
toGMTString
()
+
";path=/"
+
domain
;
},
},
/**
/**
* 获取参数
* 获取参数
...
...
dist/js/person/login.js
View file @
570dca8b
!
function
()
{
!
function
()
{
window
.
LoginController
=
{
window
.
LoginController
=
{
isClick
:
false
,
init
:
function
()
{
init
:
function
()
{
this
.
created
(
this
).
mounted
(
this
).
handleBind
(
this
);
this
.
created
(
this
).
mounted
(
this
).
handleBind
(
this
);
},
},
...
@@ -12,8 +13,148 @@
...
@@ -12,8 +13,148 @@
return
this
;
return
this
;
},
},
calcForm
:
function
(
opt
)
{
var
$mobile
=
$
(
'input[name="mobile"]'
),
$password
=
$
(
'input[name="password"]'
);
if
(
!
$mobile
.
val
())
{
$mobile
.
parent
(
'.input-wrap'
).
addClass
(
'error'
);
return
false
;
}
if
(
!
$password
.
val
())
{
$password
.
parent
().
parent
(
'.input-wrap'
).
addClass
(
'error'
);
return
false
;
}
//密码长度要大于6位,由数字和字母组成
var
reg
=
/^
(?![
0-9
]
+$
)(?![
a-zA-Z
]
+$
)[
0-9A-Za-z
]{6,}
$/
;
if
(
!
reg
.
test
(
$password
.
val
()))
{
$password
.
parent
().
parent
(
'.input-wrap'
).
addClass
(
'error'
);
$
(
".error-text"
).
show
().
find
(
"span"
).
text
(
'密码长度要大于6位,由数字和字母组成'
);
return
false
;
}
$
(
'.error'
).
removeClass
(
'error'
);
return
true
;
},
handleBind
:
function
(
opt
)
{
handleBind
:
function
(
opt
)
{
//手机号
$
(
'input[name="mobile"]'
).
on
(
'input propertychange'
,
function
()
{
var
val
=
$
(
this
).
val
();
if
(
val
)
{
$
(
this
).
parent
(
'.input-wrap'
).
removeClass
(
'error'
);
}
});
//密码
$
(
'input[name="password"]'
).
on
(
'input propertychange'
,
function
()
{
var
val
=
$
(
this
).
val
();
if
(
val
)
{
$
(
this
).
parent
().
parent
(
'.input-wrap'
).
removeClass
(
'error'
);
//符合密码长度要大于6位,由数字和字母组成
var
reg
=
/^
(?![
0-9
]
+$
)(?![
a-zA-Z
]
+$
)[
0-9A-Za-z
]{6,}
$/
;
if
(
reg
.
test
(
val
))
{
$
(
".error-text"
).
hide
();
}
}
});
//查看密码
$
(
".eyes"
).
on
(
'click'
,
function
()
{
//兼容ie
var
flag
;
var
self
=
this
;
if
(
$
(
this
).
hasClass
(
'iconiconxiantiaoshouji'
))
{
$
(
this
).
removeClass
(
'iconiconxiantiaoshouji'
).
addClass
(
'iconjuxing27'
);
}
else
{
$
(
this
).
removeClass
(
'iconjuxing27'
).
addClass
(
'iconiconxiantiaoshouji'
);
}
flag
=
$
(
this
).
hasClass
(
'iconjuxing27'
)
?
'1'
:
'2'
;
var
data
=
{
value
:
$
(
"input[name='password']"
).
val
(),
flag
:
flag
};
var
getTpl
=
pwdHtml
.
innerHTML
;
layui
.
laytpl
(
getTpl
).
render
(
data
,
function
(
html
)
{
$
(
self
).
prev
(
'.pwd'
).
empty
().
html
(
html
);
});
});
//注册提交
layui
.
form
.
on
(
'submit(login)'
,
function
(
data
)
{
if
(
opt
.
calcForm
())
{
$
(
data
.
elem
).
addClass
(
"layui-btn-disabled"
);
if
(
!
opt
.
isClick
)
{
opt
.
isClick
=
true
;
IcController
.
getData
(
apis
.
authlogin
,
'POST'
,
data
.
field
,
function
(
res
)
{
if
(
res
.
err_msg
==
0
)
{
//注入token
Util
.
setCookie
(
'token'
,
res
.
data
.
access_token
,
1
,
cookieHostname
);
}
else
{
layer
.
msg
(
res
.
err_msg
);
opt
.
isClick
=
false
;
$
(
data
.
elem
).
removeClass
(
"layui-btn-disabled"
);
}
});
}
}
else
{
}
});
return
this
;
return
this
;
},
},
...
...
dist/js/person/register.js
View file @
570dca8b
...
@@ -225,10 +225,20 @@
...
@@ -225,10 +225,20 @@
//兼容ie
//兼容ie
var
flag
;
var
flag
;
var
self
=
this
;
$
(
this
).
toggleClass
(
'iconiconxiantiaoshouji'
);
if
(
$
(
this
).
hasClass
(
'iconiconxiantiaoshouji'
))
{
flag
=
$
(
this
).
hasClass
(
'iconiconxiantiaoshouji'
)
?
'1'
:
'2'
;
$
(
this
).
removeClass
(
'iconiconxiantiaoshouji'
).
addClass
(
'iconjuxing27'
);
}
else
{
$
(
this
).
removeClass
(
'iconjuxing27'
).
addClass
(
'iconiconxiantiaoshouji'
);
}
flag
=
$
(
this
).
hasClass
(
'iconjuxing27'
)
?
'1'
:
'2'
;
var
data
=
{
var
data
=
{
value
:
$
(
"input[name='password']"
).
val
(),
value
:
$
(
"input[name='password']"
).
val
(),
...
@@ -260,9 +270,9 @@
...
@@ -260,9 +270,9 @@
if
(
res
.
err_msg
==
0
)
{
if
(
res
.
err_msg
==
0
)
{
//注入token
//注入token
Util
.
setCookie
(
'token'
,
res
.
access_token
);
Util
.
setCookie
(
'token'
,
res
.
access_token
,
1
,
cookieHostname
);
window
.
location
.
href
=
home
icsales
_url
+
'/homes'
;
window
.
location
.
href
=
home_url
+
'/homes'
;
}
else
{
}
else
{
...
...
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