| | |
| | | import assetsHead from '@/components/Transform/assets-head/index.vue'; |
| | | import dayjs from 'dayjs' |
| | | import { _getBalance } from "@/service/user.api.js"; |
| | | import { showToast } from "vant"; |
| | | export default { |
| | | name: "MachineBuy", |
| | | components: { |
| | |
| | | }, |
| | | handleBuy() { |
| | | if (!this.data.test && !this.form.amount) { |
| | | this.$toast(this.$t('请输入金额')) |
| | | showToast(this.$t('请输入金额')) |
| | | return |
| | | } else if (this.data.test && this.form.amount == '') { |
| | | this.form.amount = 0 |
| | | } |
| | | if (this.form.amount * 1 < this.data.investment_min) { |
| | | this.$toast(this.$t('最低金额') + ':' + this.data.investment_min) |
| | | showToast(this.$t('最低金额') + ':' + this.data.investment_min) |
| | | return |
| | | } else if (this.form.amount * 1 > this.data.investment_max) { |
| | | this.$toast(this.$t('最大数量') + ':' + this.data.investment_max) |
| | | showToast(this.$t('最大数量') + ':' + this.data.investment_max) |
| | | return |
| | | } |
| | | |