Commit efe3785d authored by leiqingsong's avatar leiqingsong

优化

parent 566db7b2
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<van-datetime-picker <van-datetime-picker
v-model="currentDate" v-model="currentDate"
type="year-month" type="year-month"
:min-date="minDate"
:max-date="maxDate" :max-date="maxDate"
@cancel="onPickerCancle" @cancel="onPickerCancle"
@confirm="onPickerConfirm" @confirm="onPickerConfirm"
...@@ -39,6 +40,7 @@ export default { ...@@ -39,6 +40,7 @@ export default {
name: "CashOutRecord", name: "CashOutRecord",
data() { data() {
return { return {
minDate: "",
maxDate: "", maxDate: "",
show: false, show: false,
options: [{ text: "2021年3月", value: 0 }], options: [{ text: "2021年3月", value: 0 }],
...@@ -48,9 +50,10 @@ export default { ...@@ -48,9 +50,10 @@ export default {
}; };
}, },
mounted() { mounted() {
(this.maxDate = new Date()), this.maxDate = new Date();
(this.selected = `${this.currentDate.getFullYear()}${this.currentDate.getMonth() + this.minDate = new Date(this.currentDate.getFullYear(), 0);
1}月`); this.selected = `${this.currentDate.getFullYear()}${this.currentDate.getMonth() +
1}月`;
const time = this.currentDate.toLocaleDateString().replace(/\//g, "-"); const time = this.currentDate.toLocaleDateString().replace(/\//g, "-");
this.getRecordList(time); this.getRecordList(time);
}, },
......
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
<van-cell is-link title="所属银行" :value="bank" @click="jumpToBank" /> <van-cell is-link title="所属银行" :value="bank" @click="jumpToBank" />
</van-cell-group> </van-cell-group>
<div class="detail"> <div class="detail">
<p style="font-size: 24px">提现金额</p> <p class="cash-out-title">提现金额</p>
<van-field <van-field
v-model="money" v-model="money"
type="number" type="number"
label="¥" label="¥"
class="money" class="money"
maxlength="8"
center
@blur="onFillMoneyBlur" @blur="onFillMoneyBlur"
@input="inputClick" @input="inputClick"
/> />
...@@ -149,6 +151,10 @@ export default { ...@@ -149,6 +151,10 @@ export default {
}, },
// 点击提现 // 点击提现
onCashOut() { onCashOut() {
if (this.money == 0) {
this.$toast.fail('请输入正确金额');
return;
}
if (!this.money) { if (!this.money) {
this.$toast.fail("未输入提现金额"); this.$toast.fail("未输入提现金额");
return; return;
...@@ -158,7 +164,7 @@ export default { ...@@ -158,7 +164,7 @@ export default {
return; return;
} }
const params = { const params = {
userId: JSON.parse(localStorage.getItem("user")).userId userIdww: JSON.parse(localStorage.getItem("user")).userId
}; };
sendSms(params).then(); sendSms(params).then();
this.validCode = null; this.validCode = null;
...@@ -235,6 +241,9 @@ export default { ...@@ -235,6 +241,9 @@ export default {
padding: 10px 16px; padding: 10px 16px;
background-color: #ffffff; background-color: #ffffff;
.cash-out-title {
font-size: 24px;
}
.money { .money {
box-sizing: border-box; box-sizing: border-box;
margin: 0 0 10px; margin: 0 0 10px;
......
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