|
@@ -7,7 +7,7 @@
|
|
|
<Field v-model="amount" label="提现金额(分)" type="number" placeholder="请输入提现金额" />
|
|
|
</CellGroup>
|
|
|
<div class="submit-box">
|
|
|
- <Button :loading="loading" type="primary" hairline native-type="submit" loading-text="结算中..."> 提现 </Button>
|
|
|
+ <Button :loading="loading" :disabled="!amount" type="primary" hairline native-type="submit" loading-text="结算中..."> 提现 </Button>
|
|
|
<Button type="default" hairline @click="props.unmount"> 取消 </Button>
|
|
|
</div>
|
|
|
</Form>
|
|
@@ -21,9 +21,10 @@
|
|
|
import { CashOutModel } from "@/dataModel/cashOut";
|
|
|
const cashOutModel = new CashOutModel();
|
|
|
const useCashout = () => {
|
|
|
- const amount = ref<number | null>(null);
|
|
|
+ const amount = ref<number>();
|
|
|
const loading = ref(false);
|
|
|
const cashout = async () => {
|
|
|
+ if (!amount.value) return Toast.fail("请输入金额");
|
|
|
loading.value = true;
|
|
|
const data = await cashOutModel.cashout(amount.value);
|
|
|
loading.value = false;
|