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
ccae1642
Commit
ccae1642
authored
Jul 24, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
8c10dcc5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
39 deletions
+52
-39
variables.scss
src/common/variables.scss
+18
-0
AddBanner.vue
src/views/proof/components/AddBanner.vue
+0
-8
SetPasswd.vue
src/views/userCenter/SetPasswd.vue
+3
-2
SetPhone.vue
src/views/userCenter/SetPhone.vue
+6
-8
CodeInput.vue
src/views/userCenter/components/CodeInput.vue
+25
-21
No files found.
src/common/variables.scss
View file @
ccae1642
...
@@ -2,4 +2,21 @@ $labelColor: #666C70;
...
@@ -2,4 +2,21 @@ $labelColor: #666C70;
$valueColor
:
#B6B5BA
;
$valueColor
:
#B6B5BA
;
$valueColor2
:
#353535
;
$valueColor2
:
#353535
;
$whiteColor
:
#FFFFFF
;
$tabHeight
:
50px
;
$tabHeight
:
50px
;
.btn-group
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
display
:
flex
;
flex-direction
:
row
;
height
:
50px
;
padding
:
0
17px
;
background
:
$whiteColor
;
.left
,
.right
{
flex
:
auto
;
}
}
\ No newline at end of file
src/views/proof/components/AddBanner.vue
View file @
ccae1642
...
@@ -111,14 +111,6 @@ export default class AddBanner extends Vue {
...
@@ -111,14 +111,6 @@ export default class AddBanner extends Vue {
padding
:
17px
;
padding
:
17px
;
}
}
.btn-group
{
.btn-group
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
display
:
flex
;
flex-direction
:
row
;
height
:
50px
;
padding
:
0
17px
;
.left
,
.right
{
.left
,
.right
{
flex
:
auto
;
flex
:
auto
;
}
}
...
...
src/views/userCenter/SetPasswd.vue
View file @
ccae1642
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<van-field
:value=
"userInfo.phone || userInfo.email"
label=
""
readonly
placeholder=
"请输入你的手机号"
class=
"margin-top30"
></van-field>
<van-field
:value=
"userInfo.phone || userInfo.email"
label=
""
readonly
placeholder=
"请输入你的手机号"
class=
"margin-top30"
></van-field>
<van-button
block
style=
"margin-top: 60px;"
type=
"info"
@
click=
"step = '2'"
>
获取验证码
</van-button>
<van-button
block
style=
"margin-top: 60px;"
type=
"info"
@
click=
"step = '2'"
>
获取验证码
</van-button>
</section>
</section>
<code-input
v-if=
"step == '2'"
:code
.
sync=
"code"
:codeTo=
"userInfo.phone || userInfo.email"
:sendCode=
"sendCode"
:validateCode=
"validateCode"
:
next=
"showPassWordInputHandler"
></code-input>
<code-input
v-if=
"step == '2'"
:code
.
sync=
"code"
:codeTo=
"userInfo.phone || userInfo.email"
@
send-code=
"sendCode"
@
next=
"showPassWordInputHandler"
></code-input>
<section
v-if=
"step == '3'"
>
<section
v-if=
"step == '3'"
>
<div
class=
"title"
>
输入密码
</div>
<div
class=
"title"
>
输入密码
</div>
<van-field
v-model=
"pwd"
label=
""
placeholder=
"请输入6~16位密码"
class=
"margin-top30"
></van-field>
<van-field
v-model=
"pwd"
label=
""
placeholder=
"请输入6~16位密码"
class=
"margin-top30"
></van-field>
...
@@ -70,7 +70,8 @@ export default class SetPasswd extends Vue {
...
@@ -70,7 +70,8 @@ export default class SetPasswd extends Vue {
email
,
email
,
});
});
}
}
private
showPassWordInputHandler
()
{
private
async
showPassWordInputHandler
()
{
await
this
.
validateCode
();
this
.
step
=
'3'
;
this
.
step
=
'3'
;
}
}
private
async
setPwd
()
{
private
async
setPwd
()
{
...
...
src/views/userCenter/SetPhone.vue
View file @
ccae1642
...
@@ -11,22 +11,19 @@
...
@@ -11,22 +11,19 @@
v-if=
"step === '2'"
v-if=
"step === '2'"
:code
.
sync=
"code"
:code
.
sync=
"code"
:codeTo=
"userInfo.phone || userInfo.email"
:codeTo=
"userInfo.phone || userInfo.email"
:sendCode=
"sendCode()"
@
send-code=
"sendCode()"
:validateCode=
"validateOldAccount"
@
next=
"showNewAccountInput"
></code-input>
:next=
"showNewAccountInput"
></code-input>
<section
v-if=
"step === '3'"
>
<section
v-if=
"step === '3'"
>
<div
class=
"title"
>
输入新手机号
</div>
<div
class=
"title"
>
输入新手机号
</div>
<van-field
v-model=
"newPhone"
label=
""
placeholder=
"请输入新手机号"
class=
"margin-top30"
></van-field>
<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>
<van-button
block
type=
"info"
class=
"margin-top30"
@
click=
"step='4'"
>
确定
</van-button>
</section>
</section>
<!-- :validateCode="() =>
{}"
-->
<code-input
<code-input
v-if=
"step === '4'"
v-if=
"step === '4'"
:code
.
sync=
"code"
:code
.
sync=
"code"
:codeTo=
"newPhone"
:codeTo=
"newPhone"
:sendC
ode=
"sendCode(newPhone)"
@
send-c
ode=
"sendCode(newPhone)"
:
next=
"setPhone"
></code-input>
@
next=
"setPhone"
></code-input>
<set-success
<set-success
v-if=
"step === '5'"
v-if=
"step === '5'"
:tip=
"'手机号设置成功'"
></set-success>
:tip=
"'手机号设置成功'"
></set-success>
...
@@ -84,7 +81,8 @@ export default class SetPhone extends Vue {
...
@@ -84,7 +81,8 @@ export default class SetPhone extends Vue {
});
});
this
.
randomToken
=
random_token
;
this
.
randomToken
=
random_token
;
}
}
private
showNewAccountInput
()
{
private
async
showNewAccountInput
()
{
await
this
.
validateOldAccount
();
this
.
step
=
'3'
;
this
.
step
=
'3'
;
this
.
code
=
''
;
this
.
code
=
''
;
}
}
...
...
src/views/userCenter/components/CodeInput.vue
View file @
ccae1642
...
@@ -36,19 +36,21 @@ export default class CodeInput extends Vue {
...
@@ -36,19 +36,21 @@ export default class CodeInput extends Vue {
required
:
true
,
required
:
true
,
}
)
private
codeTo
!
:
string
;
}
)
private
codeTo
!
:
string
;
@
Prop
()
private
code
!
:
string
;
@
Prop
()
private
code
!
:
string
;
@
Prop
({
// @Prop(
{
default
:
()
=>
{
// default: () =>
{
return
()
=>
{
}
// return () =>
{
}
;
}
,
//
}
,
}
)
private
sendCode
!
:
()
=>
Promise
<
any
>
;
//
}
)
private
sendCode
!
:
()
=>
Promise
<
any
>
;
@
Prop
({
// @Prop(
{
default
:
()
=>
{
// default: () =>
{
return
()
=>
{
}
// return () =>
{
}
;
}
,
//
}
,
}
)
private
validateCode
!
:
()
=>
Promise
<
any
>
;
//
}
)
private
validateCode
!
:
()
=>
Promise
<
any
>
;
@
Prop
({
// @Prop(
{
default
:
()
=>
0
,
// default: () =>
{
}
)
private
next
!
:
()
=>
Promise
<
any
>
;
// return () =>
{
}
;
//
}
,
//
}
)
private
next
!
:
()
=>
Promise
<
any
>
;
private
count
:
number
=
0
;
private
count
:
number
=
0
;
private
showKeyboard
:
boolean
=
true
;
private
showKeyboard
:
boolean
=
true
;
...
@@ -58,7 +60,8 @@ export default class CodeInput extends Vue {
...
@@ -58,7 +60,8 @@ export default class CodeInput extends Vue {
private
timerDown
()
{
private
timerDown
()
{
if
(
this
.
count
>
0
)
{
return
;
}
if
(
this
.
count
>
0
)
{
return
;
}
this
.
count
=
60
;
this
.
count
=
60
;
this
.
sendCode
();
// this.sendCode();
this
.
$emit
(
'send-code'
);
const
timer
=
setInterval
(()
=>
{
const
timer
=
setInterval
(()
=>
{
if
(
this
.
count
<=
0
)
{
if
(
this
.
count
<=
0
)
{
clearInterval
(
timer
);
clearInterval
(
timer
);
...
@@ -75,13 +78,14 @@ export default class CodeInput extends Vue {
...
@@ -75,13 +78,14 @@ export default class CodeInput extends Vue {
const
code
=
(
this
.
code
+
key
).
slice
(
0
,
6
);
const
code
=
(
this
.
code
+
key
).
slice
(
0
,
6
);
this
.
$emit
(
'update:code'
,
code
);
this
.
$emit
(
'update:code'
,
code
);
if
(
code
.
length
<
6
)
{
return
;
}
if
(
code
.
length
<
6
)
{
return
;
}
try
{
// try
{
await
this
.
validateCode
();
// await this.validateCode();
this
.
showKeyboard
=
false
;
// this.showKeyboard = false;
await
this
.
next
();
// await this.next();
}
catch
(
err
)
{
//
}
catch
(
err
)
{
console
.
error
(
err
);
// console.error(err);
}
//
}
this
.
$emit
(
'next'
);
}
}
private
onDelete
()
{
private
onDelete
()
{
const
{
code
,
code
:
{
length
}}
=
this
;
const
{
code
,
code
:
{
length
}}
=
this
;
...
...
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