Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
beyond-clouds-front
Commits
89a319f6
Commit
89a319f6
authored
Feb 13, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'yoona' into 'master'
Yoona See merge request pigbigbig/beyond-clouds-front!56
parents
3151bc7a
c4c01375
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
28 deletions
+49
-28
pages/personal-center/account/setting.vue
+46
-25
pages/personal-center/u/info.vue
+3
-3
No files found.
pages/personal-center/account/setting.vue
View file @
89a319f6
<
template
>
<
template
>
<div>
<div>
<card-container
style=
"margin-top: 16px;padding-bottom: 32px"
title=
"账号绑定"
label=
"账号注册"
>
<card-container
style=
"margin-top: 16px;padding-bottom: 32px"
title=
"账号绑定"
label=
"账号注册"
@
listenCardConLabel=
"() =>
{this.$router.push('/users/register')}"
>
<div
class=
"bind-account-item__wrap"
>
<div
class=
"bind-account-item__wrap"
>
<div
class=
"bind-account-item"
>
<div
class=
"bind-account-item"
>
<div
class=
"item__left"
>
<div
class=
"item__left"
>
...
@@ -124,14 +124,14 @@
...
@@ -124,14 +124,14 @@
>
</login-input>
>
</login-input>
<login-input
<login-input
:style=
"
{pointerEvents: disabled, width: '334px'}"
:style=
"
{pointerEvents: disabled, width: '334px'}"
v-model="verifyCode"
v-model="verifyCode
2
"
input-type="3"
input-type="3"
placeholder="请输入验证码"
placeholder="请输入验证码"
:error-message="verifyErrMsg"
:error-message="verify
2
ErrMsg"
:is-count="isCount"
:is-count="isCount"
@handleCheck="handleCheckVerifyCode"
@handleCheck="handleCheckVerifyCode
('password')
"
@cancelCheck="verifyErrMsg = ''"
@cancelCheck="verify
2
ErrMsg = ''"
@sendSms="sendVerifyCode"
@sendSms="sendVerifyCode
('password')
"
@keyup.enter.native="savePassword"
@keyup.enter.native="savePassword"
>
</login-input>
>
</login-input>
</div>
</div>
...
@@ -194,7 +194,6 @@
...
@@ -194,7 +194,6 @@
let
local
=
infoResponse
.
data
.
local
;
let
local
=
infoResponse
.
data
.
local
;
let
auths
=
{};
let
auths
=
{};
for
(
let
[
key
,
item
]
of
Object
.
entries
(
local
))
{
for
(
let
[
key
,
item
]
of
Object
.
entries
(
local
))
{
console
.
log
(
key
);
auths
[
key
]
=
item
.
account
auths
[
key
]
=
item
.
account
}
}
console
.
log
(
auths
);
console
.
log
(
auths
);
...
@@ -212,6 +211,8 @@
...
@@ -212,6 +211,8 @@
isCount
:
false
,
isCount
:
false
,
newPassword
:
''
,
newPassword
:
''
,
newPasswordMsg
:
''
,
newPasswordMsg
:
''
,
verifyCode2
:
''
,
verify2ErrMsg
:
''
,
disabled
:
'none'
disabled
:
'none'
}
}
},
},
...
@@ -232,15 +233,36 @@
...
@@ -232,15 +233,36 @@
handleCheckPassword
()
{
handleCheckPassword
()
{
this
.
newPasswordMsg
=
checkPassword
(
this
.
newPassword
);
this
.
newPasswordMsg
=
checkPassword
(
this
.
newPassword
);
},
},
handleCheckVerifyCode
()
{
handleCheckVerifyCode
(
type
=
''
)
{
this
.
verifyErrMsg
=
checkVerification
(
this
.
verifyCode
);
if
(
type
===
'password'
)
{
this
.
verify2ErrMsg
=
checkVerification
(
this
.
verifyCode2
);
}
else
{
this
.
verifyErrMsg
=
checkVerification
(
this
.
verifyCode
);
}
},
},
// 发送验证码
// 发送验证码
sendVerifyCode
()
{
sendVerifyCode
(
type
=
''
)
{
if
(
type
===
'password'
)
{
if
(
!
this
.
hasOwnProperty
(
'mobile'
))
{
this
.
$message
({
type
:
'warning'
,
message
:
'请先绑定手机号'
});
return
false
}
else
{
this
.
isCount
=
false
;
this
.
getSms
(
type
);
this
.
verify2ErrMsg
=
''
;
this
.
isCount
=
true
;
setTimeout
(()
=>
{
this
.
isCount
=
false
;
},
60000
);
return
false
}
}
if
(
this
.
title
===
'绑定手机号'
)
{
if
(
this
.
title
===
'绑定手机号'
)
{
this
.
isCount
=
false
;
this
.
isCount
=
false
;
let
account
=
this
.
account
!==
''
?
this
.
account
:
this
.
mobile
;
this
.
accountErrMsg
=
checkPhone
(
this
.
account
);
this
.
accountErrMsg
=
checkPhone
(
account
);
if
(
this
.
accountErrMsg
===
''
)
{
if
(
this
.
accountErrMsg
===
''
)
{
this
.
getSms
();
this
.
getSms
();
this
.
verifyErrMsg
=
''
;
this
.
verifyErrMsg
=
''
;
...
@@ -262,7 +284,7 @@
...
@@ -262,7 +284,7 @@
}
}
}
}
},
},
async
getSms
()
{
async
getSms
(
type
=
''
)
{
let
account
=
this
.
account
!==
''
?
this
.
account
:
this
.
mobile
;
let
account
=
this
.
account
!==
''
?
this
.
account
:
this
.
mobile
;
let
smsResponse
=
await
this
.
$axios
.
$get
(
config
.
api
.
get
.
Sms
.
send
,
{
let
smsResponse
=
await
this
.
$axios
.
$get
(
config
.
api
.
get
.
Sms
.
send
,
{
params
:
{
params
:
{
...
@@ -275,7 +297,11 @@
...
@@ -275,7 +297,11 @@
message
:
'短信发送成功!'
message
:
'短信发送成功!'
});
});
}
else
{
}
else
{
this
.
verifyErrMsg
=
smsResponse
.
msg
;
if
(
type
===
'password'
)
{
this
.
verify2ErrMsg
=
smsResponse
.
msg
;
}
else
{
this
.
verifyErrMsg
=
smsResponse
.
msg
;
}
this
.
$message
({
this
.
$message
({
type
:
'info'
,
type
:
'info'
,
message
:
smsResponse
.
msg
message
:
smsResponse
.
msg
...
@@ -354,28 +380,22 @@
...
@@ -354,28 +380,22 @@
},
},
handleRevise
()
{
handleRevise
()
{
this
.
disabled
=
this
.
disabled
===
'auto'
?
'none'
:
'auto'
;
this
.
disabled
=
this
.
disabled
===
'auto'
?
'none'
:
'auto'
;
// 取消时 清空输入框 错误提示
if
(
this
.
disabled
===
'none'
)
{
if
(
this
.
disabled
===
'none'
)
{
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
}
}
},
},
async
savePassword
()
{
async
savePassword
()
{
this
.
handleCheckPassword
();
this
.
handleCheckPassword
();
this
.
handleCheckVerifyCode
(
);
this
.
verify2ErrMsg
=
checkVerification
(
this
.
verifyCode2
);
if
(
!
this
.
hasOwnProperty
(
'mobile'
))
{
if
(
this
.
newPasswordMsg
!==
''
&&
this
.
verify2ErrMsg
!==
''
)
return
false
;
this
.
$message
({
type
:
'warning'
,
message
:
'请先绑定手机号'
});
return
false
}
if
(
this
.
newPasswordMsg
!==
''
&&
this
.
verifyErrMsg
!==
''
)
return
false
;
let
resetResponse
;
let
resetResponse
;
resetResponse
=
await
this
.
$axios
.
$put
(
config
.
api
.
put
.
User
.
revisePassword
,
{
resetResponse
=
await
this
.
$axios
.
$put
(
config
.
api
.
put
.
User
.
revisePassword
,
{
mobile
:
this
.
mobile
,
mobile
:
this
.
mobile
,
password
:
this
.
newPassword
,
password
:
this
.
newPassword
,
verifyCode
:
this
.
verifyCode
verifyCode
:
this
.
verifyCode
2
});
});
console
.
log
(
resetResponse
);
console
.
log
(
resetResponse
);
if
(
resetResponse
.
code
===
0
)
{
if
(
resetResponse
.
code
===
0
)
{
...
@@ -385,8 +405,9 @@
...
@@ -385,8 +405,9 @@
});
});
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
}
else
{
}
else
{
this
.
verify2ErrMsg
=
resetResponse
.
msg
;
this
.
$message
({
this
.
$message
({
type
:
'
info
'
,
type
:
'
error
'
,
message
:
resetResponse
.
msg
message
:
resetResponse
.
msg
});
});
}
}
...
...
pages/personal-center/u/info.vue
View file @
89a319f6
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<p><span>
性别:
</span>
{{
genderInfo
}}
</p>
<p><span>
性别:
</span>
{{
genderInfo
}}
</p>
</div>
</div>
<div>
<div>
<p><span>
生日:
</span>
{{
birthday
||
'暂无'
}}
</p>
<p><span>
生日:
</span>
暂无
</p>
</div>
</div>
<div>
<div>
<p><span>
签名:
</span>
{{
signature
||
'暂无'
}}
</p>
<p><span>
签名:
</span>
{{
signature
||
'暂无'
}}
</p>
...
@@ -54,9 +54,9 @@ export default {
...
@@ -54,9 +54,9 @@ export default {
},
},
computed
:
{
computed
:
{
genderInfo
:
function
()
{
genderInfo
:
function
()
{
if
(
this
.
gender
===
0
)
{
if
(
this
.
gender
===
1
)
{
return
'男'
return
'男'
}
else
if
(
this
.
gender
===
1
)
{
}
else
if
(
this
.
gender
===
2
)
{
return
'女'
return
'女'
}
else
{
}
else
{
return
'保密'
return
'保密'
...
...
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