Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uc_card
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoujun
uc_card
Commits
7bb9a9f1
Commit
7bb9a9f1
authored
Jun 07, 2021
by
liyadong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0832e5fb
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
64 additions
and
17 deletions
+64
-17
src/public/static/js/main.js
src/public/static/js/main.js
+1
-4
src/public/static/js/main.min.js
src/public/static/js/main.min.js
+1
-1
src/public/static/postcard/css/style.css
src/public/static/postcard/css/style.css
+12
-1
src/public/static/postcard/css/style.less
src/public/static/postcard/css/style.less
+12
-1
src/public/static/postcard/images/save_img_bg.png
src/public/static/postcard/images/save_img_bg.png
+0
-0
src/public/static/postcard/images/sh_fail.jpg
src/public/static/postcard/images/sh_fail.jpg
+0
-0
src/public/static/postcard/js/main.js
src/public/static/postcard/js/main.js
+2
-1
src/public/static/postcard/js/main.min.js
src/public/static/postcard/js/main.min.js
+1
-0
src/resources/views/card/card.blade.php
src/resources/views/card/card.blade.php
+34
-7
src/resources/views/card/index.blade.php
src/resources/views/card/index.blade.php
+1
-2
No files found.
src/public/static/js/main.js
View file @
7bb9a9f1
...
...
@@ -202,13 +202,10 @@ ccwl.handleBindOrangeCode = function(params,type){
},
function
(
res
){
if
(
type
===
"
ald
"
){
$
(
'
.dialog-confirm .toast-msg
'
).
text
(
res
.
message
);
$
(
'
.dialog-confirm .btn
'
).
attr
(
'
href
'
,
'
/
wx/index
'
);
$
(
'
.dialog-confirm .btn
'
).
attr
(
'
href
'
,
'
/
'
);
$
(
'
.dialog-confirm
'
).
fadeIn
();
return
false
;
}
else
{
$
(
'
.icon-orange .fs-normal
'
).
text
(
res
.
data
.
bind_code
);
$
(
'
.icon-orange
'
).
append
(
'
<a href="/ald_gift">领取礼包</a>
'
);
$
(
'
.dialog-orange,.bind-orange
'
).
fadeOut
();
ccwl
.
showToast
({
msg
:
res
.
message
,
})
...
...
src/public/static/js/main.min.js
View file @
7bb9a9f1
function
goUserInfo
(){
$
(
"
.btn-receive-package
"
).
attr
(
"
data-type
"
)
>
0
&&
(
localStorage
.
setItem
(
"
showOrange
"
,
!
0
),
window
.
location
.
href
=
"
/user/dashboard
"
)}
function
isWeChat
(){
return
"
micromessenger
"
==
window
.
navigator
.
userAgent
.
toLowerCase
().
match
(
/MicroMessenger/i
)}
var
ccwl
=
{
http
:
location
.
origin
,
reg
:{
phone
:
/^1
(
3
[
0-9
]
|4
[
0-9
]
|5
[
0-9
]
|6
[
0-9
]
|7
[
0-9
]
|8
[
0-9
]
|9
[
0-9
])\d{8}
$/
},
idFlag
:
!
0
,
ajaxFlag
:
!
0
,
relationRole
:{}};
ccwl
.
ajax
=
function
(
e
,
t
,
a
){
e
.
data
.
_token
=
$
(
'
meta[name="token"]
'
).
attr
(
"
value
"
),
$
.
ajax
({
type
:
e
.
type
?
e
.
type
:
"
GET
"
,
url
:
ccwl
.
http
+
e
.
url
,
dataType
:
"
json
"
,
data
:
e
.
data
,
error
:
function
(
e
){
ccwl
.
ajaxFlag
=!
1
;
try
{
var
t
=
e
.
responseText
;
ccwl
.
showToast
({
msg
:
t
.
message
,
type
:
"
error
"
})}
catch
(
e
){
ccwl
.
showToast
({
msg
:
"
系统开小差~~
"
,
type
:
"
error
"
})}},
success
:
function
(
n
){
if
(
ccwl
.
ajaxFlag
=!
1
,
0
===
n
.
error
)
t
(
n
);
else
try
{
if
(
"
/ald_bind_info
"
===
e
.
url
||
"
/user/bind_realname
"
===
e
.
url
)
return
a
(
n
),
!
1
;
ccwl
.
showToast
({
msg
:
n
.
message
}),
a
(
n
)}
catch
(
e
){}}})},
ccwl
.
formatSearch
=
function
(
e
){
if
(
void
0
!==
(
e
=
location
.
search
)){
var
t
=
(
e
=
e
.
substr
(
1
)).
split
(
"
&
"
),
a
=
{},
n
=
[];
return
$
.
each
(
t
,
function
(
e
,
t
){
n
=
t
.
split
(
"
=
"
),
void
0
===
a
[
n
[
0
]]
&&
(
a
[
n
[
0
]]
=
n
[
1
])}),
location
.
search
?
a
:
""
}};
var
timer
=
null
;
ccwl
.
showToast
=
function
(
e
){
$
.
Toast
(
""
,
e
.
msg
,
e
.
type
?
e
.
type
:
"
warn
"
,{
stack
:
!
0
,
has_icon
:
!
1
,
has_close_btn
:
!
1
,
fullscreen
:
!
1
,
timeout
:
2
e3
,
sticky
:
!
1
,
has_progress
:
!
1
,
rtl
:
!
1
})},
ccwl
.
handleRegister
=
function
(
e
){
this
.
ajax
({
url
:
"
/register
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
location
.
href
=
e
.
data
.
next_url
})},
ccwl
.
handleSendCode
=
function
(
e
,
t
){
this
.
ajax
({
url
:
"
/service/get_authcode
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
ccwl
.
handleCutDown
(
t
)})},
ccwl
.
handleCutDown
=
function
(
e
){
var
t
=
60
,
a
=
setInterval
(
function
(){
0
===
t
?(
$
(
e
).
text
(
"
重新发送
"
).
removeAttr
(
"
disabled
"
),
$
(
e
).
css
({
color
:
"
#0099ff
"
}),
clearInterval
(
a
)):(
$
(
e
).
attr
(
"
disabled
"
,
!
0
),
$
(
e
).
css
({
color
:
"
#ababab
"
}),
$
(
e
).
text
(
t
+
"
S后重新获取
"
)),
t
--
},
1
e3
)},
ccwl
.
handleLogin
=
function
(
e
,
t
){
this
.
ajax
({
url
:
"
10001
"
===
t
?
"
/ald_login
"
:
"
/login
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
location
.
href
=
e
.
data
.
next_url
})},
ccwl
.
handleFindPassword
=
function
(
e
){
this
.
ajax
({
url
:
"
/password/getback
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
$
(
"
.dialog-confirm
"
).
fadeIn
()})},
ccwl
.
handleChangePassword
=
function
(
e
,
t
){
this
.
ajax
({
url
:
"
/password/change
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
1
==
t
&&
(
$
(
"
.update-success
"
).
fadeIn
(),
$
(
"
.update-form
"
).
hide
()),
$
(
"
.dialog.resize-password
"
).
fadeOut
(),
$
(
"
.dialog-confirm
"
).
fadeIn
()})},
ccwl
.
handleAuthRealName
=
function
(
e
){
this
.
ajax
({
url
:
"
/service/real_name_auth
"
,
type
:
"
POST
"
,
data
:{
real_name
:
e
.
real_name
,
id_card
:
e
.
id_card
}},
function
(
e
){
ccwl
.
idFlag
=!
0
},
function
(){
ccwl
.
idFlag
=!
1
})},
ccwl
.
handleBindOrangeCode
=
function
(
e
,
t
){
this
.
ajax
({
url
:
"
/user/bind_aldzn
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
if
(
"
ald
"
===
t
)
return
$
(
"
.dialog-confirm .toast-msg
"
).
text
(
e
.
message
),
$
(
"
.dialog-confirm .btn
"
).
attr
(
"
href
"
,
"
/wx/index
"
),
$
(
"
.dialog-confirm
"
).
fadeIn
(),
!
1
;
$
(
"
.icon-orange .fs-normal
"
).
text
(
e
.
data
.
bind_code
),
$
(
"
.icon-orange
"
).
append
(
'
<a href="/ald_gift">领取礼包</a>
'
),
$
(
"
.dialog-orange,.bind-orange
"
).
fadeOut
(),
ccwl
.
showToast
({
msg
:
e
.
message
})},
function
(
e
){
var
a
=
$
(
"
.leave-times span
"
).
text
();
if
(
$
(
"
.leave-times span
"
).
text
(
a
-
1
<
0
?
0
:
a
-
1
),
a
-
1
<=
0
&&
(
$
(
"
.dialog-orange
"
).
fadeOut
(),
$
(
"
.bind-orange
"
).
remove
(),
$
(
"
.icon-orange
"
).
append
(
'
<span class="error-msg">今日错误次数达上限</span>
'
),
"
ald
"
===
t
))
return
location
.
href
=
"
/wx/index
"
,
!
1
;
1020
===
e
.
error
&&
(
$
(
"
.leave-times span
"
).
text
(
e
.
data
.
left_times
),
0
===
e
.
data
.
left_times
&&
$
(
"
input[name='orangeCode'],.btn-bind-orange
"
).
attr
(
"
disabled
"
,
!
0
))})},
ccwl
.
handleGetServer
=
function
(
e
){
this
.
ajax
({
url
:
"
/ald_bind_info
"
,
type
:
"
get
"
,
data
:{}},
function
(
t
){
if
(
"
0
"
===
e
)
return
$
(
"
.confirm-container
"
).
show
(),
$
(
"
.confirm-container .message-content p
"
).
text
(
"
您暂未获得活动资格,请关注后续活动资讯
"
),
$
(
"
.confirm-container .message-content a
"
).
text
(
"
确定
"
).
addClass
(
"
close-click
"
).
attr
(
"
onclick
"
,
""
),
!
1
;
var
a
=
{
serverId
:
t
.
data
.
serverId
,
userId
:
t
.
data
.
userId
};
ccwl
.
handleGetRoleList
(
a
)},
function
(
e
){
$
(
"
.confirm-container p
"
).
text
(
e
.
message
),
$
(
"
.confirm-container
"
).
show
()})},
ccwl
.
handleGetRoleList
=
function
(
e
){
this
.
ajax
({
url
:
"
/get_role_list
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
var
t
=
e
.
data
,
a
=
""
,
n
=
[];
ccwl
.
relationRole
=
t
;
for
(
var
o
in
t
)
n
.
push
({
id
:
o
,
name
:
t
[
o
].
name
});
$
(
n
).
each
(
function
(
e
,
t
){
a
+=
'
<li data-value="
'
+
t
.
id
+
'
">
'
+
t
.
name
+
"
</li>
"
}),
$
(
"
.server-select
"
).
html
(
a
),
$
(
"
.dialog-received-gift
"
).
fadeIn
()},
function
(
e
){})},
ccwl
.
handleGetRoleGift
=
function
(
e
){
this
.
ajax
({
url
:
"
/send_role_gift
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
$
(
"
.btn-receive-package
"
).
hide
(),
$
(
"
.package-info
"
).
append
(
'
<a href="/ald_gift_detail" class="btn btn-small gift-detail">查看礼包</a>
'
),
$
(
"
.dialog-received-gift
"
).
fadeOut
(),
ccwl
.
showToast
({
msg
:
e
.
message
})},
function
(
e
){})};
var
initRoleList
=
function
(
e
){
var
t
=
ccwl
.
relationRole
[
e
].
list
,
a
=
""
;
$
(
t
).
each
(
function
(
e
,
t
){
a
+=
'
<li data-value="
'
+
t
.
roleId
+
'
">
'
+
t
.
roleName
+
"
</li>
"
}),
$
(
"
.role-select
"
).
html
(
a
),
$
(
"
.role
"
).
text
(
"
请选择角色
"
)};
$
(
function
(){
$
(
"
.container-mb .menu
"
).
click
(
function
(){
$
(
"
.left-container
"
).
addClass
(
"
current
"
),
$
(
"
.container
"
).
addClass
(
"
fixed
"
)}),
$
(
"
.container-mb .left-container
"
).
click
(
function
(){
$
(
this
).
removeClass
(
"
current
"
),
$
(
"
.container
"
).
removeClass
(
"
fixed
"
)}),
$
(
"
.left-menu
"
).
click
(
function
(
e
){(
e
=
e
||
window
.
event
).
stopPropagation
()}),
$
(
"
.protocol .checkbox
"
).
click
(
function
(){
$
(
this
).
toggleClass
(
"
current
"
)}),
$
(
"
.user-protocol
"
).
click
(
function
(){
$
(
"
.dialog-protocol
"
).
fadeIn
(),
$
(
"
.protocol-title
"
).
text
(
"
橙橙网络用户服务协议
"
),
$
(
"
.protocol-p
"
).
show
(),
$
(
"
.protocol-v
"
).
hide
()}),
$
(
"
.user-privacy
"
).
click
(
function
(){
$
(
"
.dialog-protocol
"
).
fadeIn
(),
$
(
"
.protocol-title
"
).
text
(
"
橙橙网络隐私保护政策
"
),
$
(
"
.protocol-v
"
).
show
(),
$
(
"
.protocol-p
"
).
hide
()}),
$
(
"
input[name='idCard']
"
).
on
(
"
blur
"
,
function
(){
var
e
=
$
(
"
input[name='realName']
"
).
val
(),
t
=
$
(
"
input[name='idCard']
"
).
val
();
if
(
t
&&
15
!=
t
.
length
&&
18
!=
t
.
length
)
return
ccwl
.
showToast
({
msg
:
"
请输入正确的身份证号码
"
}),
!
1
;
var
a
=
{
real_name
:
e
,
id_card
:
t
};
t
&&
e
&&
ccwl
.
handleAuthRealName
(
a
)}),
$
(
"
input[name='realName']
"
).
blur
(
function
(){
var
e
=
$
.
trim
(
$
(
"
input[name='realName']
"
).
val
()),
t
=
$
.
trim
(
$
(
"
input[name='idCard']
"
).
val
());
if
(
t
&&
15
!=
t
.
length
&&
18
!=
t
.
length
)
return
ccwl
.
showToast
({
msg
:
"
请输入正确的身份证号码
"
}),
!
1
;
var
a
=
{
real_name
:
e
,
id_card
:
t
};
t
&&
e
&&
ccwl
.
handleAuthRealName
(
a
)}),
$
(
"
.btn-register
"
).
click
(
function
(){
var
e
=
$
.
trim
(
$
(
"
input[name='phone']
"
).
val
()),
t
=
$
(
"
input[name='code']
"
).
val
(),
a
=
$
.
trim
(
$
(
"
input[name='password']
"
).
val
()),
n
=
$
.
trim
(
$
(
"
input[name='confirmPassword']
"
).
val
()),
o
=
$
(
"
.protocol .checkbox
"
).
hasClass
(
"
current
"
),
c
=
ccwl
.
reg
.
phone
;
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入手机号码
"
}),
!
1
;
if
(
e
&&!
c
.
test
(
e
))
return
ccwl
.
showToast
({
msg
:
"
请输入正确的手机号码
"
}),
!
1
;
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入验证码
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入密码
"
}),
!
1
;
if
(
!
n
)
return
ccwl
.
showToast
({
msg
:
"
请再次输入密码
"
}),
!
1
;
if
(
n
!==
a
)
return
ccwl
.
showToast
({
msg
:
"
请保持两次密码一致
"
}),
!
1
;
if
(
a
&&
e
&&
a
===
e
)
return
ccwl
.
showToast
({
msg
:
"
密码不可与用户名相同
"
}),
!
1
;
if
(
a
&&
a
.
length
<
6
||
a
&&
a
.
length
>
30
)
return
ccwl
.
showToast
({
msg
:
"
由6-30位字母、数字或字符组成
"
}),
!
1
;
if
(
!
o
)
return
ccwl
.
showToast
({
msg
:
"
请勾选平台协议
"
}),
!
1
;
var
r
=
{
phone
:
e
,
password
:
a
,
auth_code
:
t
};
ccwl
.
handleRegister
(
r
)}),
$
(
"
.send-code
"
).
click
(
function
(){
var
e
=
$
.
trim
(
$
(
this
).
parents
(
"
.form-container
"
).
find
(
"
input[name='phone']
"
).
val
()),
t
=
ccwl
.
reg
.
phone
;
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入手机号码
"
}),
!
1
;
if
(
e
&&!
t
.
test
(
e
))
return
ccwl
.
showToast
({
msg
:
"
请输入正确的手机号码
"
}),
!
1
;
var
a
=
{
phone
:
e
};
ccwl
.
handleSendCode
(
a
,
this
)}),
$
(
"
.btn-login
"
).
click
(
function
(){
var
e
=
$
(
this
).
attr
(
"
data-type
"
),
t
=
$
(
"
input[name='account']
"
).
val
(),
a
=
$
.
trim
(
$
(
"
input[name='password']
"
).
val
()),
n
=
$
(
"
.protocol .checkbox
"
).
hasClass
(
"
current
"
);
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入账号
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入密码
"
}),
!
1
;
if
(
!
n
&&
e
)
return
ccwl
.
showToast
({
msg
:
"
请勾选平台协议
"
}),
!
1
;
var
o
=
{
account
:
t
,
password
:
a
};
ccwl
.
handleLogin
(
o
,
e
)}),
$
(
"
.btn-findPassword
"
).
click
(
function
(){
var
e
=
$
.
trim
(
$
(
"
input[name='phone']
"
).
val
()),
t
=
$
(
"
input[name='code']
"
).
val
(),
a
=
$
.
trim
(
$
(
"
input[name='password']
"
).
val
()),
n
=
$
.
trim
(
$
(
"
input[name='confirmPassword']
"
).
val
()),
o
=
ccwl
.
reg
.
phone
;
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入手机号码
"
}),
!
1
;
if
(
e
&&!
o
.
test
(
e
))
return
ccwl
.
showToast
({
msg
:
"
请输入正确的手机号码
"
}),
!
1
;
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入验证码
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入密码
"
}),
!
1
;
if
(
!
n
)
return
ccwl
.
showToast
({
msg
:
"
请再次输入密码
"
}),
!
1
;
if
(
a
&&
e
&&
a
===
e
)
return
ccwl
.
showToast
({
msg
:
"
密码不可与用户名相同
"
}),
!
1
;
if
(
n
!==
a
)
return
ccwl
.
showToast
({
msg
:
"
请保持两次密码一致
"
}),
!
1
;
if
(
n
&&
n
.
length
<
6
||
n
&&
n
.
length
>
30
)
return
ccwl
.
showToast
({
msg
:
"
由6-30位字母、数字或字符组成
"
}),
!
1
;
var
c
=
{
phone
:
e
,
new_password
:
a
,
auth_code
:
t
};
ccwl
.
handleFindPassword
(
c
)}),
$
(
"
.change-password a,.show-change-password
"
).
click
(
function
(){
$
(
"
.resize-password
"
).
fadeIn
(),
$
(
"
.container-mb
"
).
addClass
(
"
fixed
"
)}),
$
(
document
).
on
(
"
click
"
,
"
.close,.close-click,.btn-close
"
,
function
(){
var
e
=
$
(
this
).
attr
(
"
data-type
"
);
$
(
"
.toast-item-wrapper
"
).
remove
(),
$
(
this
).
parents
(
"
.dialog
"
).
fadeOut
(),
$
(
"
.container-mb
"
).
removeClass
(
"
fixed
"
),
1
!=
e
&&
$
(
"
.form-container input
"
).
val
(
""
)}),
$
(
"
.btn-changePassword
"
).
click
(
function
(){
var
e
=
$
(
this
).
attr
(
"
data-type
"
),
t
=
$
.
trim
(
$
(
"
input[name='nowPassword']
"
).
val
()),
a
=
$
.
trim
(
$
(
"
input[name='newPassword']
"
).
val
()),
n
=
$
.
trim
(
$
(
"
input[name='confirmNewPassword']
"
).
val
());
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入当前密码
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入新密码
"
}),
!
1
;
if
(
!
n
)
return
ccwl
.
showToast
({
msg
:
"
请再次输入新密码
"
}),
!
1
;
if
(
a
!==
n
)
return
ccwl
.
showToast
({
msg
:
"
请保持两次新密码一致
"
}),
!
1
;
if
(
n
&&
n
.
length
<
6
||
n
&&
n
.
length
>
30
)
return
ccwl
.
showToast
({
msg
:
"
由6-30位字母、数字或字符组成
"
}),
!
1
;
var
o
=
{
password
:
t
,
new_password
:
a
};
ccwl
.
handleChangePassword
(
o
,
e
)}),
$
(
"
.back
"
).
click
(
function
(){
window
.
history
.
go
(
-
1
)}),
$
(
"
.bind-orange
"
).
click
(
function
(){
$
(
"
.dialog-orange
"
).
fadeIn
()}),
$
(
"
.btn-bind-orange
"
).
click
(
function
(){
var
e
=
$
(
"
input[name='orangeCode']
"
).
val
(),
t
=
$
(
"
.leave-times span
"
).
text
(),
a
=
$
(
this
).
attr
(
"
data-type
"
);
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入识别码
"
}),
!
1
;
if
(
1
*
t
<=
0
)
return
ccwl
.
showToast
({
msg
:
"
今日错误次数达上限
"
}),
!
1
;
var
n
=
{
bind_code
:
e
};
ccwl
.
handleBindOrangeCode
(
n
,
a
)}),
$
(
"
.btn-confirm
"
).
click
(
function
(){
$
(
this
).
parents
(
"
.dialog
"
).
fadeOut
(),
location
.
href
=
"
/login
"
}),
$
(
"
.expect
"
).
click
(
function
(){
ccwl
.
showToast
({
msg
:
"
暂未开放,敬请期待
"
})}),
$
(
"
.btn-receive-package
"
).
click
(
function
(){
var
e
=
$
(
this
).
attr
(
"
data-type
"
),
t
=
$
(
this
).
attr
(
"
data-receive
"
);
if
(
"
0
"
===
e
)
return
$
(
"
.confirm-container
"
).
show
(),
$
(
"
.confirm-container .message-content p
"
).
text
(
"
今日Orange识别码输入错误次数已达上限
"
),
$
(
"
.confirm-container .message-content a
"
).
text
(
"
确定
"
).
addClass
(
"
close-click
"
).
attr
(
"
onclick
"
,
"
localStorage.removeItem('showOrange');
"
),
!
1
;
ccwl
.
handleGetServer
(
t
)}),
$
(
"
.btn-receive
"
).
click
(
function
(){
var
e
=
$
(
"
.server-select li.current
"
).
attr
(
"
data-value
"
),
t
=
$
(
"
.role-select li.current
"
).
attr
(
"
data-value
"
);
if
(
!
e
||
""
==
e
)
return
ccwl
.
showToast
({
msg
:
"
请选择服务器
"
}),
!
1
;
if
(
!
t
||
""
==
t
)
return
ccwl
.
showToast
({
msg
:
"
请选择角色
"
}),
!
1
;
var
a
=
{
serverId
:
e
,
roleId
:
t
};
ccwl
.
handleGetRoleGift
(
a
)}),
$
(
"
.gift-span span
"
).
click
(
function
(){
$
(
this
).
addClass
(
"
current
"
).
siblings
().
removeClass
(
"
current
"
);
var
e
=
$
(
this
).
index
();
$
(
"
.tab-content p
"
).
hide
(),
$
(
"
.tab-content p
"
).
eq
(
e
).
show
().
siblings
().
hide
()}),
$
(
"
.toggle-down
"
).
click
(
function
(){
$
(
"
.gift-explain-container
"
).
fadeIn
()}),
$
(
"
.select span
"
).
click
(
function
(){
$
(
"
.select-option
"
).
hide
(),
$
(
this
).
hasClass
(
"
current
"
)?(
$
(
"
.select span
"
).
removeClass
(
"
current
"
),
$
(
this
).
siblings
(
"
.select-option
"
).
stop
().
slideUp
(
100
)):(
$
(
"
.select span
"
).
removeClass
(
"
current
"
),
$
(
this
).
addClass
(
"
current
"
),
$
(
this
).
siblings
(
"
.select-option
"
).
stop
().
slideDown
(
100
))}),
$
(
document
).
on
(
"
click
"
,
"
.select-option li
"
,
function
(){
var
e
=
$
(
this
).
text
();
$
(
this
).
addClass
(
"
current
"
).
siblings
().
removeClass
(
"
current
"
),
$
(
this
).
parents
(
"
.select
"
).
find
(
"
span
"
).
text
(
e
),
$
(
this
).
parents
(
"
.select
"
).
find
(
"
span
"
).
removeClass
(
"
current
"
),
$
(
this
).
parents
(
"
.select
"
).
find
(
"
.select-option
"
).
stop
().
slideUp
(
100
)}),
$
(
document
).
on
(
"
click
"
,
"
.server-select li
"
,
function
(){
var
e
=
$
(
this
).
attr
(
"
data-value
"
);
initRoleList
(
e
)}),
$
(
"
input[name='password']
"
).
keyup
(
function
(
e
){
13
===
e
.
keyCode
&&
$
(
"
.btn-login
"
).
trigger
(
"
click
"
)}),
$
(
"
input[name='confirmNewPassword']
"
).
keyup
(
function
(
e
){
13
===
e
.
keyCode
&&
$
(
"
.btn-changePassword
"
).
trigger
(
"
click
"
)})});
\ No newline at end of file
function
goUserInfo
(){
$
(
"
.btn-receive-package
"
).
attr
(
"
data-type
"
)
>
0
&&
(
localStorage
.
setItem
(
"
showOrange
"
,
!
0
),
window
.
location
.
href
=
"
/user/dashboard
"
)}
function
isWeChat
(){
return
"
micromessenger
"
==
window
.
navigator
.
userAgent
.
toLowerCase
().
match
(
/MicroMessenger/i
)}
var
ccwl
=
{
http
:
location
.
origin
,
reg
:{
phone
:
/^1
(
3
[
0-9
]
|4
[
0-9
]
|5
[
0-9
]
|6
[
0-9
]
|7
[
0-9
]
|8
[
0-9
]
|9
[
0-9
])\d{8}
$/
},
idFlag
:
!
0
,
ajaxFlag
:
!
0
,
relationRole
:{}};
ccwl
.
ajax
=
function
(
t
,
e
,
a
){
t
.
data
.
_token
=
$
(
'
meta[name="token"]
'
).
attr
(
"
value
"
),
$
.
ajax
({
type
:
t
.
type
?
t
.
type
:
"
GET
"
,
url
:
ccwl
.
http
+
t
.
url
,
dataType
:
"
json
"
,
data
:
t
.
data
,
error
:
function
(
t
){
ccwl
.
ajaxFlag
=!
1
;
try
{
var
e
=
t
.
responseText
;
ccwl
.
showToast
({
msg
:
e
.
message
,
type
:
"
error
"
})}
catch
(
t
){
ccwl
.
showToast
({
msg
:
"
系统开小差~~
"
,
type
:
"
error
"
})}},
success
:
function
(
n
){
if
(
ccwl
.
ajaxFlag
=!
1
,
0
===
n
.
error
)
e
(
n
);
else
try
{
if
(
"
/ald_bind_info
"
===
t
.
url
||
"
/user/bind_realname
"
===
t
.
url
)
return
a
(
n
),
!
1
;
ccwl
.
showToast
({
msg
:
n
.
message
}),
a
(
n
)}
catch
(
t
){}}})},
ccwl
.
formatSearch
=
function
(
t
){
if
(
void
0
!==
(
t
=
location
.
search
)){
var
e
=
(
t
=
t
.
substr
(
1
)).
split
(
"
&
"
),
a
=
{},
n
=
[];
return
$
.
each
(
e
,
function
(
t
,
e
){
n
=
e
.
split
(
"
=
"
),
void
0
===
a
[
n
[
0
]]
&&
(
a
[
n
[
0
]]
=
n
[
1
])}),
location
.
search
?
a
:
""
}};
var
timer
=
null
;
ccwl
.
showToast
=
function
(
t
){
$
.
Toast
(
""
,
t
.
msg
,
t
.
type
?
t
.
type
:
"
warn
"
,{
stack
:
!
0
,
has_icon
:
!
1
,
has_close_btn
:
!
1
,
fullscreen
:
!
1
,
timeout
:
2
e3
,
sticky
:
!
1
,
has_progress
:
!
1
,
rtl
:
!
1
})},
ccwl
.
handleRegister
=
function
(
t
){
this
.
ajax
({
url
:
"
/register
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
location
.
href
=
t
.
data
.
next_url
})},
ccwl
.
handleSendCode
=
function
(
t
,
e
){
this
.
ajax
({
url
:
"
/service/get_authcode
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
ccwl
.
handleCutDown
(
e
)})},
ccwl
.
handleCutDown
=
function
(
t
){
var
e
=
60
,
a
=
setInterval
(
function
(){
0
===
e
?(
$
(
t
).
text
(
"
重新发送
"
).
removeAttr
(
"
disabled
"
),
$
(
t
).
css
({
color
:
"
#0099ff
"
}),
clearInterval
(
a
)):(
$
(
t
).
attr
(
"
disabled
"
,
!
0
),
$
(
t
).
css
({
color
:
"
#ababab
"
}),
$
(
t
).
text
(
e
+
"
S后重新获取
"
)),
e
--
},
1
e3
)},
ccwl
.
handleLogin
=
function
(
t
,
e
){
this
.
ajax
({
url
:
"
10001
"
===
e
?
"
/ald_login
"
:
"
/login
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
location
.
href
=
t
.
data
.
next_url
})},
ccwl
.
handleFindPassword
=
function
(
t
){
this
.
ajax
({
url
:
"
/password/getback
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
$
(
"
.dialog-confirm
"
).
fadeIn
()})},
ccwl
.
handleChangePassword
=
function
(
t
,
e
){
this
.
ajax
({
url
:
"
/password/change
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
1
==
e
&&
(
$
(
"
.update-success
"
).
fadeIn
(),
$
(
"
.update-form
"
).
hide
()),
$
(
"
.dialog.resize-password
"
).
fadeOut
(),
$
(
"
.dialog-confirm
"
).
fadeIn
()})},
ccwl
.
handleAuthRealName
=
function
(
t
){
this
.
ajax
({
url
:
"
/service/real_name_auth
"
,
type
:
"
POST
"
,
data
:{
real_name
:
t
.
real_name
,
id_card
:
t
.
id_card
}},
function
(
t
){
ccwl
.
idFlag
=!
0
},
function
(){
ccwl
.
idFlag
=!
1
})},
ccwl
.
handleBindOrangeCode
=
function
(
t
,
e
){
this
.
ajax
({
url
:
"
/user/bind_aldzn
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
if
(
"
ald
"
===
e
)
return
$
(
"
.dialog-confirm .toast-msg
"
).
text
(
t
.
message
),
$
(
"
.dialog-confirm .btn
"
).
attr
(
"
href
"
,
"
/
"
),
$
(
"
.dialog-confirm
"
).
fadeIn
(),
!
1
;
ccwl
.
showToast
({
msg
:
t
.
message
})},
function
(
t
){
var
a
=
$
(
"
.leave-times span
"
).
text
();
if
(
$
(
"
.leave-times span
"
).
text
(
a
-
1
<
0
?
0
:
a
-
1
),
a
-
1
<=
0
&&
(
$
(
"
.dialog-orange
"
).
fadeOut
(),
$
(
"
.bind-orange
"
).
remove
(),
$
(
"
.icon-orange
"
).
append
(
'
<span class="error-msg">今日错误次数达上限</span>
'
),
"
ald
"
===
e
))
return
location
.
href
=
"
/wx/index
"
,
!
1
;
1020
===
t
.
error
&&
(
$
(
"
.leave-times span
"
).
text
(
t
.
data
.
left_times
),
0
===
t
.
data
.
left_times
&&
$
(
"
input[name='orangeCode'],.btn-bind-orange
"
).
attr
(
"
disabled
"
,
!
0
))})},
ccwl
.
handleGetServer
=
function
(
t
){
this
.
ajax
({
url
:
"
/ald_bind_info
"
,
type
:
"
get
"
,
data
:{}},
function
(
e
){
if
(
"
0
"
===
t
)
return
$
(
"
.confirm-container
"
).
show
(),
$
(
"
.confirm-container .message-content p
"
).
text
(
"
您暂未获得活动资格,请关注后续活动资讯
"
),
$
(
"
.confirm-container .message-content a
"
).
text
(
"
确定
"
).
addClass
(
"
close-click
"
).
attr
(
"
onclick
"
,
""
),
!
1
;
var
a
=
{
serverId
:
e
.
data
.
serverId
,
userId
:
e
.
data
.
userId
};
ccwl
.
handleGetRoleList
(
a
)},
function
(
t
){
$
(
"
.confirm-container p
"
).
text
(
t
.
message
),
$
(
"
.confirm-container
"
).
show
()})},
ccwl
.
handleGetRoleList
=
function
(
t
){
this
.
ajax
({
url
:
"
/get_role_list
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
var
e
=
t
.
data
,
a
=
""
,
n
=
[];
ccwl
.
relationRole
=
e
;
for
(
var
c
in
e
)
n
.
push
({
id
:
c
,
name
:
e
[
c
].
name
});
$
(
n
).
each
(
function
(
t
,
e
){
a
+=
'
<li data-value="
'
+
e
.
id
+
'
">
'
+
e
.
name
+
"
</li>
"
}),
$
(
"
.server-select
"
).
html
(
a
),
$
(
"
.dialog-received-gift
"
).
fadeIn
()},
function
(
t
){})},
ccwl
.
handleGetRoleGift
=
function
(
t
){
this
.
ajax
({
url
:
"
/send_role_gift
"
,
type
:
"
POST
"
,
data
:
t
},
function
(
t
){
$
(
"
.btn-receive-package
"
).
hide
(),
$
(
"
.package-info
"
).
append
(
'
<a href="/ald_gift_detail" class="btn btn-small gift-detail">查看礼包</a>
'
),
$
(
"
.dialog-received-gift
"
).
fadeOut
(),
ccwl
.
showToast
({
msg
:
t
.
message
})},
function
(
t
){})};
var
initRoleList
=
function
(
t
){
var
e
=
ccwl
.
relationRole
[
t
].
list
,
a
=
""
;
$
(
e
).
each
(
function
(
t
,
e
){
a
+=
'
<li data-value="
'
+
e
.
roleId
+
'
">
'
+
e
.
roleName
+
"
</li>
"
}),
$
(
"
.role-select
"
).
html
(
a
),
$
(
"
.role
"
).
text
(
"
请选择角色
"
)};
$
(
function
(){
$
(
"
.container-mb .menu
"
).
click
(
function
(){
$
(
"
.left-container
"
).
addClass
(
"
current
"
),
$
(
"
.container
"
).
addClass
(
"
fixed
"
)}),
$
(
"
.container-mb .left-container
"
).
click
(
function
(){
$
(
this
).
removeClass
(
"
current
"
),
$
(
"
.container
"
).
removeClass
(
"
fixed
"
)}),
$
(
"
.left-menu
"
).
click
(
function
(
t
){(
t
=
t
||
window
.
event
).
stopPropagation
()}),
$
(
"
.protocol .checkbox
"
).
click
(
function
(){
$
(
this
).
toggleClass
(
"
current
"
)}),
$
(
"
.user-protocol
"
).
click
(
function
(){
$
(
"
.dialog-protocol
"
).
fadeIn
(),
$
(
"
.protocol-title
"
).
text
(
"
橙橙网络用户服务协议
"
),
$
(
"
.protocol-p
"
).
show
(),
$
(
"
.protocol-v
"
).
hide
()}),
$
(
"
.user-privacy
"
).
click
(
function
(){
$
(
"
.dialog-protocol
"
).
fadeIn
(),
$
(
"
.protocol-title
"
).
text
(
"
橙橙网络隐私保护政策
"
),
$
(
"
.protocol-v
"
).
show
(),
$
(
"
.protocol-p
"
).
hide
()}),
$
(
"
input[name='idCard']
"
).
on
(
"
blur
"
,
function
(){
var
t
=
$
(
"
input[name='realName']
"
).
val
(),
e
=
$
(
"
input[name='idCard']
"
).
val
();
if
(
e
&&
15
!=
e
.
length
&&
18
!=
e
.
length
)
return
ccwl
.
showToast
({
msg
:
"
请输入正确的身份证号码
"
}),
!
1
;
var
a
=
{
real_name
:
t
,
id_card
:
e
};
e
&&
t
&&
ccwl
.
handleAuthRealName
(
a
)}),
$
(
"
input[name='realName']
"
).
blur
(
function
(){
var
t
=
$
.
trim
(
$
(
"
input[name='realName']
"
).
val
()),
e
=
$
.
trim
(
$
(
"
input[name='idCard']
"
).
val
());
if
(
e
&&
15
!=
e
.
length
&&
18
!=
e
.
length
)
return
ccwl
.
showToast
({
msg
:
"
请输入正确的身份证号码
"
}),
!
1
;
var
a
=
{
real_name
:
t
,
id_card
:
e
};
e
&&
t
&&
ccwl
.
handleAuthRealName
(
a
)}),
$
(
"
.btn-register
"
).
click
(
function
(){
var
t
=
$
.
trim
(
$
(
"
input[name='phone']
"
).
val
()),
e
=
$
(
"
input[name='code']
"
).
val
(),
a
=
$
.
trim
(
$
(
"
input[name='password']
"
).
val
()),
n
=
$
.
trim
(
$
(
"
input[name='confirmPassword']
"
).
val
()),
c
=
$
(
"
.protocol .checkbox
"
).
hasClass
(
"
current
"
),
o
=
ccwl
.
reg
.
phone
;
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入手机号码
"
}),
!
1
;
if
(
t
&&!
o
.
test
(
t
))
return
ccwl
.
showToast
({
msg
:
"
请输入正确的手机号码
"
}),
!
1
;
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入验证码
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入密码
"
}),
!
1
;
if
(
!
n
)
return
ccwl
.
showToast
({
msg
:
"
请再次输入密码
"
}),
!
1
;
if
(
n
!==
a
)
return
ccwl
.
showToast
({
msg
:
"
请保持两次密码一致
"
}),
!
1
;
if
(
a
&&
t
&&
a
===
t
)
return
ccwl
.
showToast
({
msg
:
"
密码不可与用户名相同
"
}),
!
1
;
if
(
a
&&
a
.
length
<
6
||
a
&&
a
.
length
>
30
)
return
ccwl
.
showToast
({
msg
:
"
由6-30位字母、数字或字符组成
"
}),
!
1
;
if
(
!
c
)
return
ccwl
.
showToast
({
msg
:
"
请勾选平台协议
"
}),
!
1
;
var
r
=
{
phone
:
t
,
password
:
a
,
auth_code
:
e
};
ccwl
.
handleRegister
(
r
)}),
$
(
"
.send-code
"
).
click
(
function
(){
var
t
=
$
.
trim
(
$
(
this
).
parents
(
"
.form-container
"
).
find
(
"
input[name='phone']
"
).
val
()),
e
=
ccwl
.
reg
.
phone
;
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入手机号码
"
}),
!
1
;
if
(
t
&&!
e
.
test
(
t
))
return
ccwl
.
showToast
({
msg
:
"
请输入正确的手机号码
"
}),
!
1
;
var
a
=
{
phone
:
t
};
ccwl
.
handleSendCode
(
a
,
this
)}),
$
(
"
.btn-login
"
).
click
(
function
(){
var
t
=
$
(
this
).
attr
(
"
data-type
"
),
e
=
$
(
"
input[name='account']
"
).
val
(),
a
=
$
.
trim
(
$
(
"
input[name='password']
"
).
val
()),
n
=
$
(
"
.protocol .checkbox
"
).
hasClass
(
"
current
"
);
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入账号
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入密码
"
}),
!
1
;
if
(
!
n
&&
t
)
return
ccwl
.
showToast
({
msg
:
"
请勾选平台协议
"
}),
!
1
;
var
c
=
{
account
:
e
,
password
:
a
};
ccwl
.
handleLogin
(
c
,
t
)}),
$
(
"
.btn-findPassword
"
).
click
(
function
(){
var
t
=
$
.
trim
(
$
(
"
input[name='phone']
"
).
val
()),
e
=
$
(
"
input[name='code']
"
).
val
(),
a
=
$
.
trim
(
$
(
"
input[name='password']
"
).
val
()),
n
=
$
.
trim
(
$
(
"
input[name='confirmPassword']
"
).
val
()),
c
=
ccwl
.
reg
.
phone
;
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入手机号码
"
}),
!
1
;
if
(
t
&&!
c
.
test
(
t
))
return
ccwl
.
showToast
({
msg
:
"
请输入正确的手机号码
"
}),
!
1
;
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入验证码
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入密码
"
}),
!
1
;
if
(
!
n
)
return
ccwl
.
showToast
({
msg
:
"
请再次输入密码
"
}),
!
1
;
if
(
a
&&
t
&&
a
===
t
)
return
ccwl
.
showToast
({
msg
:
"
密码不可与用户名相同
"
}),
!
1
;
if
(
n
!==
a
)
return
ccwl
.
showToast
({
msg
:
"
请保持两次密码一致
"
}),
!
1
;
if
(
n
&&
n
.
length
<
6
||
n
&&
n
.
length
>
30
)
return
ccwl
.
showToast
({
msg
:
"
由6-30位字母、数字或字符组成
"
}),
!
1
;
var
o
=
{
phone
:
t
,
new_password
:
a
,
auth_code
:
e
};
ccwl
.
handleFindPassword
(
o
)}),
$
(
"
.change-password a,.show-change-password
"
).
click
(
function
(){
$
(
"
.resize-password
"
).
fadeIn
(),
$
(
"
.container-mb
"
).
addClass
(
"
fixed
"
)}),
$
(
document
).
on
(
"
click
"
,
"
.close,.close-click,.btn-close
"
,
function
(){
var
t
=
$
(
this
).
attr
(
"
data-type
"
);
$
(
"
.toast-item-wrapper
"
).
remove
(),
$
(
this
).
parents
(
"
.dialog
"
).
fadeOut
(),
$
(
"
.container-mb
"
).
removeClass
(
"
fixed
"
),
1
!=
t
&&
$
(
"
.form-container input
"
).
val
(
""
)}),
$
(
"
.btn-changePassword
"
).
click
(
function
(){
var
t
=
$
(
this
).
attr
(
"
data-type
"
),
e
=
$
.
trim
(
$
(
"
input[name='nowPassword']
"
).
val
()),
a
=
$
.
trim
(
$
(
"
input[name='newPassword']
"
).
val
()),
n
=
$
.
trim
(
$
(
"
input[name='confirmNewPassword']
"
).
val
());
if
(
!
e
)
return
ccwl
.
showToast
({
msg
:
"
请输入当前密码
"
}),
!
1
;
if
(
!
a
)
return
ccwl
.
showToast
({
msg
:
"
请输入新密码
"
}),
!
1
;
if
(
!
n
)
return
ccwl
.
showToast
({
msg
:
"
请再次输入新密码
"
}),
!
1
;
if
(
a
!==
n
)
return
ccwl
.
showToast
({
msg
:
"
请保持两次新密码一致
"
}),
!
1
;
if
(
n
&&
n
.
length
<
6
||
n
&&
n
.
length
>
30
)
return
ccwl
.
showToast
({
msg
:
"
由6-30位字母、数字或字符组成
"
}),
!
1
;
var
c
=
{
password
:
e
,
new_password
:
a
};
ccwl
.
handleChangePassword
(
c
,
t
)}),
$
(
"
.back
"
).
click
(
function
(){
window
.
history
.
go
(
-
1
)}),
$
(
"
.bind-orange
"
).
click
(
function
(){
$
(
"
.dialog-orange
"
).
fadeIn
()}),
$
(
"
.btn-bind-orange
"
).
click
(
function
(){
var
t
=
$
(
"
input[name='orangeCode']
"
).
val
(),
e
=
$
(
"
.leave-times span
"
).
text
(),
a
=
$
(
this
).
attr
(
"
data-type
"
);
if
(
!
t
)
return
ccwl
.
showToast
({
msg
:
"
请输入识别码
"
}),
!
1
;
if
(
1
*
e
<=
0
)
return
ccwl
.
showToast
({
msg
:
"
今日错误次数达上限
"
}),
!
1
;
var
n
=
{
bind_code
:
t
};
ccwl
.
handleBindOrangeCode
(
n
,
a
)}),
$
(
"
.btn-confirm
"
).
click
(
function
(){
$
(
this
).
parents
(
"
.dialog
"
).
fadeOut
(),
location
.
href
=
"
/login
"
}),
$
(
"
.expect
"
).
click
(
function
(){
ccwl
.
showToast
({
msg
:
"
暂未开放,敬请期待
"
})}),
$
(
"
.btn-receive-package
"
).
click
(
function
(){
var
t
=
$
(
this
).
attr
(
"
data-type
"
),
e
=
$
(
this
).
attr
(
"
data-receive
"
);
if
(
"
0
"
===
t
)
return
$
(
"
.confirm-container
"
).
show
(),
$
(
"
.confirm-container .message-content p
"
).
text
(
"
今日Orange识别码输入错误次数已达上限
"
),
$
(
"
.confirm-container .message-content a
"
).
text
(
"
确定
"
).
addClass
(
"
close-click
"
).
attr
(
"
onclick
"
,
"
localStorage.removeItem('showOrange');
"
),
!
1
;
ccwl
.
handleGetServer
(
e
)}),
$
(
"
.btn-receive
"
).
click
(
function
(){
var
t
=
$
(
"
.server-select li.current
"
).
attr
(
"
data-value
"
),
e
=
$
(
"
.role-select li.current
"
).
attr
(
"
data-value
"
);
if
(
!
t
||
""
==
t
)
return
ccwl
.
showToast
({
msg
:
"
请选择服务器
"
}),
!
1
;
if
(
!
e
||
""
==
e
)
return
ccwl
.
showToast
({
msg
:
"
请选择角色
"
}),
!
1
;
var
a
=
{
serverId
:
t
,
roleId
:
e
};
ccwl
.
handleGetRoleGift
(
a
)}),
$
(
"
.gift-span span
"
).
click
(
function
(){
$
(
this
).
addClass
(
"
current
"
).
siblings
().
removeClass
(
"
current
"
);
var
t
=
$
(
this
).
index
();
$
(
"
.tab-content p
"
).
hide
(),
$
(
"
.tab-content p
"
).
eq
(
t
).
show
().
siblings
().
hide
()}),
$
(
"
.toggle-down
"
).
click
(
function
(){
$
(
"
.gift-explain-container
"
).
fadeIn
()}),
$
(
"
.select span
"
).
click
(
function
(){
$
(
"
.select-option
"
).
hide
(),
$
(
this
).
hasClass
(
"
current
"
)?(
$
(
"
.select span
"
).
removeClass
(
"
current
"
),
$
(
this
).
siblings
(
"
.select-option
"
).
stop
().
slideUp
(
100
)):(
$
(
"
.select span
"
).
removeClass
(
"
current
"
),
$
(
this
).
addClass
(
"
current
"
),
$
(
this
).
siblings
(
"
.select-option
"
).
stop
().
slideDown
(
100
))}),
$
(
document
).
on
(
"
click
"
,
"
.select-option li
"
,
function
(){
var
t
=
$
(
this
).
text
();
$
(
this
).
addClass
(
"
current
"
).
siblings
().
removeClass
(
"
current
"
),
$
(
this
).
parents
(
"
.select
"
).
find
(
"
span
"
).
text
(
t
),
$
(
this
).
parents
(
"
.select
"
).
find
(
"
span
"
).
removeClass
(
"
current
"
),
$
(
this
).
parents
(
"
.select
"
).
find
(
"
.select-option
"
).
stop
().
slideUp
(
100
)}),
$
(
document
).
on
(
"
click
"
,
"
.server-select li
"
,
function
(){
var
t
=
$
(
this
).
attr
(
"
data-value
"
);
initRoleList
(
t
)}),
$
(
"
input[name='password']
"
).
keyup
(
function
(
t
){
13
===
t
.
keyCode
&&
$
(
"
.btn-login
"
).
trigger
(
"
click
"
)}),
$
(
"
input[name='confirmNewPassword']
"
).
keyup
(
function
(
t
){
13
===
t
.
keyCode
&&
$
(
"
.btn-changePassword
"
).
trigger
(
"
click
"
)})});
\ No newline at end of file
src/public/static/postcard/css/style.css
View file @
7bb9a9f1
...
...
@@ -575,12 +575,23 @@ textarea {
width
:
100%
;
height
:
100%
;
overflow
:
scroll
;
background
:
rgba
(
0
,
0
,
0
,
0.7
)
url("../images/save_img_bg.png")
no-repeat
center
;
background-size
:
100%
auto
;
}
.dialog-img
img
{
.dialog-img
.dialog-img-content
{
position
:
absolute
;
width
:
90%
;
left
:
5%
;
top
:
1rem
;
padding-top
:
2.5rem
;
}
.dialog-img
.dialog-img-content
.img-scroll
{
height
:
13.5rem
;
overflow
:
scroll
;
width
:
100%
;
}
.dialog-img
.dialog-img-content
img
{
width
:
100%
;
}
.fixed
{
position
:
fixed
;
...
...
src/public/static/postcard/css/style.less
View file @
7bb9a9f1
...
...
@@ -533,11 +533,22 @@
width: 100%;
height: 100%;
overflow: scroll;
img{
background: rgba(0,0,0,.7) url("../images/save_img_bg.png") no-repeat center;
background-size: 100% auto;
.dialog-img-content{
.pa();
width: 90%;
left: 5%;
top: 1rem;
padding-top: 2.5rem;
.img-scroll{
height: 13.5rem;
overflow: scroll;
width: 100%;
}
img{
width: 100%;
}
}
}
.fixed{
...
...
src/public/static/postcard/images/save_img_bg.png
0 → 100644
View file @
7bb9a9f1
355 KB
src/public/static/postcard/images/sh_fail.jpg
0 → 100644
View file @
7bb9a9f1
98.4 KB
src/public/static/postcard/js/main.js
View file @
7bb9a9f1
...
...
@@ -22,7 +22,7 @@ card.ajax = function (data, callback) {
if
(
res
.
error
==
1019
){
location
.
href
=
"
/login
"
;
return
false
;
}
else
if
(
res
.
error
==
403
){
}
else
if
(
res
.
error
==
40
0
3
){
location
.
href
=
"
/bind/ald/code
"
return
false
;
}
...
...
@@ -46,6 +46,7 @@ card.handleGetServer = function (receive){
userId
:
res
.
data
.
userId
}
card
.
handleGetRoleList
(
params
);
$
(
'
.dialog-server
'
).
fadeIn
();
})
}
...
...
src/public/static/postcard/js/main.min.js
0 → 100644
View file @
7bb9a9f1
var
card
=
{
relationRole
:{},
clickFlag
:
!
0
,
bindInfo
:{}};
card
.
ajax
=
function
(
e
,
t
){
e
.
data
.
_token
=
$
(
'
meta[name="token"]
'
).
attr
(
"
value
"
),
$
.
ajax
({
type
:
e
.
type
?
e
.
type
:
"
GET
"
,
url
:
location
.
origin
+
e
.
url
,
dataType
:
"
json
"
,
data
:
e
.
data
,
error
:
function
(
e
){
try
{
var
t
=
e
.
responseText
;
alert
(
t
.
message
)}
catch
(
e
){
alert
(
"
系统开小差~~
"
)}},
success
:
function
(
e
){
return
1019
==
e
.
error
?(
location
.
href
=
"
/login
"
,
!
1
):
4003
==
e
.
error
?(
location
.
href
=
"
/bind/ald/code
"
,
!
1
):
void
t
(
e
)}}),
setTimeout
(
function
(){
card
.
clickFlag
=!
0
},
1
e3
)},
card
.
handleGetServer
=
function
(
e
){
this
.
ajax
({
url
:
"
/ald_bind_info
"
,
type
:
"
get
"
,
data
:{}},
function
(
e
){
card
.
bindInfo
=
e
.
data
;
var
t
=
{
serverId
:
e
.
data
.
serverId
,
userId
:
e
.
data
.
userId
};
card
.
handleGetRoleList
(
t
),
$
(
"
.dialog-server
"
).
fadeIn
()})},
card
.
handleGetRoleList
=
function
(
e
){
this
.
ajax
({
url
:
"
/get_role_list
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
e
){
var
t
=
e
.
data
,
a
=
""
,
r
=
[];
card
.
relationRole
=
t
;
for
(
var
o
in
t
)
r
.
push
({
id
:
o
,
name
:
t
[
o
].
name
});
a
=
'
<option value="-1">请选择</option>
'
,
$
(
r
).
each
(
function
(
e
,
t
){
a
+=
'
<option value="
'
+
t
.
id
+
'
">
'
+
t
.
name
+
"
</option>
"
}),
$
(
"
.server-select
"
).
html
(
a
)})},
card
.
bindRole
=
function
(
e
){
this
.
ajax
({
url
:
"
/bind/ald/role
"
,
type
:
"
POST
"
,
data
:
e
},
function
(
t
){
0
===
t
.
error
?(
$
(
"
.dialog
"
).
hide
(),
location
.
href
=
"
/card/html?roleId=
"
+
e
.
roleId
+
"
&serverId=
"
+
e
.
serverId
):
alert
(
t
.
msg
)})};
var
initRoleList
=
function
(
e
){
var
t
=
card
.
relationRole
[
e
].
list
,
a
=
'
<option value="-1">请选择</option>
'
;
$
(
t
).
each
(
function
(
e
,
t
){
a
+=
'
<option value="
'
+
t
.
roleId
+
'
">
'
+
t
.
roleName
+
"
</option>
"
}),
$
(
"
.role-select
"
).
html
(
a
)};
$
(
function
(){
$
(
"
.btn-card-bind-role
"
).
click
(
function
(){
var
e
=
$
(
"
.server-select option:selected
"
).
val
(),
t
=
$
(
"
.server-select option:selected
"
).
text
(),
a
=
$
(
"
.role-select option:selected
"
).
val
();
if
(
roleName
=
$
(
"
.role-select option:selected
"
).
text
(),
!
e
||
"
-1
"
==
e
)
return
alert
(
"
请选择服务器
"
),
!
1
;
if
(
!
a
||
"
-1
"
==
a
)
return
alert
(
"
请选择角色
"
),
!
1
;
var
r
=
{
roleId
:
a
,
serverId
:
e
,
serverName
:
t
,
roleName
:
roleName
};
card
.
clickFlag
&&
card
.
bindRole
(
r
)}),
$
(
"
.server-select
"
).
change
(
function
(){
var
e
=
$
(
this
).
val
();
initRoleList
(
e
)})});
\ No newline at end of file
src/resources/views/card/card.blade.php
View file @
7bb9a9f1
...
...
@@ -114,7 +114,7 @@
@if($userImgStatus == -1)
<img
src=
"/static/postcard/images/img_add.jpg"
class=
"img img-add"
alt=
""
>
<input
type=
"file"
id=
"file"
>
@endif
@if($userImgStatus == 0)
<img
src=
"/static/postcard/images/img_sh.jpg"
class=
"img img-sh"
alt=
""
>
@endif
@if($userImgStatus == 1)
<img
src=
"{{ $userImg }}"
class=
"img img-sh"
alt=
""
>
@endif
@if($userImgStatus == 2)
<img
src=
"
"
class=
"img img-sh"
alt=
"
"
>
@endif
@if($userImgStatus == 2)
<img
src=
"
/static/postcard/images/sh_fail.jpg"
class=
"img img-sh"
alt=
""
>
<input
type=
"file"
id=
"file
"
>
@endif
</div>
<div
class=
"bottom-container"
>
<!--分享-->
...
...
@@ -125,7 +125,11 @@
</div>
<div
class=
"dialog dialog-img hide"
>
<img
src=
""
alt=
""
>
<div
class=
"dialog-img-content"
>
<div
class=
"img-scroll"
>
<img
src=
""
alt=
""
>
</div>
</div>
</div>
<div
class=
"loading hide"
>
<span></span>
...
...
@@ -156,7 +160,7 @@
renderHtml
(
'
#wq2
'
,
'
{{ $armsExciting }}
'
);
renderHtml
(
'
#wq3
'
,
'
{{ $armsScore }}
'
);
// 上传图片
$
(
'
#file
'
).
change
(
function
(
e
){
$
(
document
).
on
(
'
change
'
,
'
#file
'
,
function
(
e
){
var
formData
=
new
FormData
();
var
file
=
$
(
"
#file
"
)[
0
].
files
[
0
];
var
acceptFileTypes
=
/^image
\/(
gif|jpe
?
g|png
)
$/i
;
...
...
@@ -182,7 +186,7 @@
dataType
:
"
json
"
,
success
:
function
(
data
)
{
$
(
'
.img-add
'
).
hide
();
$
(
'
.
img-sh
'
).
show
(
);
$
(
'
.
ggsk-container
'
).
html
(
'
<img src="/static/postcard/images/img_sh.jpg" class="img img-sh" alt=""><input type="file" id="file">
'
);
},
error
:
function
(
data
)
{
...
...
@@ -202,8 +206,8 @@
}).
then
(
canvas
=>
{
var
image
=
canvas
.
toDataURL
(
'
image/jpeg
'
,
1.0
);
var
img
=
'
<img src="
'
+
image
+
'
">
'
;
$
(
'
.dialog
'
).
append
(
img
);
$
(
'
.dialog
'
).
show
();
$
(
'
.dialog
-img-content .img-scroll
'
).
html
(
img
);
$
(
'
.dialog
-img
'
).
show
();
$
(
'
.loading
'
).
hide
();
});
$
(
'
.postcard-container
'
).
addClass
(
'
fixed
'
);
...
...
@@ -221,7 +225,30 @@
$
(
this
).
fadeOut
();
$
(
'
.btn-save,.btn-share
'
).
show
();
$
(
'
.postcard-container
'
).
removeClass
(
'
fixed
'
);
})
});
function
wxShare
(){
var
data
=
res
.
response
.
sign
;
var
appId
=
data
.
appId
;
var
timestamp
=
data
.
timestamp
;
var
nonceStr
=
data
.
nonceStr
;
var
signature
=
data
.
signature
;
wx
.
config
({
debug
:
false
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId
:
appId
,
// 必填,公众号的唯一标识
timestamp
:
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
nonceStr
,
// 必填,生成签名的随机串
signature
:
signature
,
// 必填,签名,见附录1
jsApiList
:
[
'
updateAppMessageShareData
'
,
'
onMenuShareAppMessage
'
,
'
hideMenuItems
'
]
// 必填,需要使用的JS接口列表,所有JS接口列表见附录2
});
wx
.
ready
(
function
()
{
// config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,
// config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,
// 则须把相关接口放在ready函数中调用来确保正确执行。
// 对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
});
}
});
</script>
</body>
...
...
src/resources/views/card/index.blade.php
View file @
7bb9a9f1
...
...
@@ -31,7 +31,7 @@
</div>
<a
href=
"javascript:"
class=
"btn-start"
></a>
<div
class=
"dialog hide"
>
<div
class=
"dialog
dialog-server
hide"
>
<div
class=
"content"
>
<a
href=
"javascript:"
class=
"close"
></a>
<ul>
...
...
@@ -55,7 +55,6 @@
});
$
(
'
.btn-start
'
).
click
(
function
(){
card
.
handleGetServer
();
$
(
'
.dialog
'
).
fadeIn
();
});
})
</script>
...
...
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