Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shop_mobile_uni
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑秀明
shop_mobile_uni
Commits
0a251a21
Commit
0a251a21
authored
Jun 02, 2020
by
王建威
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
42ae619c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
274 additions
and
18 deletions
+274
-18
setaccount.vue
pages/setaccount/setaccount.vue
+1
-5
changeLoginPass.vue
pages/setinfo/components/changeLoginPass.vue
+125
-5
changePayPass.vue
pages/setinfo/components/changePayPass.vue
+125
-4
changephone.vue
pages/setinfo/components/changephone.vue
+1
-1
setinfo.vue
pages/setinfo/setinfo.vue
+2
-2
yuepay.vue
pages/yuepay/yuepay.vue
+20
-1
No files found.
pages/setaccount/setaccount.vue
View file @
0a251a21
...
...
@@ -66,11 +66,7 @@
this
.
$jump
(
`${php
}
app=my_address`
);
}
,
changePass
(
type
)
{
if
(
type
===
'phone'
)
{
this
.
$jump
(
`/pages/setinfo/setinfo?type=${type
}
&phone=${this.data.phone_mob
}
`
,
2
);
return
}
this
.
$jump
(
`/pages/setinfo/setinfo?type=${type
}
`
,
2
)
this
.
$jump
(
`/pages/setinfo/setinfo?type=${type
}
&phone=${this.data.phone_mob
}
`
,
2
)
}
,
uploadImage
()
{
uni
.
chooseImage
({
...
...
pages/setinfo/components/changeLoginPass.vue
View file @
0a251a21
<
template
>
<view
class=
"main"
>
<TopBar
title=
"修改登录密码"
/>
<view>
<view
class=
"set_title"
>
请输入旧登录密码
</view>
<input
password
class=
"set_input"
v-model=
"old_password"
placeholder=
"输入旧密码"
>
<view
v-if=
"!next"
>
<view
class=
"set_title"
>
请完成以下认证
</view>
<view
class=
"set_subtitle"
>
请输入
{{
phone
.
replace
(
/
(\d
{3
}
)\d
*
(\d
{4
}
)
/
,
"$1****$2"
)
}}
收到的短信验证码
<
/view
>
<
view
class
=
"flex confirm_box"
>
<
input
type
=
"text"
class
=
"code_input"
v
-
model
=
"code"
placeholder
=
"请输入手机验证码"
>
<
text
class
=
"get_code"
v
-
if
=
"codeFlag"
@
click
=
"getCode()"
>
获取验证码
<
/text
>
<
text
v
-
else
class
=
"get_code grey_bg"
>
{{
countdown
}}
<
/text
>
<
/view
>
<
view
class
=
"nextstep"
@
click
=
"nextStep()"
>
下一步
<
/view
>
<
/view
>
<
view
v
-
else
>
<
view
class
=
"set_title"
style
=
"margin-top: 40rpx;"
>
设置新登录密码
<
/view
>
<
view
class
=
"set_tip"
>
密码至少包含字母
/
数字,长度不小于
6
位
<
/view
>
<
input
password
class
=
"set_input"
v
-
model
=
"new_password"
placeholder
=
"设置6位登录密码"
>
...
...
@@ -28,10 +36,72 @@
old_password
:
''
,
new_password
:
''
,
new_password_repeat
:
''
,
changeSuccess
:
false
changeSuccess
:
false
,
next
:
false
,
codeFlag
:
true
,
countdown
:
'(60)重新获取'
,
code
:
''
}
}
,
props
:
{
phone
:
{
type
:
String
}
}
,
methods
:
{
getCode
()
{
if
(
this
.
codeFlag
)
{
uni
.
request
({
url
:
`/uni/api/mobile_msg/change/${this.phone
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
uni
.
showToast
({
title
:
'短信已发送'
,
icon
:
'none'
}
)
}
}
}
);
let
seconds
=
60
;
this
.
codeFlag
=
false
;
let
timer
=
setInterval
(()
=>
{
seconds
-=
1
;
this
.
countdown
=
`(${seconds
}
)重新获取`
;
if
(
seconds
===
0
)
{
clearInterval
(
timer
);
this
.
codeFlag
=
true
;
this
.
countdown
=
'(60)重新获取'
;
}
}
,
1000
);
}
}
,
nextStep
()
{
if
(
!
/^
\d
{6
}
$/
.
test
(
this
.
code
))
{
uni
.
showToast
({
title
:
'请输入6位数字验证码'
,
icon
:
'none'
}
)
return
}
uni
.
request
({
url
:
`/uni/api/member/check_code/${this.code
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
next
=
true
;
this
.
countdown
=
'(60)重新获取'
;
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
}
);
}
}
}
)
}
,
checkPass
()
{
const
reg
=
/^
[
0-9a-zA-Z_
]
{6,
}
$/
;
if
(
this
.
new_password
!==
this
.
new_password_repeat
)
{
...
...
@@ -53,7 +123,6 @@
url
:
'/uni/api/member/change_password'
,
method
:
'POST'
,
data
:
{
old_password
:
md5
(
this
.
old_password
),
newpassword
:
md5
(
this
.
new_password
),
confirm_password
:
md5
(
this
.
new_password_repeat
)
}
,
...
...
@@ -86,12 +155,22 @@
<
style
lang
=
"less"
scoped
>
.
main
{
padding
:
80
rpx
40
rpx
0
;
.
flex
{
display
:
flex
;
}
.
set_title
{
font
-
size
:
32
rpx
;
color
:
#
212121
;
line
-
height
:
44
rpx
;
margin
-
top
:
24
rpx
;
}
.
set_subtitle
{
font
-
size
:
28
rpx
;
color
:
#
212121
;
line
-
height
:
40
rpx
;
margin
-
top
:
16
rpx
;
font
-
size
:
30
rpx
;
}
.
set_tip
{
color
:
#
7
C7C7C
;
font
-
size
:
26
rpx
;
...
...
@@ -146,4 +225,45 @@
}
}
}
.
nextstep
{
background
-
color
:
#
FFCD00
;
border
-
radius
:
16
rpx
;
text
-
align
:
center
;
width
:
670
rpx
;
height
:
88
rpx
;
line
-
height
:
88
rpx
;
margin
:
208
rpx
auto
0
;
font
-
size
:
30
rpx
;
}
.
confirm_box
{
justify
-
content
:
space
-
between
;
margin
-
top
:
24
rpx
;
.
code_input
{
width
:
400
rpx
;
height
:
88
rpx
;
line
-
height
:
88
rpx
;
background
-
color
:
#
f5f5f5
;
color
:
#
212121
;
font
-
size
:
30
rpx
;
padding
-
left
:
20
rpx
;
box
-
sizing
:
border
-
box
;
border
-
radius
:
8
rpx
;
}
.
code_input
::
placeholder
{
color
:
#
aeaeae
;
}
.
get_code
{
width
:
250
rpx
;
height
:
88
rpx
;
line
-
height
:
88
rpx
;
text
-
align
:
center
;
font
-
size
:
30
rpx
;
background
-
color
:
#
FFCD00
;
border
-
radius
:
16
rpx
;
}
.
grey_bg
{
background
-
color
:
#
ECECEC
;
color
:
#
7
c7c7c
;
}
}
<
/style>
\ No newline at end of file
pages/setinfo/components/changePayPass.vue
View file @
0a251a21
<
template
>
<view
class=
"main"
>
<TopBar
title=
"修改支付密码"
/>
<view>
<view
v-if=
"!next"
>
<view
class=
"set_title"
>
请完成以下认证
</view>
<view
class=
"set_subtitle"
>
请输入
{{
phone
.
replace
(
/
(\d
{3
}
)\d
*
(\d
{4
}
)
/
,
"$1****$2"
)
}}
收到的短信验证码
<
/view
>
<
view
class
=
"flex confirm_box"
>
<
input
type
=
"text"
class
=
"code_input"
v
-
model
=
"code"
placeholder
=
"请输入手机验证码"
>
<
text
class
=
"get_code"
v
-
if
=
"codeFlag"
@
click
=
"getCode()"
>
获取验证码
<
/text
>
<
text
v
-
else
class
=
"get_code grey_bg"
>
{{
countdown
}}
<
/text
>
<
/view
>
<
view
class
=
"nextstep"
@
click
=
"nextStep()"
>
下一步
<
/view
>
<
/view
>
<
view
v
-
else
>
<
view
class
=
"set_title"
style
=
"margin-top: 40rpx;"
>
请完成以下认证
<
/view
>
<view
class=
"set_tip"
>
验证后更换支付密码
</view>
<input
password
class=
"set_input"
v-model=
"old_password"
placeholder=
"请输入旧支付密码"
>
<
view
class
=
"set_title"
style
=
"margin-top: 40rpx;"
>
设置新的支付密码
<
/view
>
<
input
password
class
=
"set_input"
v
-
model
=
"new_password"
placeholder
=
"设置6位支付密码"
>
<
input
password
class
=
"set_input"
v
-
model
=
"new_password_repeat"
placeholder
=
"再一次输入支付密码"
>
...
...
@@ -27,10 +35,72 @@
old_password
:
''
,
new_password
:
''
,
new_password_repeat
:
''
,
changeSuccess
:
false
changeSuccess
:
false
,
next
:
false
,
codeFlag
:
true
,
countdown
:
'(60)重新获取'
,
code
:
''
,
}
}
,
props
:
{
phone
:
{
type
:
String
}
}
,
methods
:
{
getCode
()
{
if
(
this
.
codeFlag
)
{
uni
.
request
({
url
:
`/uni/api/mobile_msg/change/${this.phone
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
uni
.
showToast
({
title
:
'短信已发送'
,
icon
:
'none'
}
)
}
}
}
);
let
seconds
=
60
;
this
.
codeFlag
=
false
;
let
timer
=
setInterval
(()
=>
{
seconds
-=
1
;
this
.
countdown
=
`(${seconds
}
)重新获取`
;
if
(
seconds
===
0
)
{
clearInterval
(
timer
);
this
.
codeFlag
=
true
;
this
.
countdown
=
'(60)重新获取'
;
}
}
,
1000
);
}
}
,
nextStep
()
{
if
(
!
/^
\d
{6
}
$/
.
test
(
this
.
code
))
{
uni
.
showToast
({
title
:
'请输入6位数字验证码'
,
icon
:
'none'
}
)
return
}
uni
.
request
({
url
:
`/uni/api/member/check_code/${this.code
}
`
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
this
.
next
=
true
;
this
.
countdown
=
'(60)重新获取'
;
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
}
);
}
}
}
)
}
,
checkPass
()
{
if
(
this
.
new_password
!==
this
.
new_password_repeat
)
{
uni
.
showToast
({
...
...
@@ -81,12 +151,22 @@
<
style
lang
=
"less"
scoped
>
.
main
{
padding
:
80
rpx
40
rpx
0
;
.
flex
{
display
:
flex
;
}
.
set_title
{
font
-
size
:
32
rpx
;
color
:
#
212121
;
line
-
height
:
44
rpx
;
margin
-
top
:
24
rpx
;
}
.
set_subtitle
{
font
-
size
:
28
rpx
;
color
:
#
212121
;
line
-
height
:
40
rpx
;
margin
-
top
:
16
rpx
;
font
-
size
:
30
rpx
;
}
.
set_tip
{
color
:
#
7
C7C7C
;
font
-
size
:
26
rpx
;
...
...
@@ -141,4 +221,45 @@
}
}
}
.
nextstep
{
background
-
color
:
#
FFCD00
;
border
-
radius
:
16
rpx
;
text
-
align
:
center
;
width
:
670
rpx
;
height
:
88
rpx
;
line
-
height
:
88
rpx
;
margin
:
208
rpx
auto
0
;
font
-
size
:
30
rpx
;
}
.
confirm_box
{
justify
-
content
:
space
-
between
;
margin
-
top
:
24
rpx
;
.
code_input
{
width
:
400
rpx
;
height
:
88
rpx
;
line
-
height
:
88
rpx
;
background
-
color
:
#
f5f5f5
;
color
:
#
212121
;
font
-
size
:
30
rpx
;
padding
-
left
:
20
rpx
;
box
-
sizing
:
border
-
box
;
border
-
radius
:
8
rpx
;
}
.
code_input
::
placeholder
{
color
:
#
aeaeae
;
}
.
get_code
{
width
:
250
rpx
;
height
:
88
rpx
;
line
-
height
:
88
rpx
;
text
-
align
:
center
;
font
-
size
:
30
rpx
;
background
-
color
:
#
FFCD00
;
border
-
radius
:
16
rpx
;
}
.
grey_bg
{
background
-
color
:
#
ECECEC
;
color
:
#
7
c7c7c
;
}
}
<
/style
>
pages/setinfo/components/changephone.vue
View file @
0a251a21
...
...
@@ -109,7 +109,7 @@
this
.
newCountDown
=
`(${seconds
}
)重新获取`
;
if
(
seconds
===
0
)
{
clearInterval
(
timer
);
this
.
c
odeFlag
=
true
;
this
.
newPhoneC
odeFlag
=
true
;
this
.
newCountDown
=
'(60)重新获取'
;
}
}
,
1000
);
...
...
pages/setinfo/setinfo.vue
View file @
0a251a21
<
template
>
<view>
<ChangePhone
v-if=
"type === 'phone'"
:phone=
"phone"
/>
<ChangeLoginPass
v-if=
"type === 'login'"
/>
<ChangePayPass
v-if=
"type === 'pay'"
/>
<ChangeLoginPass
v-if=
"type === 'login'"
:phone=
"phone"
/>
<ChangePayPass
v-if=
"type === 'pay'"
:phone=
"phone"
/>
</view>
</
template
>
...
...
pages/yuepay/yuepay.vue
View file @
0a251a21
...
...
@@ -24,6 +24,7 @@
</view>
</view>
<button
type=
"primary"
class=
"submit-btn"
:loading=
"loading"
@
click=
"handleSumit"
>
立即支付
</button>
<view
class=
"forget_btn"
@
click=
"forget()"
>
忘记密码?
</view>
</view>
</
template
>
...
...
@@ -40,7 +41,8 @@
order_price
:
''
,
order_id
:
''
,
password
:
''
,
loading
:
false
loading
:
false
,
phone_mob
:
''
}
},
onLoad
(
option
){
...
...
@@ -48,6 +50,14 @@
this
.
money
=
money
||
'0.00'
;
this
.
order_price
=
amount
||
'0.00'
;
this
.
order_id
=
order_id
||
''
;
uni
.
request
({
url
:
'/uni/api/member/profile'
,
method
:
'GET'
,
dataType
:
'json'
,
success
:
(
res
)
=>
{
this
.
phone_mob
=
res
.
data
.
data
.
phone_mob
;
}
})
},
methods
:
{
handleSumit
(){
...
...
@@ -81,6 +91,9 @@
},
goBack
(){
this
.
$backup
();
},
forget
()
{
this
.
$jump
(
`/pages/setinfo/setinfo?type=pay&phone=
${
this
.
phone_mob
}
`
,
2
)
}
}
}
...
...
@@ -177,4 +190,10 @@
position
:
absolute
;
right
:
0
;
}
.forget_btn
{
text-align
:
center
;
color
:
#5875E3
;
font-size
:
24rpx
;
margin-top
:
30rpx
;
}
</
style
>
郑秀明
@zhengxiuming
mentioned in commit
5e9ed294
·
Jun 02, 2020
mentioned in commit
5e9ed294
mentioned in commit 5e9ed294ff85a9c516569e3c40bbe0d75547a5a2
Toggle commit list
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