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
e7b35166
Commit
e7b35166
authored
Apr 27, 2022
by
wangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
33b716c4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
18 deletions
+89
-18
smsCodeAlert.vue
components/smsCodeAlert/smsCodeAlert.vue
+48
-1
validCode.vue
components/validCode/validCode.vue
+11
-11
order.vue
pages/order/order.vue
+23
-3
login.vue
pagesA/login/login.vue
+1
-1
submitOrder.vue
pagesA/submitOrder/submitOrder.vue
+6
-2
No files found.
components/smsCodeAlert/smsCodeAlert.vue
View file @
e7b35166
...
...
@@ -8,6 +8,9 @@
<validCode
ref=
"code"
:maxlength=
"4"
@
finish=
"getPwd"
@
inputChange=
"inputChange"
></validCode>
</view>
<view
@
click=
"submit()"
class=
"buy-bottom"
:style=
"
{'background-color':btnActive?'#FF0520':''}">确认
</view>
<view
@
click=
"sendCode()"
class=
"re-send"
:style=
"
{'color':isSendCode?'#999999':'#FF0520'}">
{{
btnText
}}
</view>
</view>
</view>
</
template
>
...
...
@@ -20,7 +23,10 @@
data
()
{
return
{
phone
:
this
.
$store
.
state
.
userInfo
.
mobile
,
code
:
''
code
:
''
,
btnText
:
'重新发送'
,
isSendCode
:
false
,
time
:
60
};
},
props
:
{
...
...
@@ -55,7 +61,43 @@
this
.
code
=
''
this
.
$refs
.
code
.
clear
()
this
.
$parent
[
this
.
closeName
]
=
false
},
sendCode
()
{
if
(
this
.
time
!=
60
)
{
return
}
let
params
=
{
'codeType'
:
'120'
,
'mobile'
:
this
.
phone
,
'resetToken'
:
'not'
}
this
.
$net
.
post
(
'/staff/sms'
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
uni
.
showToast
({
title
:
'验证码发送成功'
})
this
.
startTime
()
}
else
{
uni
.
showToast
({
title
:
res
.
message
})
}
})
},
startTime
()
{
if
(
this
.
time
!=
60
)
{
return
}
this
.
isSendCode
=
true
this
.
btnText
=
'重新发送('
+
this
.
time
+
's)'
var
timer
=
setInterval
(()
=>
{
this
.
time
--
if
(
this
.
time
>
0
)
{
this
.
btnText
=
'重新发送('
+
this
.
time
+
's)'
}
else
{
this
.
btnText
=
'重新发送'
this
.
time
=
60
this
.
isSendCode
=
false
clearInterval
(
timer
)
}
},
1000
)
},
},
watch
:
{
firstOpen
(
newVal
,
oldVal
)
{
...
...
@@ -122,6 +164,11 @@
z-index
:
99999
;
margin-bottom
:
32rpx
;
}
.re-send
{
text-align
:
center
;
font-size
:
28rpx
;
color
:
#999999
;
}
}
}
</
style
>
components/validCode/validCode.vue
View file @
e7b35166
...
...
@@ -10,14 +10,6 @@ isPwd:是否是密码模式
<
template
>
<view
class=
"code-area"
>
<view
class=
"flex-box"
>
<input
:value=
"val"
type=
"number"
focus=
"true"
:maxlength=
"maxlength"
class=
"hide-input"
@
input=
"getVal"
/>
<view
v-bind:class=
"['item',
{ active: codeIndex == 1, 'code-item': !isPwd}]">
<view
class=
"line"
></view>
<block
v-if=
"isPwd && codeArr.length >= 1"
>
...
...
@@ -62,8 +54,15 @@ isPwd:是否是密码模式
<block
v-else
>
{{
codeArr
[
5
]
?
codeArr
[
5
]
:
''
}}
</block>
</view>
</block>
<input
:value=
"val"
type=
"number"
focus
auto-focus=
"true"
:maxlength=
"maxlength"
class=
"hide-input"
@
input=
"getVal"
/>
</view>
</view>
</
template
>
...
...
@@ -172,8 +171,9 @@ export default {
width
:
200%
;
height
:
100%
;
text-align
:
left
;
z-index
:
9
;
z-index
:
9
9999999
;
opacity
:
1
;
color
:
#333333
;
}
@keyframes
twinkling
{
...
...
pages/order/order.vue
View file @
e7b35166
...
...
@@ -50,26 +50,34 @@
statusText
:{
100
:
'待兑换'
,
200
:
'兑换成功'
,
300
:
'兑换失败'
},
page
:
1
page
:
1
,
isLogin
:
true
};
},
onLoad
()
{
},
onPullDownRefresh
()
{
console
.
log
(
'下拉刷新'
);
},
onReachBottom
()
{
this
.
getList
()
},
onShow
()
{
this
.
isLogin
=
this
.
$store
.
state
.
isLogin
},
onTabItemTap
()
{
if
(
!
this
.
$store
.
state
.
isLogin
)
{
this
.
$router
.
push
(
'Login'
)
return
}
this
.
orderLists
=
[]
this
.
page
=
1
this
.
loadingType
=
'
more
'
this
.
loadingType
=
'
loading
'
this
.
getList
()
},
methods
:
{
getList
()
{
if
(
this
.
loadingType
==
'noMore'
||
this
.
loadingType
===
'loading'
)
{
if
(
this
.
loadingType
==
'noMore'
)
{
return
}
this
.
loadingType
=
'loading'
;
...
...
@@ -85,6 +93,7 @@
this
.
page
++
}
}
else
{
this
.
loadingType
=
'noMore'
this
.
toast
(
res
.
message
)
}
})
...
...
@@ -95,6 +104,17 @@
goCoupon
(
item
)
{
this
.
$router
.
push
(
'Coupon'
,
{
'orderId'
:
item
.
orderSn
})
}
},
watch
:
{
isLogin
(
newVal
,
oldVal
)
{
console
.
log
(
newVal
,
oldVal
);
if
(
!
oldVal
&&
newVal
)
{
this
.
orderLists
=
[]
this
.
page
=
1
this
.
loadingType
=
'loading'
this
.
getList
()
}
}
}
}
</
script
>
...
...
pagesA/login/login.vue
View file @
e7b35166
...
...
@@ -59,7 +59,7 @@
if
(
this
.
time
!=
300
)
{
return
}
let
params
=
{
'codeType'
:
'10'
,
'
codeTyp
e'
:
this
.
phone
,
'resetToken'
:
'not'
}
let
params
=
{
'codeType'
:
'10'
,
'
mobil
e'
:
this
.
phone
,
'resetToken'
:
'not'
}
this
.
$net
.
post
(
'/meta/sms'
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
uni
.
showToast
({
...
...
pagesA/submitOrder/submitOrder.vue
View file @
e7b35166
...
...
@@ -26,8 +26,8 @@
立即兑换
</view>
</view>
<pwdCodeAlert
closeName=
"showPwdAlert"
v-
show
=
"showPwdAlert"
:integral=
"payIntegral"
@
pwdSubmit=
"pwdSubmit"
></pwdCodeAlert>
<smsCodeAlert
closeName=
"showSmsCodeAlert"
v-show
=
"showSmsCodeAlert"
@
smsCodeSubmit=
"smsCodeSubmit"
></smsCodeAlert>
<pwdCodeAlert
closeName=
"showPwdAlert"
v-
if
=
"showPwdAlert"
:integral=
"payIntegral"
@
pwdSubmit=
"pwdSubmit"
></pwdCodeAlert>
<smsCodeAlert
ref=
"sms"
closeName=
"showSmsCodeAlert"
v-if
=
"showSmsCodeAlert"
@
smsCodeSubmit=
"smsCodeSubmit"
></smsCodeAlert>
<Alert
v-show=
"errorAlert"
:text=
"errorAlertText"
@
clickCertain=
"clickAlert"
@
clickCancel=
"clickAlert"
/>
</view>
</
template
>
...
...
@@ -86,6 +86,10 @@
this
.
orderId
=
res
.
data
.
orderId
if
(
res
.
data
.
isSendSms
===
1
)
{
this
.
showSmsCodeAlert
=
true
let
that
=
this
setTimeout
(
function
()
{
that
.
$refs
.
sms
.
startTime
()
},
500
);
}
else
{
this
.
showPwdAlert
=
true
}
...
...
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