Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
8c10dcc5
Commit
8c10dcc5
authored
Jul 24, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能
parent
3cf89fda
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
Index.vue
src/views/userCenter/Index.vue
+1
-1
SetPhone.vue
src/views/userCenter/SetPhone.vue
+5
-3
CodeInput.vue
src/views/userCenter/components/CodeInput.vue
+6
-2
No files found.
src/views/userCenter/Index.vue
View file @
8c10dcc5
...
...
@@ -70,7 +70,7 @@ export default class Index extends Vue {
};
get
authIcon
()
{
const
{
auth_suc
}
=
this
.
userInfo
;
return
auth_suc
?
'yirenzheng'
:
'weirenzheng'
return
auth_suc
?
'yirenzheng'
:
'weirenzheng'
;
}
get
datas
()
{
const
{
auth_type
,
auth_suc
}
=
this
.
userInfo
;
...
...
src/views/userCenter/SetPhone.vue
View file @
8c10dcc5
...
...
@@ -19,12 +19,13 @@
<van-field
v-model=
"newPhone"
label=
""
placeholder=
"请输入新手机号"
class=
"margin-top30"
></van-field>
<van-button
block
type=
"info"
class=
"margin-top30"
@
click=
"step='4'"
>
确定
</van-button>
</section>
<!-- :validateCode="() =>
{}"
-->
<code-input
v-if=
"step === '4'"
:code
.
sync=
"code"
:codeTo=
"newPhone"
:sendCode=
"sendCode(newPhone)"
:validateCode=
"() =>
{}"
:next=
"setPhone"
></code-input>
<set-success
v-if=
"step === '5'"
...
...
@@ -49,7 +50,7 @@ import CodeInput from './components/CodeInput.vue';
})
export
default
class
SetPhone
extends
Vue
{
@
State
(
'userInfo'
)
private
userInfo
!
:
any
;
@
Action
(
'getUserInfo'
)
private
getUserInfo
!
:
()
=>
void
;
@
Action
(
'getUserInfo'
)
private
getUserInfo
!
:
()
=>
Promise
<
any
>
;
private
code
:
string
=
''
;
private
randomToken
:
string
=
''
;
private
newPhone
:
string
=
''
;
...
...
@@ -73,7 +74,7 @@ export default class SetPhone extends Vue {
}
else
{
await
this
.
sendEmail
(
account
);
}
}
}
;
}
private
async
validateOldAccount
()
{
const
{
userInfo
:
{
phone
,
email
},
code
,
newPhone
}
=
this
;
...
...
@@ -90,6 +91,7 @@ export default class SetPhone extends Vue {
private
async
setPhone
()
{
const
{
code
,
newPhone
,
randomToken
}
=
this
;
await
this
.
$api
.
user
.
setPhone
(
code
,
newPhone
,
randomToken
);
await
this
.
getUserInfo
();
this
.
step
=
'5'
;
}
}
...
...
src/views/userCenter/components/CodeInput.vue
View file @
8c10dcc5
...
...
@@ -37,10 +37,14 @@ export default class CodeInput extends Vue {
}
)
private
codeTo
!
:
string
;
@
Prop
()
private
code
!
:
string
;
@
Prop
({
default
:
()
=>
0
,
default
:
()
=>
{
return
()
=>
{
}
}
,
}
)
private
sendCode
!
:
()
=>
Promise
<
any
>
;
@
Prop
({
default
:
()
=>
0
,
default
:
()
=>
{
return
()
=>
{
}
}
,
}
)
private
validateCode
!
:
()
=>
Promise
<
any
>
;
@
Prop
({
default
:
()
=>
0
,
...
...
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