Commit 8b9a064a authored by wykolor's avatar wykolor

feat: 样式优化

parent d87ea504
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <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"> <meta name="format-detection" content="telephone=yes">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" href="//at.alicdn.com/t/font_2425189_lvk0clvlo2.css"> <link rel="stylesheet" href="//at.alicdn.com/t/font_2425189_lvk0clvlo2.css">
......
...@@ -224,9 +224,10 @@ export default BonusDetail; ...@@ -224,9 +224,10 @@ export default BonusDetail;
.bonus-detail-pay-item, .bonus-detail-pay-item,
.bonus-detail-income-item { .bonus-detail-income-item {
background: #fff; background: #fff;
margin-bottom: 30px; margin-bottom: 26px;
padding: 20px; padding: 20px;
border-radius: 20px; border-radius: 10px;
box-shadow: 0px 10px 20px 0px rgba(221, 221, 221, 0.3);
ul { ul {
li { li {
line-height: 47px; line-height: 47px;
...@@ -243,7 +244,6 @@ export default BonusDetail; ...@@ -243,7 +244,6 @@ export default BonusDetail;
.bonus-detail-pay-item-desc { .bonus-detail-pay-item-desc {
background: #f5faff; background: #f5faff;
padding: 20px; padding: 20px;
border-radius: 15px;
color: #606263; color: #606263;
} }
.bonus-detail-pay-item-desc-money { .bonus-detail-pay-item-desc-money {
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
center center
:title="`微信(${bonusAccount?.withdrawAccount || '未绑定'})`" :title="`微信(${bonusAccount?.withdrawAccount || '未绑定'})`"
size="large" size="large"
style="border-radius: 0.3rem; margin-bottom: 0.3rem" class="bind-wechat"
:border="false" :border="false"
> >
<van-button <van-button
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
round round
size="small" size="small"
@click="bindWeiChatOrUnbind" @click="bindWeiChatOrUnbind"
style="width: 70%"
>{{ bonusAccount?.withdrawAccount ? "换绑微信" : "绑定微信" }}</van-button >{{ bonusAccount?.withdrawAccount ? "换绑微信" : "绑定微信" }}</van-button
> >
</van-cell> </van-cell>
...@@ -67,12 +66,10 @@ ...@@ -67,12 +66,10 @@
center center
:title="`可提现金额:¥${bonusAccount?.withdrawableTotal || 0}`" :title="`可提现金额:¥${bonusAccount?.withdrawableTotal || 0}`"
size="large" size="large"
style="border-radius: 0.3rem;" class="withdrawable-money"
:border="false" :border="false"
> >
<van-button color="#F1551E" round size="small" @click="withdraw" style="width: 50%" <van-button color="#F1551E" round size="small" @click="withdraw">提现</van-button>
>提现</van-button
>
</van-cell> </van-cell>
<div class="bouns-record"> <div class="bouns-record">
<van-row> <van-row>
...@@ -389,7 +386,7 @@ export default Bonus; ...@@ -389,7 +386,7 @@ export default Bonus;
color: #fff; color: #fff;
background: url("~@/assets/images/bonus/account-bg.png") no-repeat; background: url("~@/assets/images/bonus/account-bg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
margin-bottom: 30px; margin-bottom: 16px;
.bonus-account-money { .bonus-account-money {
margin: 28px 0 70px; margin: 28px 0 70px;
.money-desc { .money-desc {
...@@ -425,12 +422,27 @@ export default Bonus; ...@@ -425,12 +422,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 { .bouns-record {
margin-top: 30px; margin-top: 40px;
color: #484c4f; color: #484c4f;
.van-row { .van-row {
padding: 0 20px; padding: 0 20px;
margin-bottom: 40px; margin-bottom: 24px;
color: #141414; color: #141414;
.tip { .tip {
position: relative; position: relative;
...@@ -455,9 +467,10 @@ export default Bonus; ...@@ -455,9 +467,10 @@ export default Bonus;
} }
.bonus-record-item { .bonus-record-item {
background: #fff; background: #fff;
margin-bottom: 20px; margin-bottom: 16px;
padding: 20px 19px; 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 { .bonus-record-item-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -487,7 +500,7 @@ export default Bonus; ...@@ -487,7 +500,7 @@ export default Bonus;
background: #f5faff; background: #f5faff;
opacity: 0.9; opacity: 0.9;
padding: 20px; padding: 20px;
border-radius: 30px; border-radius: 10px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #484c4f; color: #484c4f;
...@@ -522,7 +535,8 @@ export default Bonus; ...@@ -522,7 +535,8 @@ export default Bonus;
.dialog-handle-btns { .dialog-handle-btns {
display: flex; display: flex;
padding: 0 30px 30px 30px; padding: 0 30px 30px 30px;
margin-bottom: 30px; margin-bottom: 48px;
margin-top: 48px;
justify-content: space-between; justify-content: space-between;
.van-button { .van-button {
flex: 0.47; flex: 0.47;
......
<template> <template>
<div class="bonus-withdraw"> <div class="bonus-withdraw">
<div class="bonus-withdraw-input"> <ul class="bonus-withdraw-info">
<li class="bonus-withdraw-input">
<span class="label-money-symbol">¥</span>
<van-field <van-field
class="bonus-withdraw-input-field"
v-model="withdrawAmount" v-model="withdrawAmount"
center
clearable
label="¥"
type="number" type="number"
format-trigger="onBlur" format-trigger="onBlur"
:formatter="formatter" :formatter="formatter"
placeholder="请输入金额" placeholder="请输入金额"
label-width="3.2em" clearable
label-class="label-money-symbol" :border="false"
> input-align="center"
<template #button> class="bonus-withdraw-input-field"
></van-field>
<van-button <van-button
class="all" class="all"
size="small" size="small"
...@@ -24,14 +23,13 @@ ...@@ -24,14 +23,13 @@
@click="withdrawAmount = withdrawableTotal" @click="withdrawAmount = withdrawableTotal"
>全部</van-button >全部</van-button
> >
</template> </li>
</van-field> <li class="bonus-withdraw-input-valid">今日可提现金额¥{{ withdrawableTotal }}元</li>
<p class="bonus-withdraw-input-valid">今日可提现金额¥{{ withdrawableTotal }}元</p> <li class="bonus-withdraw-input-tip">
<p class="bonus-withdraw-input-tip">
<i class="iconfont icon-wenhao"></i> <i class="iconfont icon-wenhao"></i>
<span>单日累计提现不超过{{ studentDailyWithdrawLimit }}元!</span> <span>单日累计提现不超过{{ studentDailyWithdrawLimit }}元!</span>
</p> </li>
</div> </ul>
<van-cell class="van-cell-tip" title="提现至" size="large" :border="false"> <van-cell class="van-cell-tip" title="提现至" size="large" :border="false">
<div class="slot-value"> <div class="slot-value">
<img class="wechat" src="~@/assets/images/bonus/wechat.png" alt="微信图片" /> <img class="wechat" src="~@/assets/images/bonus/wechat.png" alt="微信图片" />
...@@ -53,26 +51,24 @@ ...@@ -53,26 +51,24 @@
> >
<ul class="withdraw-dialog-header"> <ul class="withdraw-dialog-header">
<li>提现至微信账户:{{ withdrawAccount }}</li> <li>提现至微信账户:{{ withdrawAccount }}</li>
<li class="withdraw-dialog-header-money">¥{{ withdrawAmount }}</li> <li class="withdraw-dialog-header-money van-ellipsis">¥{{ withdrawAmount }}</li>
</ul> </ul>
<ul class="withdraw-dialog-field"> <ul class="withdraw-dialog-field">
<li> <li class="withdraw-dialog-field-input">
<van-field <van-field
v-model="smsVerifyCode" v-model="smsVerifyCode"
type="digit" type="digit"
label-width="0" label-width="0"
placeholder="请输入验证码" placeholder="请输入验证码"
> >
<template #button> </van-field>
<van-button <van-button
type="primary" type="primary"
color="#027AFF" color="#027AFF"
:disabled="smsVerifyPass"
@click="getSmsVerifyCode" @click="getSmsVerifyCode"
:disabled="showTime != '获取验证码'"
>{{ showTime }}</van-button >{{ showTime }}</van-button
> >
</template>
</van-field>
</li> </li>
<li class="withdraw-dialog-field-tip" v-if="mobileTip"> <li class="withdraw-dialog-field-tip" v-if="mobileTip">
今日可提现已将验证码发送至{{ mobileTip }} 今日可提现已将验证码发送至{{ mobileTip }}
...@@ -122,15 +118,7 @@ ...@@ -122,15 +118,7 @@
<li>{{ withdrawResponse?.expectedPayTime }}</li> <li>{{ withdrawResponse?.expectedPayTime }}</li>
</ul> </ul>
<div class="withdraw-success-dialog-btns"> <div class="withdraw-success-dialog-btns">
<van-button <van-button round type="primary" size="large" @click="goBack">确定</van-button>
round
type="primary"
color="linear-gradient(to bottom, #FFEB8C, #FE9F56)"
block
size="large"
@click="goBack"
>确定</van-button
>
</div> </div>
</van-dialog> </van-dialog>
</div> </div>
...@@ -187,7 +175,8 @@ const Withdraw = defineComponent({ ...@@ -187,7 +175,8 @@ const Withdraw = defineComponent({
withdrawResponse: {}, withdrawResponse: {},
studentDailyWithdrawLimit: 0, // 学生单日提现上限 studentDailyWithdrawLimit: 0, // 学生单日提现上限
withdrawing: false, withdrawing: false,
tencentCaptchPass: false // 图形验证码是否通过 tencentCaptchPass: false, // 图形验证码是否通过
smsVerifyPass: false
}); });
const { withdrawableTotal, withdrawAccount } = route.params; const { withdrawableTotal, withdrawAccount } = route.params;
state.withdrawableTotal = Number(withdrawableTotal); state.withdrawableTotal = Number(withdrawableTotal);
...@@ -195,6 +184,7 @@ const Withdraw = defineComponent({ ...@@ -195,6 +184,7 @@ const Withdraw = defineComponent({
const formatter = value => { const formatter = value => {
if (value <= 0) return ""; if (value <= 0) return "";
if (value > state.withdrawableTotal) { if (value > state.withdrawableTotal) {
Toast(`今日可提现金额为:${state.withdrawableTotal}元`);
return state.withdrawableTotal.toFixed(2); return state.withdrawableTotal.toFixed(2);
} }
...@@ -219,13 +209,17 @@ const Withdraw = defineComponent({ ...@@ -219,13 +209,17 @@ const Withdraw = defineComponent({
"2087826974", "2087826974",
async (res: TencentCaptchaResponse) => { async (res: TencentCaptchaResponse) => {
const { ret, randstr, ticket } = res; const { ret, randstr, ticket } = res;
const { data } = await checkCaptcha({ randStr: randstr, ticket });
state.mobileTip = data;
if (ret === 0) { if (ret === 0) {
state.smsVerifyPass = true;
state.tencentCaptchPass = true; state.tencentCaptchPass = true;
countDown(60, 1000, (time: number) => { countDown(60, 1000, (time: number) => {
time === 0 ? (state.showTime = `获取验证码`) : (state.showTime = `${time} 后再获取`); time === 0 ? (state.showTime = `获取验证码`) : (state.showTime = `${time} 后再获取`);
if (time === 0) {
state.smsVerifyPass = false;
}
}); });
const { data } = await checkCaptcha({ randStr: randstr, ticket });
state.mobileTip = data;
} }
}, },
{ {
...@@ -296,19 +290,75 @@ export default Withdraw; ...@@ -296,19 +290,75 @@ export default Withdraw;
padding: 146px 32px 0; padding: 146px 32px 0;
background: #fff; background: #fff;
min-height: 100vh; min-height: 100vh;
.bonus-withdraw-input { .bonus-withdraw-info {
padding-left: 50px;
text-align: center; text-align: center;
.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;
:deep(.van-field__body) {
font-size: 60px;
font-weight: 600;
color: #191919;
}
::-webkit-input-placeholder {
/* Chrome/Opera/Safari */
font-size: 30px;
}
::-moz-placeholder {
/* Firefox 19+ */
font-size: 30px;
}
:-ms-input-placeholder {
/* IE 10+ */
font-size: 30px;
}
:-moz-placeholder {
/* Firefox 18- */
font-size: 30px;
}
}
.all { .all {
width: 107px; width: 107px;
height: 56px;
position: absolute;
right: 0;
}
} }
.bonus-withdraw-input-valid { .bonus-withdraw-input-valid {
font-size: 24px; font-size: 24px;
color: #000000; height: 33px;
} line-height: 33px;
::v-deep .label-money-symbol { color: #484c4f;
font-size: 60px; margin-top: 19px;
font-weight: 600; margin-bottom: 56px;
} }
.bonus-withdraw-input-tip { .bonus-withdraw-input-tip {
display: inline-block; display: inline-block;
...@@ -319,6 +369,10 @@ export default Withdraw; ...@@ -319,6 +369,10 @@ export default Withdraw;
opacity: 0.3; opacity: 0.3;
padding: 1px 10px; padding: 1px 10px;
vertical-align: middle; vertical-align: middle;
height: 30px;
line-height: 30px;
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
margin-bottom: 80px;
} }
} }
.van-cell.van-cell-tip { .van-cell.van-cell-tip {
...@@ -326,7 +380,6 @@ export default Withdraw; ...@@ -326,7 +380,6 @@ export default Withdraw;
padding-right: 2px; padding-right: 2px;
border-top: 1px solid #ececec; border-top: 1px solid #ececec;
border-bottom: 1px solid #ececec; border-bottom: 1px solid #ececec;
margin-top: 100px;
.slot-value { .slot-value {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -340,7 +393,7 @@ export default Withdraw; ...@@ -340,7 +393,7 @@ export default Withdraw;
.handle-btn { .handle-btn {
padding: 0 72px; padding: 0 72px;
margin-top: 75px; margin-top: 107px;
.withdraw-title { .withdraw-title {
font-size: 36px; font-size: 36px;
display: block; display: block;
...@@ -348,10 +401,15 @@ export default Withdraw; ...@@ -348,10 +401,15 @@ export default Withdraw;
.withdraw-tips { .withdraw-tips {
opacity: 0.5; opacity: 0.5;
} }
.van-button {
height: 100px;
border-radius: 51px;
}
} }
::v-deep .withdraw-dialog { ::v-deep .withdraw-dialog {
padding: 48px; padding: 48px;
color: #fff; color: #fff;
width: 622px;
.withdraw-dialog-header { .withdraw-dialog-header {
background: url("~@/assets/images/bonus/withdraw-bg.png") no-repeat; background: url("~@/assets/images/bonus/withdraw-bg.png") no-repeat;
background-size: 100%; background-size: 100%;
...@@ -364,31 +422,43 @@ export default Withdraw; ...@@ -364,31 +422,43 @@ export default Withdraw;
} }
.withdraw-dialog-field { .withdraw-dialog-field {
margin-top: 80px; margin-top: 80px;
.withdraw-dialog-field-tip { .withdraw-dialog-field-input {
text-align: center; display: flex;
color: #484c4f; align-items: center;
font-size: 24px;
margin-top: 30px;
}
.van-cell { .van-cell {
flex: 1;
padding: 0; padding: 0;
.van-field__control { .van-field__control {
padding: 22px 0 22px 45px; padding: 22px 0 22px 45px;
border: 2px solid #dcdee0; border: 2px solid #dcdee0;
border-right: none; border-right: none;
border-radius: 8px 0px 0px 8px; border-radius: 8px 0px 0px 8px;
height: 80px;
width: 306px;
} }
.van-field__button { }
padding-left: 0; .van-button {
border: 4px solid #027aff; width: 220px;
border-left: none; height: 80px;
background: #027AFF;
border-radius: 0px 8px 8px 0px; border-radius: 0px 8px 8px 0px;
background: #027aff; font-size: 26px;
box-sizing: border-box;
} }
} }
.withdraw-dialog-field-tip {
text-align: center;
color: #484c4f;
font-size: 24px;
margin-top: 24px;
}
} }
.handle-btns { .handle-btns {
margin-top: 80px; margin-top: 64px;
.van-button {
height: 100px;
line-height: 100px;
}
} }
} }
...@@ -411,6 +481,7 @@ export default Withdraw; ...@@ -411,6 +481,7 @@ export default Withdraw;
font-style: italic; font-style: italic;
position: relative; position: relative;
font-weight: bold; font-weight: bold;
margin-bottom: 24px;
&::after, &::after,
&::before { &::before {
content: ""; content: "";
...@@ -432,7 +503,7 @@ export default Withdraw; ...@@ -432,7 +503,7 @@ export default Withdraw;
&:nth-of-type(2) { &:nth-of-type(2) {
font-size: 32px; font-size: 32px;
font-weight: 500; font-weight: 500;
margin: 16px 0; margin-bottom: 16px;
} }
&:nth-of-type(3) { &:nth-of-type(3) {
...@@ -447,10 +518,18 @@ export default Withdraw; ...@@ -447,10 +518,18 @@ export default Withdraw;
margin-bottom: 39px; margin-bottom: 39px;
} }
&:nth-of-type(4),
&:nth-of-type(5) {
margin-bottom: 11px;
}
&:nth-of-type(4), &:nth-of-type(4),
&:nth-of-type(6) { &:nth-of-type(6) {
font-size: 28px; font-size: 28px;
} }
&:nth-of-type(6) {
margin-bottom: 7px;
}
&:nth-of-type(5), &:nth-of-type(5),
&:nth-of-type(7) { &:nth-of-type(7) {
opacity: 0.8; opacity: 0.8;
...@@ -458,8 +537,17 @@ export default Withdraw; ...@@ -458,8 +537,17 @@ export default Withdraw;
} }
} }
.withdraw-success-dialog-btns { .withdraw-success-dialog-btns {
margin-top: 130px; text-align: center;
.van-button {
margin-top: 100px;
padding: 0 100px; padding: 0 100px;
height: 100px;
line-height: 100px;
width: 380px;
color: #f03d04;
border: none;
background: linear-gradient(to bottom, #ffeb8c, #fe9f56);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment