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
3151bc7a
Commit
3151bc7a
authored
Feb 13, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of coding.yundingshuyuan.com:pigbigbig/beyond-clouds-front
parents
787a5dd8
0ce069e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
38 deletions
+111
-38
action/config.js
+1
-0
pages/personal-center/account/setting.vue
+101
-29
pages/personal-center/home/info.vue
+9
-9
No files found.
action/config.js
View file @
3151bc7a
...
...
@@ -48,6 +48,7 @@ export default {
Authentication
:{
qqAuth
:
'/api/auth/qq'
,
//qq认证
authsList
:
'/api/auth/auths'
,
//获取我的认证列表
},
Sms
:{
...
...
pages/personal-center/account/setting.vue
View file @
3151bc7a
...
...
@@ -9,11 +9,11 @@
</div>
<div
class=
"info"
>
<p>
手机号
</p>
<h6>
{{
mobile
||
'未绑定'
}}
</h6>
<h6>
{{
this
.
hasOwnProperty
(
'mobile'
)
?
mobile
:
'未绑定'
}}
</h6>
</div>
</div>
<div
class=
"item__right"
@
click=
"handleChange('手机号')"
>
<div
class=
"item__right"
@
click=
"handleChange('手机号')"
v-if=
"!this.hasOwnProperty('mobile')"
>
更换
</div>
...
...
@@ -26,18 +26,18 @@
</div>
<div
class=
"info"
>
<p>
邮箱
</p>
<h6>
{{
email
||
'未绑定'
}}
</h6>
<h6>
{{
this
.
hasOwnProperty
(
'email'
)
?
email
:
'未绑定'
}}
</h6>
</div>
</div>
<div
class=
"item__right"
@
click=
"handleChange('邮箱')"
>
更换
<div
class=
"item__right"
@
click=
"handleChange('邮箱')"
v-if=
"!this.hasOwnProperty('email')"
>
绑定
</div>
</div>
</div>
<div
class=
"bind-account-item__wrap"
>
<div
class=
"bind-account-item__wrap"
v-if=
"false"
>
<div
class=
"bind-account-item"
>
<div
class=
"item__left"
>
<div
class=
"avatar"
>
...
...
@@ -57,7 +57,7 @@
</div>
<div
class=
"bind-account-item"
>
<div
class=
"bind-account-item"
v-if=
"false"
>
<div
class=
"item__left"
>
<div
class=
"avatar"
>
<embed
src=
"../../../assets/svg/qq.svg"
width=
"18"
height=
"21"
...
...
@@ -78,7 +78,7 @@
</div>
</div>
<div
class=
"bind-account-item__wrap"
>
<div
class=
"bind-account-item__wrap"
v-if=
"false"
>
<div
class=
"bind-account-item"
>
<div
class=
"item__left"
>
<div
class=
"avatar"
>
...
...
@@ -109,13 +109,34 @@
<p
class=
"submit-button"
>
保存
</p>
</card-container>
<card-container
style=
"margin-top: 16px;padding-bottom: 32px"
title=
"修改登录密码"
label=
"忘记密码"
v-if=
"fal
se"
>
<card-container
style=
"margin-top: 16px;padding-bottom: 32px"
title=
"修改登录密码"
:label=
"disabled === 'auto' ? '返回':'修改'"
@
listenCardConLabel=
"handleRevi
se"
>
<div
class=
"bind-account-item__wrap"
>
<input
type=
"text"
placeholder=
"请输入旧密码"
>
<input
type=
"text"
placeholder=
"请输入新密码"
>
<login-input
:style=
"
{pointerEvents: disabled, width: '334px'}"
:error-message="newPasswordMsg"
placeholder="请输入新的密码"
input-type="2"
type="password"
v-model="newPassword"
@handleCheck="handleCheckPassword"
@cancelCheck="newPasswordMsg = ''"
@keyup.enter.native="savePassword"
>
</login-input>
<login-input
:style=
"
{pointerEvents: disabled, width: '334px'}"
v-model="verifyCode"
input-type="3"
placeholder="请输入验证码"
:error-message="verifyErrMsg"
:is-count="isCount"
@handleCheck="handleCheckVerifyCode"
@cancelCheck="verifyErrMsg = ''"
@sendSms="sendVerifyCode"
@keyup.enter.native="savePassword"
>
</login-input>
</div>
<p
class=
"submit-button"
>
保存
</p>
<p
class=
"submit-button"
@
click=
"savePassword"
v-if=
"disabled === 'auto'"
>
保存
</p>
</card-container>
<div
class=
"popup-box__wrap"
v-if=
"isShow"
>
...
...
@@ -143,7 +164,10 @@
></login-input>
<div
class=
"popup-box-button"
>
<button
style=
"margin-right: 20px"
@
click=
"handleChangeAccount"
>
确定
</button>
<button
@
click=
"() => this.isShow = false"
>
取消
</button>
<button
@
click=
"() =>
{
Object.assign(this.$data, this.$options.data());
this.isShow = false
}">取消
</button>
</div>
</div>
</div>
...
...
@@ -156,7 +180,7 @@
import
CardContainer
from
'../../../components/pc/cardContainer'
;
import
LoginInput
from
"../../../components/pc/loginCard/loginInput"
;
import
config
from
'../../../action/config'
;
import
{
checkPhone
,
checkVerification
,
checkEmail
}
from
'../../users/checkfrom'
import
{
checkPhone
,
check
Password
,
check
Verification
,
checkEmail
}
from
'../../users/checkfrom'
export
default
{
name
:
'setting'
,
...
...
@@ -165,9 +189,16 @@
CardContainer
},
async
asyncData
({
$axios
})
{
let
infoResponse
=
await
$axios
.
$get
(
config
.
api
.
get
.
User
.
myInfo
);
let
infoResponse
=
await
$axios
.
$get
(
config
.
api
.
get
.
Authentication
.
authsList
);
console
.
log
(
infoResponse
);
return
{
...
infoResponse
.
data
}
let
local
=
infoResponse
.
data
.
local
;
let
auths
=
{};
for
(
let
[
key
,
item
]
of
Object
.
entries
(
local
))
{
console
.
log
(
key
);
auths
[
key
]
=
item
.
account
}
console
.
log
(
auths
);
return
{
...
auths
}
},
data
()
{
return
{
...
...
@@ -178,7 +209,10 @@
placeholder
:
''
,
accountErrMsg
:
''
,
verifyErrMsg
:
''
,
isCount
:
false
isCount
:
false
,
newPassword
:
''
,
newPasswordMsg
:
''
,
disabled
:
'none'
}
},
methods
:
{
...
...
@@ -195,6 +229,9 @@
this
.
accountErrMsg
=
checkEmail
(
this
.
account
);
}
},
handleCheckPassword
()
{
this
.
newPasswordMsg
=
checkPassword
(
this
.
newPassword
);
},
handleCheckVerifyCode
()
{
this
.
verifyErrMsg
=
checkVerification
(
this
.
verifyCode
);
},
...
...
@@ -202,7 +239,8 @@
sendVerifyCode
()
{
if
(
this
.
title
===
'绑定手机号'
)
{
this
.
isCount
=
false
;
this
.
accountErrMsg
=
checkPhone
(
this
.
account
);
let
account
=
this
.
account
!==
''
?
this
.
account
:
this
.
mobile
;
this
.
accountErrMsg
=
checkPhone
(
account
);
if
(
this
.
accountErrMsg
===
''
)
{
this
.
getSms
();
this
.
verifyErrMsg
=
''
;
...
...
@@ -225,9 +263,10 @@
}
},
async
getSms
()
{
let
account
=
this
.
account
!==
''
?
this
.
account
:
this
.
mobile
;
let
smsResponse
=
await
this
.
$axios
.
$get
(
config
.
api
.
get
.
Sms
.
send
,
{
params
:
{
mobile
:
this
.
account
mobile
:
account
}
});
if
(
smsResponse
.
code
===
0
)
{
...
...
@@ -252,7 +291,7 @@
if
(
emailResponse
.
code
===
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'
短信
发送成功!'
message
:
'
邮件
发送成功!'
});
}
else
{
this
.
verifyErrMsg
=
emailResponse
.
msg
;
...
...
@@ -282,6 +321,7 @@
});
this
.
mobile
=
this
.
account
;
this
.
isShow
=
false
;
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
}
else
{
this
.
$message
({
type
:
'info'
,
...
...
@@ -303,6 +343,7 @@
});
this
.
email
=
this
.
account
;
this
.
isShow
=
false
;
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
}
else
{
this
.
$message
({
type
:
'info'
,
...
...
@@ -310,8 +351,47 @@
});
}
}
},
handleRevise
()
{
this
.
disabled
=
this
.
disabled
===
'auto'
?
'none'
:
'auto'
;
if
(
this
.
disabled
===
'none'
)
{
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
}
},
async
savePassword
()
{
this
.
handleCheckPassword
();
this
.
handleCheckVerifyCode
();
if
(
!
this
.
hasOwnProperty
(
'mobile'
))
{
this
.
$message
({
type
:
'warning'
,
message
:
'请先绑定手机号'
});
return
false
}
if
(
this
.
newPasswordMsg
!==
''
&&
this
.
verifyErrMsg
!==
''
)
return
false
;
let
resetResponse
;
resetResponse
=
await
this
.
$axios
.
$put
(
config
.
api
.
put
.
User
.
revisePassword
,
{
mobile
:
this
.
mobile
,
password
:
this
.
newPassword
,
verifyCode
:
this
.
verifyCode
});
console
.
log
(
resetResponse
);
if
(
resetResponse
.
code
===
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'修改密码成功!'
});
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
}
else
{
this
.
$message
({
type
:
'info'
,
message
:
resetResponse
.
msg
});
}
}
}
}
,
}
</
script
>
...
...
@@ -324,14 +404,6 @@
margin
:
32
*$
length
auto
0
;
@extend
%flex-row-spb;
&
input{
width
:
334
*$
length
;
height
:
48
*$
length
;
border-radius
:
4
*$
length
;
padding
:
14
*$
length
16
*$
length
;
@include
fontStyle(14,48,500,#999,left);
background-color
:
#F4F8FA
;
}
.bind-account-item{
width
:
334
*$
length
;
...
...
pages/personal-center/home/info.vue
View file @
3151bc7a
...
...
@@ -9,25 +9,25 @@
</div>
</div>
<div>
<p><span>
昵称:
</span>
{{
nickName
||
'
'
}}
</p>
<p><span>
昵称:
</span>
{{
nickName
?
nickName
:
'暂无
'
}}
</p>
</div>
<div>
<p><span>
性别:
</span>
{{
genderInfo
}}
</p>
</div>
<div>
<p><span>
生日:
</span>
{{
birthday
||
''
}}
</p>
<p><span>
生日:
</span>
暂无
</p>
</div>
<div>
<p><span>
签名:
</span>
{{
signature
||
'
'
}}
</p>
<p><span>
签名:
</span>
{{
signature
?
signature
:
'暂无
'
}}
</p>
</div>
<div>
<p><span>
微信:
</span>
{{
wxNumber
||
'
'
}}
</p>
<p><span>
微信:
</span>
{{
wxNumber
?
wxNumber
:
'暂无
'
}}
</p>
</div>
<div>
<p><span>
QQ号:
</span>
{{
qqNumber
||
'
'
}}
</p>
<p><span>
QQ号:
</span>
{{
qqNumber
?
qqNumber
:
'暂无
'
}}
</p>
</div>
<div>
<p><span>
手机号:
</span>
{{
mobile
||
'
'
}}
</p>
<p><span>
手机号:
</span>
{{
mobile
?
mobile
:
'暂无
'
}}
</p>
</div>
</div>
</card-container>
...
...
@@ -55,11 +55,11 @@
computed
:
{
genderInfo
:
function
()
{
if
(
this
.
gender
===
0
)
{
return
'
男
'
return
'
保密
'
}
else
if
(
this
.
gender
===
1
)
{
return
'
女
'
return
'
男
'
}
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