Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FuLiMini
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjian
FuLiMini
Commits
b15bd44f
Commit
b15bd44f
authored
Apr 19, 2022
by
shibukun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置
parent
af5481aa
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
360 additions
and
2 deletions
+360
-2
pages.json
pages.json
+21
-0
home.vue
pages/home/home.vue
+1
-0
mine.vue
pages/mine/mine.vue
+4
-1
SetPwd.vue
pagesA/SetPwd/SetPwd.vue
+93
-0
VertifyPhone.vue
pagesA/VertifyPhone/VertifyPhone.vue
+141
-0
setting.vue
pagesA/setting/setting.vue
+96
-0
router.js
router/router.js
+4
-1
No files found.
pages.json
View file @
b15bd44f
...
@@ -62,6 +62,27 @@
...
@@ -62,6 +62,27 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
},
{
"path"
:
"setting/setting"
,
"style"
:
{
"navigationBarTitleText"
:
"设置"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"VertifyPhone/VertifyPhone"
,
"style"
:
{
"navigationBarTitleText"
:
"验证手机号"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"SetPwd/SetPwd"
,
"style"
:
{
"navigationBarTitleText"
:
"设置支付密码"
,
"enablePullDownRefresh"
:
false
}
}
}
]
]
}],
}],
...
...
pages/home/home.vue
View file @
b15bd44f
...
@@ -59,6 +59,7 @@ export default {
...
@@ -59,6 +59,7 @@ export default {
this
.
name
=
res
.
data
.
staffName
;
this
.
name
=
res
.
data
.
staffName
;
this
.
integralCount
=
res
.
data
.
allIntegral
;
this
.
integralCount
=
res
.
data
.
allIntegral
;
this
.
isLogin
=
true
this
.
isLogin
=
true
this
.
$store
.
commit
(
'refreshUserInfo'
,
res
.
data
)
}
else
{
}
else
{
this
.
isLogin
=
false
this
.
isLogin
=
false
}
}
...
...
pages/mine/mine.vue
View file @
b15bd44f
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</view>
</view>
<image
class=
"right-arrow"
src=
"../../static/arrow-right.png"
mode=
""
></image>
<image
class=
"right-arrow"
src=
"../../static/arrow-right.png"
mode=
""
></image>
</view>
</view>
<view
class=
"item last-item"
>
<view
class=
"item last-item"
@
click=
"setting"
>
<view
class=
"left"
>
<view
class=
"left"
>
<image
class=
"left-img"
src=
"../../static/setting.png"
mode=
""
></image>
<image
class=
"left-img"
src=
"../../static/setting.png"
mode=
""
></image>
<view
class=
"title"
>
设置
</view>
<view
class=
"title"
>
设置
</view>
...
@@ -102,6 +102,9 @@
...
@@ -102,6 +102,9 @@
}
}
});
});
},
},
setting
()
{
this
.
$router
.
push
(
'Setting'
)
}
}
}
}
}
</
script
>
</
script
>
...
...
pagesA/SetPwd/SetPwd.vue
0 → 100644
View file @
b15bd44f
<
template
>
<view
class=
"layout"
>
<view
class=
"title"
>
支付密码
</view>
<input
class=
"input"
placeholder=
"请输入6位数字支付密码"
type=
"number"
v-model=
"pwd"
maxlength=
"6"
/>
<view
class=
"title"
>
再次输入
</view>
<input
class=
"input"
placeholder=
"再次输入上方相同的支付密码"
type=
"number"
v-model=
"pwdSecond"
maxlength=
"6"
/>
<view
:class=
"pwd.length == 6 && pwdSecond.length == 6 ? 'submit1' : 'submit'"
@
click=
"submit"
>
提交
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pwd
:
''
,
pwdSecond
:
''
,
randomCode
:
''
}
},
onLoad
(
option
)
{
this
.
randomCode
=
option
.
randomCode
?
option
.
randomCode
:
''
},
methods
:
{
submit
()
{
if
(
this
.
pwd
!==
this
.
pwdSecond
)
{
this
.
toast
(
'请输入相同密码'
)
return
}
this
.
$net
.
post
(
'/staff/password/setting'
,
{
from
:
'my'
,
pwd
:
this
.
pwd
,
randomCode
:
this
.
randomCode
})
.
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$router
.
pop
()
}
else
{
this
.
toast
(
res
.
message
)
}
})
.
catch
(
err
=>
{
this
.
toast
(
err
)
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.layout
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
background
:
#ffffff
;
.title
{
font-size
:
32rpx
;
font-weight
:
bolder
;
color
:
#333333
;
line-height
:
48rpx
;
margin-top
:
80rpx
;
padding-left
:
49rpx
;
padding-right
:
49rpx
;
}
.input
{
outline
:
none
;
border-bottom
:
solid
2rpx
#FF0520
;
font-size
:
32rpx
;
margin-top
:
49rpx
;
margin-left
:
49rpx
;
margin-right
:
49rpx
;
padding-bottom
:
29rpx
;
}
.submit
{
width
:
590rpx
;
height
:
96rpx
;
background
:
#FF0520
;
opacity
:
0
.5
;
border-radius
:
48rpx
;
font-size
:
32rpx
;
color
:
#FFFFFF
;
line-height
:
96rpx
;
text-align
:
center
;
margin
:
120rpx
auto
;
}
.submit1
{
width
:
590rpx
;
height
:
96rpx
;
background
:
#FF0520
;
border-radius
:
48rpx
;
font-size
:
32rpx
;
color
:
#FFFFFF
;
line-height
:
96rpx
;
text-align
:
center
;
margin
:
120rpx
auto
;
}
}
</
style
>
pagesA/VertifyPhone/VertifyPhone.vue
0 → 100644
View file @
b15bd44f
<
template
>
<view
class=
"layout"
>
<view
class=
"first-line"
>
请完成以下认证
</view>
<view
class=
"sencond-line"
>
请输入
{{
phone
}}
收到的短信验证码
</view>
<view
class=
"code-layout"
>
<input
class=
"input"
placeholder=
"请输入短信验证码"
v-model=
"code"
type=
"number"
maxlength=
"8"
/>
<text
class=
"vertify-code"
@
click=
"getCode()"
>
{{
verifyCode
}}
</text>
</view>
<view
:class=
"code.length > 0 ? 'submit1' : 'submit'"
@
click=
"submit"
>
下一步
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
phone
:
this
.
$store
.
state
.
userInfo
.
mobile
.
substring
(
0
,
3
)
+
'****'
+
this
.
$store
.
state
.
userInfo
.
mobile
.
substring
(
7
,
11
),
verifyCode
:
'获取验证码'
,
verifyTime
:
300
,
code
:
''
};
},
onLoad
()
{
console
.
log
(
this
.
$store
.
state
.
userInfo
.
mobile
);
},
methods
:
{
getCode
()
{
if
(
this
.
verifyTime
!==
300
)
{
return
;
}
this
.
$net
.
post
(
'/meta/sms'
,
{
codeType
:
20
,
mobile
:
this
.
$store
.
state
.
userInfo
.
mobile
})
.
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
toast
(
'验证码发送成功'
);
this
.
startTime
();
}
else
{
this
.
toast
(
res
.
messaage
);
}
})
.
catch
(
err
=>
{
this
.
toast
(
err
);
console
.
log
(
err
);
});
},
// 开始倒计时
startTime
()
{
if
(
this
.
verifyTime
!==
300
)
{
return
;
}
this
.
verifyCode
=
this
.
verifyTime
+
's'
;
const
timer
=
setInterval
(()
=>
{
this
.
verifyTime
--
;
if
(
this
.
verifyTime
>
0
)
{
this
.
verifyCode
=
this
.
verifyTime
+
's'
;
}
else
{
this
.
verifyCode
=
'重新发送'
;
this
.
verifyTime
=
300
;
clearInterval
(
timer
);
}
},
1000
);
},
submit
()
{
this
.
$net
.
post
(
'/staff/password/change'
,
{
code
:
this
.
code
})
.
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
200
)
{
this
.
$router
.
replaceTo
(
'SetPwd'
,
{
randomCode
:
res
.
data
.
randomCode
})
}
})
.
catch
(
err
=>
{
})
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.layout
{
width
:
100%
;
height
:
100%
;
background
:
#ffffff
;
.first-line
{
font-size
:
36rpx
;
font-weight
:
bolder
;
color
:
#333333
;
line-height
:
48rpx
;
margin
:
80rpx
49rpx
0
49rpx
;
}
.sencond-line
{
font-size
:
26rpx
;
color
:
#333333
;
line-height
:
48rpx
;
margin
:
29rpx
49rpx
0
49rpx
;
}
.code-layout
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
margin
:
29rpx
49rpx
0
49rpx
;
border-bottom
:
solid
2rpx
#ff0520
;
padding-bottom
:
30rpx
;
.input
{
outline
:
none
;
font-size
:
32rpx
;
font-weight
:
bolder
;
flex
:
1
;
}
.vertify-code
{
font-size
:
32rpx
;
color
:
#ff0520
;
line-height
:
48rpx
;
}
}
.submit
{
width
:
590rpx
;
height
:
96rpx
;
background
:
#ff0520
;
opacity
:
0
.5
;
border-radius
:
48rpx
;
font-size
:
32rpx
;
color
:
#ffffff
;
line-height
:
96rpx
;
text-align
:
center
;
margin
:
120rpx
auto
;
}
.submit1
{
width
:
590rpx
;
height
:
96rpx
;
background
:
#ff0520
;
border-radius
:
48rpx
;
font-size
:
32rpx
;
color
:
#ffffff
;
line-height
:
96rpx
;
text-align
:
center
;
margin
:
120rpx
auto
;
}
}
</
style
>
pagesA/setting/setting.vue
0 → 100644
View file @
b15bd44f
<
template
>
<view
class=
"layout"
>
<view
class=
"item"
@
click=
"changePwd"
>
<text
class=
"item-title"
>
设置支付密码
</text>
<view>
<text
v-if=
"hasPwd"
class=
"already-set"
>
已设置
</text>
<image
class=
"item-right-row"
src=
"../../static/arrow-right.png"
></image>
</view>
</view>
<view
class=
"item"
>
<text
class=
"item-title"
@
click=
"changeAccount"
>
切换账号
</text>
<image
class=
"item-right-row"
src=
"../../static/arrow-right.png"
></image>
</view>
<view
class=
"item1"
>
<text
class=
"item-quit"
@
click=
"quit"
>
退出账号
</text>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
hasPwd
:
this
.
$store
.
state
.
userInfo
.
settingCheckCode
===
1
}
},
methods
:
{
changePwd
()
{
if
(
this
.
hasPwd
)
{
this
.
$router
.
push
(
'VertifyPhone'
)
return
}
this
.
$router
.
push
(
'SetPwd'
)
},
changeAccount
()
{
},
quit
()
{
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.layout
{
width
:
100%
;
height
:
100%
;
background
:
#f5f5f5
;
padding-top
:
20rpx
;
position
:
absolute
;
.item
{
background
:
#ffffff
;
height
:
107rpx
;
margin-top
:
2rpx
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
0
30rpx
;
.item-title
{
font-size
:
30rpx
;
color
:
#333333
;
line-height
:
85rpx
;
}
.already-set
{
font-size
:
30rpx
;
color
:
#333333
;
line-height
:
85px
;
margin-right
:
30rpx
;
}
.item-right-row
{
width
:
12rpx
;
height
:
20rpx
;
}
}
.item1
{
background
:
#ffffff
;
height
:
107rpx
;
margin-top
:
99rpx
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
width
:
100%
;
.item-quit
{
font-size
:
30rpx
;
color
:
#333333
;
line-height
:
107rpx
;
text-align
:
center
;
width
:
100%
;
}
}
}
</
style
>
router/router.js
View file @
b15bd44f
...
@@ -7,7 +7,10 @@ const routers = {
...
@@ -7,7 +7,10 @@ const routers = {
'Mine'
:
'/pages/mine/mine'
,
'Mine'
:
'/pages/mine/mine'
,
'SelectAccount'
:
'/pagesA/selectAccount/selectAccount'
,
'SelectAccount'
:
'/pagesA/selectAccount/selectAccount'
,
'GoodSkuList'
:
'/pagesA/GoodSkuList/GoodSkuList'
,
'GoodSkuList'
:
'/pagesA/GoodSkuList/GoodSkuList'
,
'IntegralDetail'
:
'/pagesA/integralDetail/integralDetail'
'IntegralDetail'
:
'/pagesA/integralDetail/integralDetail'
,
'Setting'
:
'/pagesA/setting/setting'
,
'VertifyPhone'
:
'/pagesA/VertifyPhone/VertifyPhone'
,
'SetPwd'
:
'/pagesA/SetPwd/SetPwd'
}
}
export
function
push
(
routerName
,
params
,
events
)
{
export
function
push
(
routerName
,
params
,
events
)
{
...
...
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