Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-webview
Project
Project
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
frontend
mall-webview
Commits
5232080e
Commit
5232080e
authored
Apr 14, 2021
by
hewenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/2021_03_12_bonus' of dev.jiuaoedu.com:wykolor/mall-webview…
Merge branch 'feature/2021_03_12_bonus' of dev.jiuaoedu.com:wykolor/mall-webview into feature/2021_03_12_bonus
parents
a660c6f3
e7715141
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
280 additions
and
121 deletions
+280
-121
index.html
public/index.html
+1
-1
close.png
src/assets/images/bonus/close.png
+0
-0
index.vue
src/views/bonus/bonus-detail/index.vue
+3
-3
index.vue
src/views/bonus/index.vue
+61
-23
index.vue
src/views/bonus/withdraw/index.vue
+215
-94
No files found.
public/index.html
View file @
5232080e
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,
initial-scale=1.0
"
>
<meta
name=
"viewport"
content=
"width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=0;
"
>
<meta
name=
"format-detection"
content=
"telephone=yes"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2425189_lvk0clvlo2.css"
>
...
...
src/assets/images/bonus/close.png
0 → 100644
View file @
5232080e
1.09 KB
src/views/bonus/bonus-detail/index.vue
View file @
5232080e
...
...
@@ -224,9 +224,10 @@ export default BonusDetail;
.bonus-detail-pay-item
,
.bonus-detail-income-item
{
background
:
#fff
;
margin-bottom
:
30
px
;
margin-bottom
:
26
px
;
padding
:
20px
;
border-radius
:
20px
;
border-radius
:
10px
;
box-shadow
:
0px
10px
20px
0px
rgba
(
221
,
221
,
221
,
0
.3
);
ul
{
li
{
line-height
:
47px
;
...
...
@@ -243,7 +244,6 @@ export default BonusDetail;
.bonus-detail-pay-item-desc
{
background
:
#f5faff
;
padding
:
20px
;
border-radius
:
15px
;
color
:
#606263
;
}
.bonus-detail-pay-item-desc-money
{
...
...
src/views/bonus/index.vue
View file @
5232080e
...
...
@@ -50,7 +50,7 @@
center
:title=
"`微信($
{bonusAccount?.withdrawAccount || '未绑定'})`"
size="large"
style="border-radius: 0.3rem; margin-bottom: 0.3rem
"
class="bind-wechat
"
:border="false"
>
<van-button
...
...
@@ -59,7 +59,6 @@
round
size=
"small"
@
click=
"bindWeiChatOrUnbind"
style=
"width: 70%"
>
{{
bonusAccount
?.
withdrawAccount
?
"换绑微信"
:
"绑定微信"
}}
</van-button
>
</van-cell>
...
...
@@ -67,12 +66,10 @@
center
:title=
"`可提现金额:¥$
{bonusAccount?.withdrawableTotal || 0}`"
size="large"
style="border-radius: 0.3rem;
"
class="withdrawable-money
"
:border="false"
>
<van-button
color=
"#F1551E"
round
size=
"small"
@
click=
"withdraw"
style=
"width: 50%"
>
提现
</van-button
>
<van-button
color=
"#F1551E"
round
size=
"small"
@
click=
"withdraw"
>
提现
</van-button>
</van-cell>
<div
class=
"bouns-record"
>
<van-row>
...
...
@@ -149,6 +146,7 @@
:show-confirm-button=
"false"
class=
"bunus-rule-dialog"
>
<i
class=
"close"
@
click=
"showWithdrawRules = false"
></i>
<ul
class=
"bonus-rule-list"
>
<li>
1.当前只有转介绍收入可以在线提现;
</li>
<li>
2.提现前,确保已经绑定了微信,且微信已经实名认证;
</li>
...
...
@@ -166,12 +164,17 @@
v-model:show=
"showBindWx"
:show-cancel-button=
"false"
:show-confirm-button=
"false"
:title=
"
bonusAccount?.withdrawAccount
? '换绑后,将提现到新绑定的微信零钱中!'
: '绑定微信后,才可进行提现!'
"
:title=
"bonusAccount?.withdrawAccount ? '确认换绑微信' : '绑定微信'"
class=
"bind-wechat-dialog"
>
<i
class=
"close"
@
click=
"showBindWx = false"
></i>
<p
class=
"dangerous-dialog-tip"
>
{{
bonusAccount?.withdrawAccount
? "换绑后,将提现到新绑定的微信零钱中!"
: "绑定微信后,才可进行提现!"
}}
</p>
<div
class=
"dialog-handle-btns"
>
<van-button
type=
"default"
round
@
click=
"showBindWx = false"
>
取消
</van-button
><van-button
...
...
@@ -190,7 +193,7 @@
:show-cancel-button=
"false"
:show-confirm-button=
"false"
>
<p
class=
"dangerous-dialog-tip"
style=
"text-align: center"
>
<p
class=
"dangerous-dialog-tip"
>
{{ formatBonusTipTxt(bonusAccount?.errCode) }}
</p>
<div
class=
"dialog-handle-btns"
>
...
...
@@ -389,7 +392,7 @@ export default Bonus;
color
:
#fff
;
background
:
url("~@/assets/images/bonus/account-bg.png")
no-repeat
;
background-size
:
100%
100%
;
margin-bottom
:
30
px
;
margin-bottom
:
16
px
;
.bonus-account-money
{
margin
:
28px
0
70px
;
.money-desc
{
...
...
@@ -425,12 +428,27 @@ export default Bonus;
}
}
}
.bind-wechat
{
margin-bottom
:
16px
;
border-radius
:
9px
;
.van-button
{
height
:
56px
;
width
:
160px
;
}
}
.withdrawable-money
{
border-radius
:
9px
;
.van-button
{
height
:
56px
;
width
:
120px
;
}
}
.bouns-record
{
margin-top
:
3
0px
;
margin-top
:
4
0px
;
color
:
#484c4f
;
.van-row
{
padding
:
0
20px
;
margin-bottom
:
40
px
;
margin-bottom
:
24
px
;
color
:
#141414
;
.tip
{
position
:
relative
;
...
...
@@ -455,9 +473,10 @@ export default Bonus;
}
.bonus-record-item
{
background
:
#fff
;
margin-bottom
:
20
px
;
margin-bottom
:
16
px
;
padding
:
20px
19px
;
border-radius
:
30px
;
border-radius
:
10px
;
box-shadow
:
0px
10px
20px
0px
rgba
(
221
,
221
,
221
,
0
.3
);
.bonus-record-item-header
{
display
:
flex
;
justify-content
:
space-between
;
...
...
@@ -487,7 +506,7 @@ export default Bonus;
background
:
#f5faff
;
opacity
:
0
.9
;
padding
:
20px
;
border-radius
:
3
0px
;
border-radius
:
1
0px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#484c4f
;
...
...
@@ -497,17 +516,34 @@ export default Bonus;
}
}
}
::v-deep
.bunus-rule-dialog
{
&
.van-dialog
{
top
:
50%
;
width
:
622px
;
::v-deep
.bunus-rule-dialog
,
::v-deep
.bind-wechat-dialog
{
overflow
:
initial
;
.close
{
width
:
44px
;
height
:
44px
;
display
:
inline-block
;
background
:
url("~@/assets/images/bonus/close.png")
no-repeat
;
background-size
:
100%
100%
;
position
:
absolute
;
right
:
2px
;
top
:
-78px
;
}
.van-dialog__header
{
background
:
linear-gradient
(
213deg
,
#05b2ff
0%
,
#027aff
100%
);
padding
:
23px
0
;
color
:
#fff
;
font-weight
:
bold
;
font-size
:
36px
;
border-top-left-radius
:
28px
;
border-top-right-radius
:
28px
;
}
}
::v-deep
.bunus-rule-dialog
{
&
.van-dialog
{
top
:
50%
;
width
:
622px
;
}
.bonus-rule-list
{
padding
:
42px
51px
0
51px
;
...
...
@@ -521,6 +557,7 @@ export default Bonus;
}
.dialog-handle-btns
{
display
:
flex
;
margin-top
:
48px
;
padding
:
30px
;
margin-bottom
:
30px
;
justify-content
:
space-between
;
...
...
@@ -530,7 +567,8 @@ export default Bonus;
}
}
.dangerous-dialog-tip
{
padding
:
48px
;
padding
:
0
48px
;
text-align
:
center
;
line-height
:
44px
;
}
}
...
...
src/views/bonus/withdraw/index.vue
View file @
5232080e
<
template
>
<div
class=
"bonus-withdraw"
>
<div
class=
"bonus-withdraw-input"
>
<van-field
class=
"bonus-withdraw-input-field"
v-model=
"withdrawAmount"
center
clearable
label=
"¥"
type=
"number"
format-trigger=
"onBlur"
:formatter=
"formatter"
placeholder=
"请输入金额"
label-width=
"3.2em"
label-class=
"label-money-symbol"
>
<template
#
button
>
<van-button
class=
"all"
size=
"small"
type=
"primary"
round
color=
"#F1551E"
@
click=
"withdrawAmount = withdrawableTotal"
>
全部
</van-button
>
</
template
>
</van-field>
<p
class=
"bonus-withdraw-input-valid"
>
今日可提现金额¥{{ withdrawableTotal }}元
</p>
<p
class=
"bonus-withdraw-input-tip"
>
<ul
class=
"bonus-withdraw-info"
>
<li
class=
"bonus-withdraw-input"
>
<span
class=
"label-money-symbol"
>
¥
</span>
<van-field
v-model=
"withdrawAmount"
type=
"number"
format-trigger=
"onBlur"
:formatter=
"formatter"
placeholder=
"请输入金额"
clearable
:border=
"false"
input-align=
"center"
class=
"bonus-withdraw-input-field"
></van-field>
<van-button
class=
"all"
size=
"small"
type=
"primary"
round
color=
"#F1551E"
@
click=
"withdrawAmount = withdrawableTotal"
>
全部
</van-button
>
</li>
<li
class=
"bonus-withdraw-input-valid"
>
今日可提现金额¥
{{
withdrawableTotal
}}
元
</li>
<li
class=
"bonus-withdraw-input-tip"
>
<i
class=
"iconfont icon-wenhao"
></i>
<span>
单日累计提现不超过
{{
studentDailyWithdrawLimit
}}
元!
</span>
</
p
>
</
div
>
</
li
>
</
ul
>
<van-cell
class=
"van-cell-tip"
title=
"提现至"
size=
"large"
:border=
"false"
>
<div
class=
"slot-value"
>
<img
class=
"wechat"
src=
"~@/assets/images/bonus/wechat.png"
alt=
"微信图片"
/>
...
...
@@ -51,28 +49,27 @@
:show-confirm-button=
"false"
class=
"withdraw-dialog"
>
<i
class=
"close"
@
click=
"showWithdraw = false"
></i>
<ul
class=
"withdraw-dialog-header"
>
<li>
提现至微信账户:
{{
withdrawAccount
}}
</li>
<li
class=
"withdraw-dialog-header-money"
>
¥{{ withdrawAmount }}
</li>
<li
class=
"withdraw-dialog-header-money
van-ellipsis
"
>
¥
{{
withdrawAmount
}}
</li>
</ul>
<ul
class=
"withdraw-dialog-field"
>
<li>
<li
class=
"withdraw-dialog-field-input"
>
<van-field
v-model=
"smsVerifyCode"
type=
"digit"
label-width=
"0"
placeholder=
"请输入验证码"
>
<
template
#
button
>
<van-button
type=
"primary"
color=
"#027AFF"
@
click=
"getSmsVerifyCode"
:disabled=
"showTime != '获取验证码'"
>
{{
showTime
}}
</van-button
>
</
template
>
</van-field>
<van-button
type=
"primary"
color=
"#027AFF"
:disabled=
"smsVerifyPass"
@
click=
"getSmsVerifyCode"
>
{{
showTime
}}
</van-button
>
</li>
<li
class=
"withdraw-dialog-field-tip"
v-if=
"mobileTip"
>
今日可提现已将验证码发送至
{{
mobileTip
}}
...
...
@@ -112,6 +109,7 @@
:show-confirm-button=
"false"
class=
"withdraw-success-dialog"
>
<i
class=
"close"
@
click=
"showWithdrawSuccess = false"
></i>
<ul
class=
"withdraw-success-dialog-text"
>
<li>
提现申请成功!
</li>
<li>
提现金额:
</li>
...
...
@@ -122,15 +120,7 @@
<li>
{{
withdrawResponse
?.
expectedPayTime
}}
</li>
</ul>
<div
class=
"withdraw-success-dialog-btns"
>
<van-button
round
type=
"primary"
color=
"linear-gradient(to bottom, #FFEB8C, #FE9F56)"
block
size=
"large"
@
click=
"goBack"
>
确定
</van-button
>
<van-button
round
type=
"primary"
size=
"large"
@
click=
"goBack"
>
确定
</van-button>
</div>
</van-dialog>
</div>
...
...
@@ -187,7 +177,8 @@ const Withdraw = defineComponent({
withdrawResponse
:
{},
studentDailyWithdrawLimit
:
0
,
// 学生单日提现上限
withdrawing
:
false
,
tencentCaptchPass
:
false
// 图形验证码是否通过
tencentCaptchPass
:
false
,
// 图形验证码是否通过
smsVerifyPass
:
false
});
const
{
withdrawableTotal
,
withdrawAccount
}
=
route
.
params
;
state
.
withdrawableTotal
=
Number
(
withdrawableTotal
);
...
...
@@ -195,6 +186,7 @@ const Withdraw = defineComponent({
const
formatter
=
value
=>
{
if
(
value
<=
0
)
return
""
;
if
(
value
>
state
.
withdrawableTotal
)
{
Toast
(
`今日可提现金额为:
${
state
.
withdrawableTotal
}
元`
);
return
state
.
withdrawableTotal
.
toFixed
(
2
);
}
...
...
@@ -219,13 +211,25 @@ const Withdraw = defineComponent({
"2087826974"
,
async
(
res
:
TencentCaptchaResponse
)
=>
{
const
{
ret
,
randstr
,
ticket
}
=
res
;
const
{
data
}
=
await
checkCaptcha
({
randStr
:
randstr
,
ticket
});
state
.
mobileTip
=
data
;
if
(
ret
===
0
)
{
state
.
tencentCaptchPass
=
true
;
countDown
(
60
,
1000
,
(
time
:
number
)
=>
{
time
===
0
?
(
state
.
showTime
=
`获取验证码`
)
:
(
state
.
showTime
=
`
${
time
}
后再获取`
);
});
state
.
smsVerifyPass
=
true
;
try
{
const
{
data
}
=
await
checkCaptcha
({
randStr
:
randstr
,
ticket
});
Toast
(
"发送验证码成功"
);
state
.
mobileTip
=
data
;
countDown
(
60
,
1000
,
(
time
:
number
)
=>
{
time
===
0
?
(
state
.
showTime
=
`获取验证码`
)
:
(
state
.
showTime
=
`
${
time
}
后再获取`
);
if
(
time
===
0
)
{
state
.
smsVerifyPass
=
false
;
}
});
}
catch
{
Toast
(
"发送验证码失败,请重试"
);
state
.
smsVerifyPass
=
false
;
}
}
},
{
...
...
@@ -296,29 +300,102 @@ export default Withdraw;
padding
:
146px
32px
0
;
background
:
#fff
;
min-height
:
100vh
;
.bonus-withdraw-input
{
padding-left
:
50px
;
.bonus-withdraw-info
{
text-align
:
center
;
.all
{
width
:
107px
;
.bonus-withdraw-input
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
84px
;
line-height
:
84px
;
position
:
relative
;
&
:
:
after
{
width
:
430px
;
height
:
2px
;
background
:
#f1f4f9
;
content
:
""
;
display
:
block
;
position
:
absolute
;
bottom
:
0
;
}
.label-money-symbol
{
width
:
62px
;
font-size
:
60px
;
font-weight
:
600
;
display
:
inline-block
;
margin-right
:
30px
;
color
:
#191919
;
}
.bonus-withdraw-input-field
{
width
:
328px
;
display
:
flex
;
justify-content
:
center
;
display
:
inline-block
;
padding
:
0
;
position
:
relative
;
right
:
40px
;
:deep
(
.van-field__body
)
{
font-size
:
60px
;
font-weight
:
600
;
color
:
#191919
;
}
::-webkit-input-placeholder
{
/* Chrome/Opera/Safari */
font-size
:
30px
;
color
:
#9FA1A3
;
// opacity: 0.5;
}
::-moz-placeholder
{
/* Firefox 19+ */
font-size
:
30px
;
color
:
#9FA1A3
;
}
:-ms-input-placeholder
{
/* IE 10+ */
font-size
:
30px
;
color
:
#9FA1A3
;
}
:-moz-placeholder
{
/* Firefox 18- */
font-size
:
30px
;
color
:
#9FA1A3
;
}
}
.all
{
width
:
107px
;
height
:
56px
;
position
:
absolute
;
right
:
0
;
}
}
.bonus-withdraw-input-valid
{
font-size
:
24px
;
color
:
#000000
;
}
::v-deep
.label-money-symbol
{
font-size
:
60
px
;
font-weight
:
600
;
height
:
33px
;
line-height
:
33px
;
color
:
#484c4f
;
margin-top
:
19
px
;
margin-bottom
:
56px
;
}
.bonus-withdraw-input-tip
{
display
:
inline-block
;
align-items
:
center
;
background
:
#
dddddd
;
background
:
#
f7f7f7
;
font-size
:
22px
;
border-radius
:
18px
;
opacity
:
0
.3
;
padding
:
1px
10px
;
vertical-align
:
middle
;
height
:
36px
;
margin-bottom
:
80px
;
vertical-align
:
middle
;
color
:
#9FA1A3
;
vertical-align
:
middle
;
line-height
:
36px
;
text-align
:
left
;
padding
:
0
8px
;
align-items
:
center
;
i
{
margin-right
:
8px
;
}
}
}
.van-cell.van-cell-tip
{
...
...
@@ -326,7 +403,6 @@ export default Withdraw;
padding-right
:
2px
;
border-top
:
1px
solid
#ececec
;
border-bottom
:
1px
solid
#ececec
;
margin-top
:
100px
;
.slot-value
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -340,10 +416,7 @@ export default Withdraw;
.handle-btn
{
padding
:
0
72px
;
margin-top
:
75px
;
:deep
(
.van-button.van-button--large
)
{
height
:
100px
;
}
margin-top
:
107px
;
.withdraw-title
{
font-size
:
36px
;
line-height
:
50px
;
...
...
@@ -352,10 +425,29 @@ export default Withdraw;
opacity
:
0
.5
;
line-height
:
32px
;
}
.van-button
{
height
:
100px
;
border-radius
:
51px
;
}
}
::v-deep
.withdraw-dialog
,
::v-deep
.withdraw-success-dialog
{
overflow
:
initial
;
.close
{
width
:
44px
;
height
:
44px
;
display
:
inline-block
;
background
:
url("~@/assets/images/bonus/close.png")
no-repeat
;
background-size
:
100%
100%
;
position
:
absolute
;
right
:
2px
;
top
:
-78px
;
}
}
::v-deep
.withdraw-dialog
{
padding
:
48px
;
color
:
#fff
;
width
:
622px
;
.withdraw-dialog-header
{
background
:
url("~@/assets/images/bonus/withdraw-bg.png")
no-repeat
;
background-size
:
100%
;
...
...
@@ -368,31 +460,42 @@ export default Withdraw;
}
.withdraw-dialog-field
{
margin-top
:
80px
;
.withdraw-dialog-field-input
{
display
:
flex
;
align-items
:
center
;
.van-cell
{
flex
:
1
;
padding
:
0
;
.van-field__control
{
padding
:
22px
0
22px
45px
;
border
:
2px
solid
#dcdee0
;
border-right
:
none
;
border-radius
:
8px
0px
0px
8px
;
height
:
80px
;
width
:
306px
;
}
}
.van-button
{
width
:
220px
;
height
:
80px
;
background
:
#027aff
;
border-radius
:
0px
8px
8px
0px
;
font-size
:
26px
;
box-sizing
:
border-box
;
}
}
.withdraw-dialog-field-tip
{
text-align
:
center
;
color
:
#484c4f
;
font-size
:
24px
;
margin-top
:
30px
;
}
.van-cell
{
padding
:
0
;
.van-field__control
{
padding
:
22px
0
22px
45px
;
border
:
2px
solid
#dcdee0
;
border-right
:
none
;
border-radius
:
8px
0px
0px
8px
;
}
.van-field__button
{
padding-left
:
0
;
border
:
4px
solid
#027aff
;
border-left
:
none
;
border-radius
:
0px
8px
8px
0px
;
background
:
#027aff
;
}
margin-top
:
24px
;
}
}
.handle-btns
{
margin-top
:
80px
;
margin-top
:
64px
;
.van-button
{
height
:
100px
;
}
}
}
...
...
@@ -415,6 +518,7 @@ export default Withdraw;
font-style
:
italic
;
position
:
relative
;
font-weight
:
bold
;
margin-bottom
:
24px
;
&
:
:
after
,
&::
before
{
content
:
""
;
...
...
@@ -436,7 +540,7 @@ export default Withdraw;
&
:nth-of-type
(
2
)
{
font-size
:
32px
;
font-weight
:
500
;
margin
:
16px
0
;
margin
-bottom
:
16px
;
}
&
:nth-of-type
(
3
)
{
...
...
@@ -451,10 +555,18 @@ export default Withdraw;
margin-bottom
:
39px
;
}
&
:nth-of-type
(
4
),
&
:nth-of-type
(
5
)
{
margin-bottom
:
11px
;
}
&
:nth-of-type
(
4
),
&
:nth-of-type
(
6
)
{
font-size
:
28px
;
}
&
:nth-of-type
(
6
)
{
margin-bottom
:
7px
;
}
&
:nth-of-type
(
5
),
&
:nth-of-type
(
7
)
{
opacity
:
0
.8
;
...
...
@@ -462,8 +574,17 @@ export default Withdraw;
}
}
.withdraw-success-dialog-btns
{
margin-top
:
130px
;
padding
:
0
100px
;
text-align
:
center
;
.van-button
{
margin-top
:
100px
;
padding
:
0
100px
;
height
:
100px
;
line-height
:
100px
;
width
:
380px
;
color
:
#f03d04
;
border
:
none
;
background
:
linear-gradient
(
to
bottom
,
#ffeb8c
,
#fe9f56
);
}
}
}
}
...
...
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