Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
libai
/
footseen-large-website
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f817f0cf
authored
2 years ago
by
libai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
20098f0a
master
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
986 additions
and
2 deletions
yazhaiTest/lib/demo.js
yazhaiTest/lib/login.js
yazhaiTest/login/login.html
yazhaiTest/pc.html
yazhaiTest/lib/demo.js
0 → 100644
View file @
f817f0cf
alert
(
12121
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
yazhaiTest/lib/login.js
View file @
f817f0cf
...
...
@@ -5,7 +5,7 @@ function loginGo(){
html
+=
' <div style="display: none;" class="login-box1">'
;
html
+=
' <div class="login-title">登入</div>'
;
html
+=
' <div class="phone-login-btn"></div>'
;
html
+=
' <div class="google-login-btn"></div>'
;
html
+=
' <div class="g
-signin2" data-onsuccess="onSignIn" data-theme="dark" class="g
oogle-login-btn"></div>'
;
html
+=
' <div class="more-login"><img src="http://test.ybact.ishuaji.cn/active2022/footseen/images/more-login.png" alt=""></div>'
;
html
+=
' <div class="more-login-box">'
;
html
+=
' <div class="more-login-icon"><img src="http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon2.png" alt=""></div>'
;
...
...
@@ -125,7 +125,20 @@ function loginGo(){
html
+=
'<div class="login-face-out">跳過,稍後再決定</div>'
;
html
+=
'</div>'
;
$
(
".login-content"
).
html
(
html
);
function
onSignIn
(
googleUser
)
{
// Useful data for your client-side scripts:
var
profile
=
googleUser
.
getBasicProfile
();
console
.
log
(
"ID: "
+
profile
.
getId
());
// Don't send this directly to your server!
console
.
log
(
'Full Name: '
+
profile
.
getName
());
console
.
log
(
'Given Name: '
+
profile
.
getGivenName
());
console
.
log
(
'Family Name: '
+
profile
.
getFamilyName
());
console
.
log
(
"Image URL: "
+
profile
.
getImageUrl
());
console
.
log
(
"Email: "
+
profile
.
getEmail
());
// The ID token you need to pass to your backend:
var
id_token
=
googleUser
.
getAuthResponse
().
id_token
;
console
.
log
(
"ID Token: "
+
id_token
);
}
var
html
=
[];
html
+=
'<div style="display: none;" class=nav-login-btn>登入/註冊</div>'
;
html
+=
'<div style="display: none;" class="nav-login">'
;
...
...
This diff is collapsed.
Click to expand it.
yazhaiTest/login/login.html
0 → 100644
View file @
f817f0cf
<!DOCTYPE html>
<html
lang=
"en"
>
<script>
var
indexOk
=
1
;
</script>
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black-translucent"
>
<meta
content=
"telephone=no"
name=
"format-detection"
>
<meta
name=
"wap-font-scale"
content=
"no"
>
<title></title>
<link
rel=
"stylesheet"
href=
"../css/base.css"
>
<link
rel=
"stylesheet"
href=
"../css/layer.css"
>
<link
rel=
"stylesheet"
href=
"../css/neck.css"
>
<link
rel=
"stylesheet"
href=
"../css/login.css"
>
</head>
<body
style=
"background: rgba(0,0,0,0)"
>
<div
class=
"login-content"
></div>
</body>
<script
src=
"../lib/jquery-3.1.1.min.js"
></script>
<script
src=
"../layer-v3.1.0/layer/layer.js"
></script>
<script
src=
"../lib/default.js?v='20220407'"
></script>
<script>
loginGo
()
$
(
".layer-login"
).
show
()
$
(
".login-box1"
).
show
()
function
loginGo
(){
var
html
=
[];
html
+=
'
<
div
class
=
"layer-login"
>
';
html+='
<
img
class
=
"close"
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/close.png"
alt
=
""
>
';
html+='
<
div
style
=
"display: none;"
class
=
"login-box1"
>
';
html+='
<
div
class
=
"login-title"
>
登入
<
/div>'
;
html
+=
'
<
div
class
=
"phone-login-btn"
><
/div>'
;
html
+=
'
<
div
class
=
"google-login-btn"
><
/div>'
;
html
+=
'
<
div
class
=
"more-login"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/more-login.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-box"
>
';
html+='
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon2.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon3.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon4.png"
alt
=
""
><
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
style
=
"display: none;"
class
=
"login-box2"
>
';
html+='
<
div
class
=
"login-title"
>
登入
<
/div>'
;
html
+=
'
<
div
data
-
type
=
"1"
class
=
"login-input-area"
>
';
html+='
<
div
class
=
"nation-search"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/front/search.png"
"
><
input
placeholder
=
"輸入搜索內容"
type
=
"text"
><
/div>
'
html
+=
'
<
p
class
=
"login-area-p1"
>
國家地區
<
/p>'
;
html
+=
'
<
p
class
=
"login-area-p2"
><
span
>
台灣
<
/span> <img src="http:/
/
test
.
ybact
.
ishuaji
.
cn
/
active2022
/
footseen
/
images
/
arrow
.
png
" alt="
"
><
/p>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
ul
class
=
"login-input-ul"
><
/ul>'
;
html
+=
'
<
div
class
=
"login-input-phone"
>
';
html+='
<
span
class
=
"login-input-phone-span"
>+
886
<
/span>'
;
html
+=
'
<
input
oninput
=
"value=value.replace(/[^\\d]/g,\'\')"
class
=
"login-input1"
maxlength
=
"15"
placeholder
=
"請輸入手機號碼"
type
=
"text"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-submit-btn"
>
登入
<
/div>'
;
html
+=
'
<
div
class
=
"more-login"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/more-login.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-box"
>
';
html+='
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon1.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon2.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon3.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon4.png"
alt
=
""
><
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
style
=
"display: none;"
class
=
"login-box3"
>
';
html+='
<
div
style
=
"padding-top: 110px;"
class
=
"login-title"
>
登入
<
/div>'
;
html
+=
'
<
div
class
=
"login-input-area"
>
';
html+='
<
div
class
=
"nation-search"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/front/search.png"
"
><
input
placeholder
=
"輸入搜索內容"
type
=
"text"
><
/div>
'
html
+=
'
<
p
class
=
"login-area-p1"
>
國家地區
<
/p>'
;
html
+=
'
<
p
class
=
"login-area-p2"
><
span
>
台灣
<
/span> <img src="http:/
/
test
.
ybact
.
ishuaji
.
cn
/
active2022
/
footseen
/
images
/
arrow
.
png
" alt="
"
><
/p>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
ul
class
=
"login-input-ul"
><
/ul>'
;
html
+=
'
<
div
class
=
"login-input-phone"
>
';
html+='
<
span
class
=
"login-input-phone-span"
>+
886
<
/span>'
;
html
+=
'
<
input
class
=
"login-input1"
oninput
=
"value=value.replace(/[^\\d]/g,\'\')"
maxlength
=
"15"
placeholder
=
"請輸入手機號碼"
type
=
"text"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-input-password"
>
';
html+='
<
span
class
=
"login-input-phone-span"
>
密碼
<
/span>'
;
html
+=
'
<
input
class
=
"login-input2"
maxlength
=
"15"
placeholder
=
"請輸入您的密碼"
type
=
"password"
>
';
html+='
<
/div>'
;
html
+=
'
<
span
class
=
"login-no-password"
>
忘記密碼
<
/span>'
;
html
+=
'
<
div
class
=
"login-submit-btn"
>
登入
<
/div>'
;
html
+=
'
<
div
style
=
"margin-top: 35px;"
class
=
"more-login"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/more-login.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-box"
>
';
html+='
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon1.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon2.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon3.png"
alt
=
""
><
/div>'
;
html
+=
'
<
div
class
=
"more-login-icon"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/login-icon4.png"
alt
=
""
><
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
style
=
"display: none;"
class
=
"login-box4"
>
';
html+='
<
div
style
=
"padding-top: 110px;"
class
=
"login-title"
>
重置密碼
<
/div>'
;
html
+=
'
<
div
class
=
"login-input-area"
>
';
html+='
<
div
class
=
"nation-search"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/front/search.png"
"
><
input
placeholder
=
"輸入搜索內容"
type
=
"text"
><
/div>
'
html
+=
'
<
p
class
=
"login-area-p1"
>
國家地區
<
/p>'
;
html
+=
'
<
p
class
=
"login-area-p2"
><
span
>
香港
<
/span> <img src="http:/
/
test
.
ybact
.
ishuaji
.
cn
/
active2022
/
footseen
/
images
/
arrow
.
png
" alt="
"
><
/p>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
ul
class
=
"login-input-ul"
><
/ul>'
;
html
+=
'
<
div
class
=
"login-input-phone"
>
';
html+='
<
span
class
=
"login-input-phone-span"
>+
886
<
/span>'
;
html
+=
'
<
input
class
=
"login-input1"
oninput
=
"value=value.replace(/[^\\d]/g,\'\')"
maxlength
=
"16"
placeholder
=
"請輸入手機號碼"
type
=
"text"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-code-box"
>
';
html+='
<
input
placeholder
=
"請輸入驗證碼"
oninput
=
"value=value.replace(/[^\\d]/g,\'\')"
maxlength
=
"6"
class
=
"login-code-input"
type
=
"text"
>
';
html+='
<
div
class
=
"login-code-btn"
>
獲取驗證碼
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
class
=
"login-new-password1"
>
';
html+='
<
input
placeholder
=
"請設置6-16位新密碼"
maxlength
=
"16"
class
=
"login-new-password-input"
type
=
"password"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-new-password2"
>
';
html+='
<
input
placeholder
=
"請再次輸入新密碼"
maxlength
=
"16"
class
=
"login-new-password-input"
type
=
"password"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-submit-btn2"
>
確定
<
/div>'
;
html
+=
'
<
div
class
=
"login-back"
>
返回登入
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
style
=
"display: none;"
class
=
"layer-register"
>
';
html+='
<
div
class
=
"layer-register-left"
>
';
html+='
<
div
style
=
"padding-top: 70px;"
class
=
"login-title"
>
註冊
<
/div>'
;
html
+=
'
<
div
class
=
"login-input-area"
>
';
html+='
<
div
class
=
"nation-search"
><
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/front/search.png"
"
><
input
placeholder
=
"輸入搜索內容"
type
=
"text"
><
/div>
'
html
+=
'
<
p
class
=
"login-area-p1"
>
國家地區
<
/p>'
;
html
+=
'
<
p
class
=
"login-area-p2"
><
span
>
香港
<
/span> <img src="http:/
/
test
.
ybact
.
ishuaji
.
cn
/
active2022
/
footseen
/
images
/
arrow
.
png
" alt="
"
><
/p>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
ul
class
=
"login-input-ul"
><
/ul>'
;
html
+=
'
<
div
class
=
"login-input-phone"
>
';
html+='
<
span
class
=
"login-input-phone-span"
>+
886
<
/span>'
;
html
+=
'
<
input
class
=
"login-input1"
oninput
=
"value=value.replace(/[^\\d]/g,\'\')"
maxlength
=
"16"
placeholder
=
"請輸入手機號碼"
type
=
"text"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-code-box"
>
';
html+='
<
input
placeholder
=
"請輸入驗證碼"
oninput
=
"value=value.replace(/[^\\d]/g,\'\')"
maxlength
=
"6"
class
=
"login-code-input"
type
=
"text"
>
';
html+='
<
div
class
=
"login-code-btn"
>
獲取驗證碼
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
class
=
"login-new-password1"
>
';
html+='
<
input
placeholder
=
"請設置6-16位密碼"
maxlength
=
"16"
class
=
"login-new-password-input"
type
=
"password"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-submit-btn2"
>
創建免費賬戶
<
/div>'
;
html
+=
'
<
p
class
=
"login-register-tips"
>
已有賬號,
<
span
>
立即登錄
<
/span></
p
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"layer-register-right"
><
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
style
=
"display:none"
class
=
"layer-login-face"
>
';
html+='
<
div
class
=
"login-face-tips1"
>
恭喜完成註冊
<
/div> '
;
html
+=
'
<
div
class
=
"login-face-tips2"
>
請上傳您喜歡的頭像和上傳暱稱
<
/div>'
;
html
+=
'
<
div
class
=
"login-face-imgBox"
>
';
html+='
<
img
src
=
"http://test.ybact.ishuaji.cn/active2022/footseen/images/up-face.png"
alt
=
""
>
';
html+='
<
div
>
上傳頭像
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
class
=
"login-face-input"
>
';
html+='
<
input
onblur
=
"value=value.replace(/^\\s+|\\s+$/g,\'\')"
maxlength
=
"12"
placeholder
=
"設置您的昵稱"
type
=
"text"
>
';
html+='
<
/div>'
;
html
+=
'
<
div
class
=
"login-face-btn"
>
進入
Footseen
<
/div>'
;
html
+=
'
<
div
class
=
"login-face-out"
>
跳過,稍後再決定
<
/div>'
;
html
+=
'
<
/div>'
;
$
(
".login-content"
).
html
(
html
);
var
html
=
[];
html
+=
'
<
div
style
=
"display: none;"
class
=
nav
-
login
-
btn
>
登入
/
註冊
<
/div>'
;
html
+=
'
<
div
style
=
"display: none;"
class
=
"nav-login"
>
';
html+='
<
img
class
=
"nav-login-face"
src
=
""
alt
=
""
>
';
html+='
<
div
class
=
"nav-login-more"
>
';
html+='
<
div
class
=
"nav-login-more-jiao"
><
/div>'
;
html
+=
'
<
div
class
=
"nav-login-more-top"
>
';
html+='
<
img
class
=
"login-more-top-face"
src
=
""
alt
=
""
>
';
html+='
<
p
class
=
"login-more-top-p1"
>
主播暱稱預留
<
/p>'
;
html
+=
'
<
p
class
=
"login-more-top-p2"
>
ID
:
246524
<
/p>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
div
class
=
"login-more-content-box"
>
';
html+='
<
div
data
-
type
=
"1"
>
用戶中心
<
/div>'
;
html
+=
'
<
div
data
-
type
=
"2"
>
儲值中心
<
/div>'
;
html
+=
'
<
div
data
-
type
=
"3"
>
我的露水
<
/div>
'
html
+=
'
<
div
data
-
type
=
"4"
>
追蹤管理
<
/div>'
;
html
+=
'
<
div
data
-
type
=
"5"
>
登出
<
/div>'
;
html
+=
'
<
/div>'
;
html
+=
'
<
/div>'
;
$
(
".nav-login-big-box"
).
html
(
html
);
if
(
typeof
(
indexOk
)
==
"undefined"
){
var
html
=
[];
html
+=
'
<
ul
class
=
"neck-nav-ul"
>
';
html+='
<
a
href
=
"https://www.footseen.xyz/yazhaiTest/pc.html"
><
li
data
-
type
=
"1"
><
span
>
主頁
<
/span> <img src="https:/
/
www
.
footseen
.
xyz
/
yazhaiTest
/
images
/
front
/
nack
-
icon
.
png
" alt="
"
><
/li></
a
>
';
html+='
<
a
target
=
"_blank"
href
=
"https://www.footseen.xyz/yazhaiTest/pc.html?jump=2"
><
li
data
-
type
=
"2"
><
span
>
直播
<
/span> <img src="https:/
/
www
.
footseen
.
xyz
/
yazhaiTest
/
images
/
front
/
nack
-
icon
.
png
" alt="
"
><
/li></
a
>
';
html+='
<
a
target
=
"_blank"
href
=
"https://www.footseen.xyz/yazhaiTest/pc.html?jump=3"
><
li
data
-
type
=
"3"
><
span
>
追蹤
<
/span> <img src="https:/
/
www
.
footseen
.
xyz
/
yazhaiTest
/
images
/
front
/
nack
-
icon
.
png
" alt="
"
><
/li></
a
>
';
html+='
<
a
target
=
"_blank"
href
=
"https://www.footseen.xyz/yazhaiTest/pc.html?jump=4"
><
li
data
-
type
=
"4"
><
span
>
影片
<
/span> <img src="https:/
/
www
.
footseen
.
xyz
/
yazhaiTest
/
images
/
front
/
nack
-
icon
.
png
" alt="
"
><
/li></
a
>
';
html+='
<
a
target
=
"_blank"
href
=
"https://www.footseen.xyz/yazhaiTest/pc.html?jump=5"
><
li
data
-
type
=
"5"
><
span
>
圖文
<
/span> <img src="https:/
/
www
.
footseen
.
xyz
/
yazhaiTest
/
images
/
front
/
nack
-
icon
.
png
" alt="
"
><
/li></
a
>
';
html+='
<
a
target
=
"_blank"
href
=
"https://www.footseen.xyz/yazhaiTest/pc.html?jump=6"
><
li
data
-
type
=
"6"
><
span
>
約會
<
/span> <img src="https:/
/
www
.
footseen
.
xyz
/
yazhaiTest
/
images
/
front
/
nack
-
icon
.
png
" alt="
"
><
/li></
a
>
';
html+='
<
/ul>'
;
$
(
".neck-nav-content"
).
append
(
html
)
}
if
(
localStorage
.
uid
!=
undefined
&&
localStorage
.
uid
!=
"undefined"
){
$
.
ajax
({
url
:
$ip
+
'user/queryUserBaseInfo'
,
data
:{
uid
:
localStorage
.
uid
,
token
:
localStorage
.
token
,
// pass:true,
pageID
:
localStorage
.
canvasCode
,
},
success
:
function
(
data
){
console
.
log
(
'获取用户基本信息'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
window
.
localStorage
.
removeItem
(
"uid"
)
window
.
localStorage
.
removeItem
(
"token"
)
$
(
".nav-login-btn"
).
show
()
return
;
}
$
(
".nav-login-face"
).
attr
(
"src"
,
"https://zhibocdn.yabolive.net/comm"
+
data
.
userData
.
face
+
"?x-oss-process=image/resize,w_46"
)
$
(
".login-more-top-face"
).
attr
(
"src"
,
"https://zhibocdn.yabolive.net/comm"
+
data
.
userData
.
face
+
"?x-oss-process=image/resize,w_52"
)
$
(
".login-more-top-p1"
).
text
(
data
.
userData
.
nickname
)
$
(
".login-more-top-p2"
).
text
(
'ID:'
+
data
.
userData
.
uid
)
$
(
".nav-login-btn"
).
hide
()
$
(
".nav-login"
).
show
()
richMouse
()
}
})
$
(
".login-more-content-box div"
).
on
(
"click"
,
function
(){
var
_self
=
$
(
this
);
if
(
_self
.
attr
(
"data-type"
)
==
1
){
window
.
location
.
href
=
"http://test.ybact.ishuaji.cn/active2022/footseen/space/myRoom.html"
}
if
(
_self
.
attr
(
"data-type"
)
==
2
){
window
.
location
.
href
=
"http://test.ybact.ishuaji.cn/active2022/footseen/reg/index.html"
}
if
(
_self
.
attr
(
"data-type"
)
==
3
){
window
.
location
.
href
=
"http://test.ybact.ishuaji.cn/active2022/footseen/dewExc/index.html"
}
if
(
_self
.
attr
(
"data-type"
)
==
4
){
window
.
location
.
href
=
"http://test.ybact.ishuaji.cn/active2022/footseen/space/like.html"
}
if
(
_self
.
attr
(
"data-type"
)
==
5
){
window
.
localStorage
.
removeItem
(
"uid"
)
window
.
localStorage
.
removeItem
(
"token"
)
window
.
location
.
reload
()
}
})
}
else
{
$
(
".nav-login-btn"
).
show
()
}
$
(
".close"
).
on
(
"click"
,
function
(){
layer
.
closeAll
()
})
$
(
".nav-login-btn"
).
on
(
"click"
,
function
(){
$
(
".login-box1"
).
show
()
$
(
".login-box2"
).
hide
()
$
(
".login-box3"
).
hide
()
$
(
".login-box4"
).
hide
()
layer
.
open
({
type
:
1
,
title
:
false
,
shadeClose
:
true
,
skin
:
"yourclass5"
,
area
:
[
"470px"
,
"631px"
],
content
:
$
(
".layer-login"
),
end
:
function
()
{
$
(
".layui-layer-shade"
).
hide
()
layer
.
closeAll
()
}
})
})
var
jsSrc
=
(
navigator
.
language
||
navigator
.
browserLanguage
).
toLowerCase
();
if
(
jsSrc
.
indexOf
(
'zh-cn'
)
!=-
1
){
var
areaName
=
"中国"
var
phoneNum
=
86
}
else
{
var
areaName
=
"台灣"
var
phoneNum
=
886
}
$
(
".phone-login-btn"
).
on
(
"click"
,
function
(){
$
(
".login-box1"
).
hide
()
$
(
".login-box2"
).
show
()
$
(
".login-area-p2 span"
).
text
(
areaName
)
$
(
".login-box2 .login-input-phone-span"
).
text
(
'+'
+
phoneNum
)
})
$
(
".login-input-area"
).
on
(
"click"
,
function
(
event
){
var
_self
=
$
(
this
)
if
(
_self
.
attr
(
"data-type"
)
==
1
){
$
(
".nation-search"
).
show
()
$
(
".login-input-ul"
).
fadeIn
(
350
)
_self
.
attr
(
"data-type"
,
"0"
)
$
(
".login-area-p2 >img"
).
css
(
"transform"
,
"rotate(180deg)"
)
}
else
{
$
(
".nation-search"
).
hide
()
$
(
".login-input-ul"
).
fadeOut
(
350
)
_self
.
attr
(
"data-type"
,
"1"
)
$
(
".login-area-p2 >img"
).
css
(
"transform"
,
"rotate(0deg)"
)
}
event
.
stopPropagation
();
})
var
areaJson
=
{
"resources"
:
{
"stringArray"
:
{
"-name"
:
"country_code"
,
"item"
:
[
"Afghanistan+93+AF"
,
"Albania+355+AL"
,
"Algeria+213+DZ"
,
"American Samoa+684"
,
"Andorra+376+AD"
,
"Angola+244+AO"
,
"Anguilla+1264+AI"
,
"Antigua and Barbuda+1268+AG"
,
"Argentina+54+AR"
,
"Armenia+374+AM"
,
"Aruba+297+AW"
,
"Australia+61+AU"
,
"Austria+43+AT"
,
"Azerbaijan+994+AZ"
,
"Bahamas+1242+BS"
,
"Bahrain+973+BH"
,
"Bangladesh+880+BD"
,
"Barbados+1246+BB"
,
"Belarus+375+BY"
,
"Belgium+32+BE"
,
"Belize+501+BZ"
,
"Benin+229+BJ"
,
"Bermuda+1441+BM"
,
"Bhutan+975+BT"
,
"Bolivia+591+BO"
,
"Bosnia and Herzegovina+387+BA"
,
"Botswana+267+BW"
,
"Brazil+55+BR"
,
"Brunei Darussalam+673+BN"
,
"Bulgaria+359+BG"
,
"Burkina Faso+226+BF"
,
"Burundi+257+BI"
,
"Cambodia+855+KH"
,
"Cameroon+237+CM"
,
"Canada+1+CA"
,
"Cape Verde+238+CV"
,
"Cayman Islands+1345"
,
"Central African Republic+236+CF"
,
"Chad+235+TD"
,
"Chile+56+CL"
,
"中国+86+CN"
,
"Colombia+57+CO"
,
"Comoros+269+KM"
,
"Congo+242+CG"
,
"Zaire+243+ZR"
,
"Cook Islands+682+CK"
,
"Costa Rica+506+CR"
,
"Cote D ivoire+225+CI"
,
"Croatia+385+HR"
,
"Cuba+53+CU"
,
"Cyprus+357+CY"
,
"Czech Republic+420+CZ"
,
"Denmark+45+DK"
,
"Djibouti+253+DJ"
,
"Dominica+1767"
,
"Dominican Republic+1890+DO"
,
"Ecuador+593+EC"
,
"Egypt+20+EG"
,
"El Salvador+503+SV"
,
"Equatorial Guinea+240+GQ"
,
"Eritrea+291+ER"
,
"Estonia+372+EE"
,
"Ethiopia+251+ET"
,
"Falkland Islands (Malvinas)+500+FK"
,
"Faroe Islands+298+FO"
,
"Fiji+679+FJ"
,
"Finland+358+FI"
,
"France+33+FR"
,
"French Guiana+594"
,
"French Polynesia+689+PF"
,
"Gabon+241+GA"
,
"Gambia+220+GM"
,
"Georgia+995+GE"
,
"Germany+49+DE"
,
"Ghana+233+GH"
,
"Gibraltar+350+GI"
,
"Greece+30+GR"
,
"Greenland+299+GL"
,
"Grenada+1809+GD"
,
"Guadeloupe+590+BL"
,
"Guam+671"
,
"Guatemala+502+GT"
,
"Guernsey+44+GG"
,
"Guinea+675"
,
"Guinea-Bissau+245+GW"
,
"Guyana+592+GY"
,
"Haiti +509+HT"
,
"Honduras+504+HN"
,
"中國香港+852+HK"
,
"Hungary+36+HU"
,
"Iceland+354+IS"
,
"India+91+IN"
,
"Indonesia+62+ID"
,
"Iran Islamic Republic+98+IR"
,
"Iraq+964+IQ"
,
"Ireland+353+IE"
,
"Isle of Man+44+IM"
,
"Israel+972+IL"
,
"Italy+39+IT"
,
"Jamaica+1876+JM"
,
" にほん+81+JP"
,
"Jersey+44"
,
"Jordan+962+JO"
,
"Kazakhstan+7+KZ"
,
"Kenya+254+KE"
,
"조선민주주의인민공화국+850+KP"
,
"대한민국+82+KR"
,
"Kosovo+381+YU"
,
"Kuwait+965+KW"
,
"Kyrgyzstan+996+KG"
,
"Lao People s Democratic Republic+856+LA"
,
"Latvia+371+LV"
,
"Lebanon+961+LB"
,
"Lesotho+266+LS"
,
"Liberia+231+LR"
,
"Libyan Arab Jamahiriya+218+LY"
,
"Liechtenstein+423+LI"
,
"Lithuania+370+LT"
,
"Luxembourg+352+LU"
,
"中國澳門+853+MO"
,
"Macedonia+389+MK"
,
"Madagascar+261+MG"
,
"Malawi+265+MW"
,
"Malaysia+60+MY"
,
"Maldives+960+MV"
,
"Mali+223+ML"
,
"Malta+356+MT"
,
"Martinique+596"
,
"Mauritania+222+MR"
,
"Mauritius+230+MU"
,
"Mexico+52+MX"
,
"Moldova+373+MD"
,
"Monaco+377+MC"
,
"Mongolia+976+MN"
,
"Montenegro+382+ME"
,
"Montserrat+1664+MS"
,
"Morocco+212+MA"
,
"Mozambique+258+MZ"
,
"Myanmar+95+MM"
,
"Namibia+264+NA"
,
"Nepal+977+NP"
,
"Netherlands+31+NL"
,
"Netherlands Antilles+599+AN"
,
"New Caledonia+687+NC"
,
"New Zealand+64+NZ"
,
"Nicaragua+505+NI"
,
"Niger+227+NE"
,
"Nigeria+234+NG"
,
"Norway+47+NO"
,
"Oman+968+OM"
,
"Pakistan+92+PK"
,
"Palau+680+PW"
,
"Panama+507+PA"
,
"Papua New Guinea+675+PG"
,
"Paraguay+595+PY"
,
"Peru+51+PE"
,
"Philippines+63+PH"
,
"Poland+48+PL"
,
"Portugal+351+PT"
,
"Puerto Rico+1787+PR"
,
"Qatar+974+QA"
,
"Reunion+262+YT"
,
"Romania+40+RO"
,
"Russian Federation+7+RU"
,
"Rwanda+250+RW"
,
"Saint Kitts and Nevis+1869"
,
"Saint Lucia+1758+LC"
,
"Saint Vincent and the Grenadines+1784+VC"
,
"Samoa+684"
,
"San Marino+378+SM"
,
"Saudi Arabia+966+SA"
,
"Senegal+221+SN"
,
"Serbia+381+RS"
,
"Seychelles+248+SC"
,
"Sierra Leone+232+SL"
,
"Singapore+65+SG"
,
"Slovakia+421+SK"
,
"Slovenia+386+SI"
,
"Solomon Islands+677+SB"
,
"Somalia+252+SO"
,
"South Africa+27+ZA"
,
"South Sudan+211"
,
"Spain+34+ES"
,
"Sri Lanka+94+LK"
,
"Sudan+249+SD"
,
"Suriname+597+SR"
,
"Swaziland+268+SZ"
,
"Sweden+46+SE"
,
"Switzerland+41+CH"
,
"Syrian Arab Republic+963+SY"
,
"台灣+886+TW"
,
"Tajikistan+992+TJ"
,
"Tanzania United Republic+255+TZ"
,
"Thailand+66+TH"
,
"Timor-Leste+670+TL"
,
"Togo+228+TG"
,
"Tonga+676+TO"
,
"Trinidad and Tobago+1809+TT"
,
"Tunisia+216+TN"
,
"Turkey+90+TR"
,
"Turkmenistan+993+TM"
,
"Turks and Caicos Islands+1649"
,
"Uganda+256+UG"
,
"Ukraine+380+UA"
,
"United Arab Emirates+971+AE"
,
"United Kingdom+44+GB"
,
"United States+1+US"
,
"Uruguay+598+UY"
,
"Uzbekistan+998+UZ"
,
"Vanuatu+678+VU"
,
"Venezuela+58+VE"
,
"Viet Nam+84+VN"
,
"Virgin Islands British+1340"
,
"Yemen+967+YE"
,
"Zambia+260+ZM"
,
"Zimbabwe+263+ZW"
,
"Guam+1671+GU"
,
"Guinea+224+GN"
,
"Haiti+509+HT"
,
"Kazakstan+327+KZ"
,
"Kyrgyzstan+331+KG"
,
"Nauru+674+NR"
,
"Sao Tome and Principe+239+ST"
]
}
}
}
var
html
=
[];
for
(
var
i
=
0
;
i
<
areaJson
.
resources
.
stringArray
.
item
.
length
;
i
++
){
var
list
=
areaJson
.
resources
.
stringArray
.
item
[
i
]
html
+=
'
<
li
><
span
class
=
"input-ul-span1"
>
'+list.split("+")[0]+'
<
/span><span class="input-ul-span2">+<span>'+list.split
(
"+"
)[
1
]
+'</
span
><
/span></
li
>
'
}
html+='
<
li
style
=
"display:none;text-align: center;pointer-events: none;"
class
=
"search-no-li"
>
暫無該國家地區
<
/li>
'
$
(
".login-input-ul"
).
html
(
html
)
$
(
".login-input-ul li"
).
on
(
"click"
,
function
(){
$
(
".login-input-ul"
).
fadeOut
(
0
)
$
(
".login-box2 .login-input-area"
).
attr
(
"data-type"
,
"1"
)
$
(
".login-area-p2 >img"
).
css
(
"transform"
,
"rotate(0deg)"
)
areaName
=
$
(
this
).
children
(
".input-ul-span1"
).
text
()
phoneNum
=
$
(
this
).
children
(
".input-ul-span2"
).
children
(
"span"
).
text
()
$
(
".login-area-p2 span"
).
text
(
areaName
)
$
(
".login-box2 .login-input-phone-span"
).
text
(
'+'
+
phoneNum
+
''
)
$
(
".nation-search"
).
hide
()
})
$
(
".login-box2 .login-submit-btn"
).
on
(
"click"
,
function
(){
if
(
$
(
".login-box2 .login-input1"
).
val
()
==
''
){
layer
.
msg
(
"請輸入您的手機號"
)
return
;
}
$
.
ajax
({
url
:
$ip
+
'user/checkPhoneNum'
,
data
:{
countrycode
:
phoneNum
,
phone
:
$
(
".login-box2 .login-input1"
).
val
(),
// pass:true,
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
console
.
log
(
"判断手机号是否注册"
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
return
;
}
if
(
data
.
check
==
1
){
$
(
".login-box2"
).
hide
()
$
(
".login-box3"
).
show
()
$
(
".login-box3 .login-area-p2 span"
).
text
(
areaName
)
$
(
".login-box3 .login-input-phone .login-input-phone-span"
).
text
(
'+'
+
phoneNum
+
''
)
$
(
".login-box3 .login-input1"
).
val
(
$
(
".login-box2 .login-input1"
).
val
())
}
else
{
$
(
".layer-register .login-area-p2 span"
).
text
(
areaName
)
$
(
".layer-register .login-input-phone-span"
).
text
(
'+'
+
phoneNum
+
''
)
$
(
".layer-register .login-input1"
).
val
(
$
(
".login-box2 .login-input1"
).
val
())
layer
.
closeAll
()
setTimeout
(
function
(){
layer
.
open
({
type
:
1
,
title
:
false
,
shadeClose
:
true
,
skin
:
"yourclass5"
,
area
:
[
"940px"
,
"631px"
],
content
:
$
(
".layer-register"
),
end
:
function
()
{
$
(
".layui-layer-shade"
).
hide
()
layer
.
closeAll
()
}
})
},
300
)
}
}
})
})
$
(
".login-box3 .login-submit-btn"
).
on
(
"click"
,
function
(){
if
(
$
(
".login-box3 .login-input1"
).
val
().
length
<
6
){
layer
.
msg
(
"請輸入您的手機號碼"
)
return
;
}
if
(
$
(
".login-box3 .login-input2"
).
val
().
length
<
6
){
layer
.
msg
(
"請輸入您的密碼"
)
return
;
}
$
.
ajax
({
url
:
$ip
+
'user/phoneLogin'
,
data
:{
countrycode
:
phoneNum
,
phone
:
$
(
".login-box3 .login-input1"
).
val
(),
pwd
:
$
(
".login-box3 .login-input2"
).
val
(),
// pass:true,
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
console
.
log
(
'手機號登錄'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
);
return
;
}
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
parent
.
layer
.
close
(
index
);
}
})
})
$
(
".login-no-password"
).
on
(
"click"
,
function
(){
$
(
".login-box3"
).
hide
()
$
(
".login-box4"
).
show
()
$
(
".login-box4 .login-area-p2 span"
).
text
(
areaName
)
$
(
".login-box4 .login-input-phone-span"
).
text
(
'+'
+
phoneNum
+
''
)
$
(
".login-box4 .login-input1"
).
val
(
$
(
".login-box3 .login-input1"
).
val
())
})
var
codeOk
=
true
;
var
codeTime
=
60
;
var
codeT
=
null
$
(
".login-box4 .login-code-btn"
).
unbind
(
"click"
).
on
(
"click"
,
function
(){
if
(
codeOk
==
false
)
return
;
codeOk
=
false
$
.
ajax
({
url
:
$ip
+
'user/getResetcap'
,
data
:{
countrycode
:
phoneNum
,
phone
:
$
(
".login-box4 .login-input1"
).
val
(),
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
console
.
log
(
'获取重置密码验证码'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
return
;
codeOk
=
true
;
}
layer
.
msg
(
"验证码发送成功,请查看"
)
$
(
".login-box4 .login-code-btn"
).
addClass
(
"login-code-btn-no"
)
$
(
".login-box4 .login-code-btn"
).
text
(
''
+
codeTime
+
's后获取'
)
codeT
=
setInterval
(
function
()
{
codeTime
--
$
(
".login-box4 .login-code-btn"
).
text
(
''
+
codeTime
+
's后获取'
)
if
(
codeTime
<
0
){
codeTime
=
60
codeOk
=
true
;
$
(
".login-box4 .login-code-btn"
).
removeClass
(
"login-code-btn-no"
)
$
(
".login-box4 .login-code-btn"
).
text
(
"获取验证码"
)
clearInterval
(
codeT
)
}
},
1000
);
}
})
})
$
(
".layer-register .login-code-btn"
).
unbind
(
"click"
).
on
(
"click"
,
function
(){
if
(
codeOk
==
false
)
return
;
codeOk
=
false
$
.
ajax
({
url
:
$ip
+
'user/getRegcap'
,
data
:{
countrycode
:
phoneNum
,
phone
:
$
(
".layer-register-left .login-input1"
).
val
(),
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
console
.
log
(
'获取注册验证码'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
return
;
codeOk
=
true
;
}
layer
.
msg
(
"验证码发送成功,请查看"
)
$
(
".layer-register .login-code-btn"
).
addClass
(
"login-code-btn-no"
)
$
(
".layer-register .login-code-btn"
).
text
(
''
+
codeTime
+
's后获取'
)
codeT
=
setInterval
(
function
()
{
codeTime
--
$
(
".layer-register .login-code-btn"
).
text
(
''
+
codeTime
+
's后获取'
)
if
(
codeTime
<
0
){
codeTime
=
60
codeOk
=
true
;
$
(
".layer-register .login-code-btn"
).
removeClass
(
"login-code-btn-no"
)
$
(
".layer-register .login-code-btn"
).
text
(
"获取验证码"
)
clearInterval
(
codeT
)
}
},
1000
);
}
})
})
$
(
".layer-register .login-submit-btn2"
).
on
(
"click"
,
function
(){
if
(
$
(
".layer-register .login-input1"
).
val
()
==
''
){
layer
.
msg
(
"請輸入您的手機號碼"
)
return
;
}
if
(
$
(
".layer-register .login-code-input"
).
val
()
==
''
){
layer
.
msg
(
"請輸入驗證碼"
)
return
;
}
if
(
$
(
".layer-register .login-new-password-input"
).
val
().
length
<
6
){
layer
.
msg
(
"請輸入六位數密碼"
)
return
;
}
$
.
ajax
({
url
:
$ip
+
'user/phoneReg'
,
data
:{
countrycode
:
phoneNum
,
phone
:
$
(
".layer-register .login-input1"
).
val
(),
pwd
:
$
(
".layer-register .login-new-password-input"
).
val
(),
smscode
:
$
(
".layer-register .login-code-input"
).
val
(),
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
console
.
log
(
'手机号注册'
,
data
);
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
return
;
}
localStorage
.
token
=
data
.
token
localStorage
.
uid
=
data
.
uid
sessionStorage
.
faceGo
=
1
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
parent
.
layer
.
close
(
index
);
layer
.
closeAll
()
}
})
})
$
(
".login-register-tips span"
).
on
(
"click"
,
function
(){
layer
.
closeAll
()
setTimeout
(
function
(){
layer
.
open
({
type
:
1
,
title
:
false
,
shadeClose
:
true
,
skin
:
"yourclass5"
,
area
:
[
"470px"
,
"631px"
],
content
:
$
(
".layer-login"
),
end
:
function
()
{
$
(
".layui-layer-shade"
).
hide
()
layer
.
closeAll
()
}
})
},
300
)
})
$
(
".login-box4 .login-code-btn"
).
on
(
"click"
,
function
(){
if
(
codeOk
==
false
)
return
;
codeOk
=
false
if
(
$
(
".login-box4 .login-input1"
).
val
()
==
''
){
layer
.
msg
(
"請輸入您的手機號碼"
)
return
;
}
$
.
ajax
({
url
:
$ip
+
'user/getResetcap'
,
data
:{
countrycode
:
phoneNum
,
phone
:
$
(
".login-box4 .login-input1"
).
val
(),
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
console
.
log
(
'重置密碼驗證碼'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
codeOk
=
true
;
}
layer
.
msg
(
"验证码发送成功,请查看"
)
$
(
".login-box4 .login-code-btn"
).
addClass
(
"login-code-btn-no"
)
$
(
".login-box4 .login-code-btn"
).
text
(
''
+
codeTime
+
's后获取'
)
codeT
=
setInterval
(
function
()
{
codeTime
--
$
(
".login-box4 .login-code-btn"
).
text
(
''
+
codeTime
+
's后获取'
)
if
(
codeTime
<
0
){
codeTime
=
60
codeOk
=
true
;
$
(
".login-box4 .login-code-btn"
).
removeClass
(
"login-code-btn-no"
)
$
(
".login-box4 .login-code-btn"
).
text
(
"获取验证码"
)
clearInterval
(
codeT
)
}
},
1000
);
}
})
})
$
(
".login-box4 .login-submit-btn2"
).
on
(
"click"
,
function
(){
if
(
$
(
".login-box4 .login-input1"
).
val
()
==
''
){
layer
.
msg
(
"請輸入您的手機號碼"
)
return
;
}
if
(
$
(
".login-box4 .login-code-input"
).
val
()
==
''
){
layer
.
msg
(
"請輸入驗證碼"
)
return
;
}
if
(
$
(
".login-box4 .login-new-password-input"
).
val
().
length
<
6
){
layer
.
msg
(
"請輸入六位數密碼"
)
return
;
}
if
(
$
(
".login-new-password1 .login-new-password-input"
).
val
()
!=
$
(
".login-new-password2 .login-new-password-input"
).
val
()){
layer
.
msg
(
"兩次密碼不一致,請重新輸入"
)
return
;
}
$
.
ajax
({
url
:
$ip
+
'user/resetPwd'
,
data
:{
countrycode
:
phoneNum
,
phone
:
$
(
".login-box4 .login-input1"
).
val
(),
authcode
:
$
(
".login-box4 .login-code-input"
).
val
(),
pageID
:
localStorage
.
canvasCode
},
success
:
function
(
data
){
console
.
log
(
'重置密码'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
)
return
;
}
window
.
localStorage
.
removeItem
(
"uid"
)
window
.
localStorage
.
removeItem
(
"token"
)
layer
.
msg
(
"重置成功,請從新登錄"
)
setTimeout
(
function
()
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
parent
.
layer
.
close
(
index
);
},
1000
);
}
})
})
if
(
sessionStorage
.
faceGo
==
1
){
localStorage
.
face
=
0
var
faceGoT
=
null
layer
.
open
({
type
:
1
,
title
:
false
,
shadeClose
:
false
,
skin
:
"yourclass5"
,
area
:
[
"470px"
,
"631px"
],
content
:
$
(
".layer-login-face"
),
end
:
function
()
{
$
(
".layui-layer-shade"
).
hide
()
layer
.
closeAll
()
}
})
$
(
".login-face-imgBox >img"
).
on
(
"click"
,
function
(){
localStorage
.
face
=
0
layer
.
open
({
type
:
2
,
title
:
false
,
shadeClose
:
true
,
skin
:
"face-exc-layer"
,
area
:
[
"900px"
,
"588px"
],
content
:
'http://test.ybact.ishuaji.cn/active2022/footseen/upload/index.html'
,
// content:'upload/index.html',
})
$
(
".login-face-imgBox img"
).
attr
(
"src"
,
"images/up-face.png"
)
clearInterval
(
faceGoT
)
faceGoT
=
setInterval
(
function
(){
if
(
localStorage
.
face
!=
0
){
$
(
".login-face-imgBox img"
).
attr
(
"src"
,
localStorage
.
face
)
clearInterval
(
faceGoT
)
}
},
500
)
})
$
(
".login-face-out"
).
on
(
"click"
,
function
(){
clearInterval
(
faceGoT
)
layer
.
closeAll
()
sessionStorage
.
faceGo
=
0
})
$
(
".login-face-btn"
).
on
(
"click"
,
function
(){
if
(
localStorage
.
face
==
0
){
layer
.
msg
(
"請上傳您的頭像"
)
return
;
}
if
(
$
(
".login-face-input input"
).
val
()
==
""
){
layer
.
msg
(
"請設置您的暱稱"
)
return
}
$
.
ajax
({
url
:
$ip
+
'user/updateInfo'
,
data
:{
uid
:
localStorage
.
uid
,
token
:
localStorage
.
token
,
base64
:
localStorage
.
face
,
pageID
:
localStorage
.
canvasCode
,
nickName
:
$
(
".login-face-input input"
).
val
()
},
type
:
'post'
,
success
:
function
(
data
){
console
.
log
(
'修改頭像姓名'
,
data
)
if
(
data
.
code
!=
1
){
layer
.
msg
(
data
.
msg
);
}
if
(
data
.
code
==
1
){
layer
.
closeAll
()
layer
.
msg
(
"修改成功"
)
sessionStorage
.
faceGo
=
0
setTimeout
(
function
(){
window
.
location
.
reload
()
},
1000
)
}
}
})
})
}
$
(
".login-back"
).
unbind
(
"click"
).
on
(
"click"
,
function
(){
$
(
".login-box4"
).
hide
()
$
(
".login-box1"
).
show
()
})
$
(
".nation-search"
).
unbind
(
"click"
).
on
(
"click"
,
function
(
event
){
event
.
stopPropagation
();
// console.log($(".login-input-ul").find("li"))
})
search
(
".login-box2"
)
search
(
".layer-register"
)
search
(
".login-box3"
)
search
(
".login-box4"
)
function
search
(
e
){
$
(
""
+
e
+
" .nation-search input"
).
unbind
(
"input"
).
on
(
"input"
,
function
(){
searchNum
=
0
$
(
""
+
e
+
" .login-input-ul"
).
find
(
'.input-ul-span1'
).
each
(
function
()
{
var
text1
=
$
(
this
)[
0
].
innerHTML
;
if
(
text1
.
toLowerCase
().
indexOf
(
$
(
""
+
e
+
" .nation-search input"
).
val
().
toLowerCase
())
>=
0
){
$
(
this
).
parent
().
css
(
"display"
,
"block"
)
searchNum
++
}
else
{
$
(
this
).
parent
().
css
(
"display"
,
"none"
)
}
});
$
(
""
+
e
+
" .login-input-ul"
).
find
(
'.input-ul-span2'
).
each
(
function
()
{
var
text1
=
$
(
this
)[
0
].
innerHTML
;
if
(
text1
.
indexOf
(
$
(
""
+
e
+
" .nation-search input"
).
val
())
>=
0
){
$
(
this
).
parent
().
css
(
"display"
,
"block"
)
searchNum
++
}
if
(
searchNum
==
0
){
$
(
".search-no-li"
).
show
()
}
else
$
(
".search-no-li"
).
hide
()
});
})
}
function
richMouse
(){
var
tFace
=
null
$
(
".nav-login"
).
on
(
"mouseover"
,
function
(){
clearInterval
(
tFace
)
$
(
".nav-login-more"
).
fadeIn
(
150
)
})
$
(
".nav-login"
).
on
(
"mouseout"
,
function
(){
tFace
=
setTimeout
(
function
(){
$
(
".nav-login-more"
).
fadeOut
(
150
)
},
350
)
})
}
}
</script>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
yazhaiTest/pc.html
View file @
f817f0cf
...
...
@@ -5,6 +5,7 @@
</script>
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black-translucent"
>
...
...
@@ -15,6 +16,7 @@
<link
rel=
"stylesheet"
href=
"css/layer.css"
>
<link
rel=
"stylesheet"
href=
"css/neck.css"
>
<link
rel=
"stylesheet"
href=
"css/login.css"
>
<script
class=
"google-login"
async
defer
></script>
</head>
<body
style=
"background: #F4F5F8"
>
...
...
@@ -313,6 +315,11 @@
<script
src=
"lib/login.js"
></script>
<script>
$
(
function
(){
var
html
=
[]
html
+=
'
<
meta
name
=
"google-signin-scope"
content
=
"profile email"
>
'
html+='
<
meta
name
=
"google-signin-client_id"
content
=
"534183685500.apps.googleusercontent.com"
>
'
$("head").append(html)
$(".google-login").attr("src","https://apis.google.com/js/platform.js")
loginGo()
var scrollOk=true;
var pageNumber=1
...
...
@@ -758,7 +765,7 @@ $(function(){
}
if
(
data
.
jump
==
3
){
if
(
localStorage
.
uid
==
undefined
){
loginLayer
()
loginLayer
()
return
;
}
$
(
".neck-nav-ul li"
).
removeClass
(
"neck-nav-li-click"
)
...
...
This diff is collapsed.
Click to expand it.
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