| | |
| | | <template> |
| | | <div id="cryptos"> |
| | | <div id="financialOrder" class="fundBuy"> |
| | | <assets-head :title="$i18n.locale === 'CN' || $i18n.locale === 'zh-CN' ? data.name_cn : data.name_en"></assets-head> |
| | | <assets-head |
| | | :title="$i18n.locale === 'CN' || $i18n.locale === 'zh-CN' ? data.name_cn : data.name_en"></assets-head> |
| | | <div class="box-border "> |
| | | <div class="w-full h-1 bgDark"></div> |
| | | <div class="mt-12 text-36 font-semibold px-8 textColor">{{ $t('购买金额') }}</div> |
| | | <div class="flex justify-center mt-4"> |
| | | <div class="flex flex-1 px-8"> |
| | | <input :placeholder="$t('输入金额')" type="number" v-model="form.amount" |
| | | class="h-20 pl-8 w-full border-none inputBackground textColor text-28" @input="debounceFn"> |
| | | <div class="h-20 w-48 flex inputBackground textColor text-28 items-center pr-1" @click="form.amount = bal"> |
| | | class="h-20 pl-8 w-full border-none inputBackground textColor text-28 mr-5" @input="debounceFn"> |
| | | <div class="h-20 w-60 flex inputBackground textColor text-28 items-center pr-5 pl-5" |
| | | @click="form.amount = bal"> |
| | | USDT <span class="colorMain pl-2" @click="handleAll">{{ $t('全部') }}</span></div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="text-32 font-normal text-grey">{{ $t('最大可投') }}</div> |
| | | <div class="text-32 font-bold textColor">{{ data.investment_max }} USDT</div> |
| | | </div> |
| | | |
| | | <div class="flex justify-between items-center h-18 mb-2"> |
| | | <div class="text-32 font-normal text-grey">{{ $t('币种') }}</div> |
| | | <select v-model="form.buyCurrency" |
| | | class="text-32 textColor inputBackground px-4 py-2 rounded border-none focus:outline-none"> |
| | | <option value="btc">BTC</option> |
| | | <option value="eth">ETH</option> |
| | | <option value="xaut">XAUT</option> |
| | | <option value="doge">DOGE</option> |
| | | <option value="sol">SOL</option> |
| | | <option value="xrp">XRP</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="h-3 px-8 mt-20 mb-5 textColor text-28">{{ $t('概览') }}</div> |
| | | <div class="px-8"> |
| | | <div class="flex justify-between items-center h-20"> |
| | |
| | | import { fundMakeOrder } from '@/service/financialManagement.api.js' |
| | | import dayjs from 'dayjs' |
| | | import { showToast } from 'vant'; |
| | | import {debounce} from "@/utils/utis.js"; |
| | | import { debounce } from "@/utils/utis.js"; |
| | | |
| | | export default { |
| | | name: "funBuy", |
| | |
| | | form: { |
| | | financeId: '', |
| | | amount: '', |
| | | buyCurrency: 'btc', |
| | | }, |
| | | } |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.form.amount < this.data.investment_min) { |
| | | showToast(this.$t('最小支付金额不能低于')+this.data.investment_min ) |
| | | showToast(this.$t('最小支付金额不能低于') + this.data.investment_min) |
| | | return |
| | | } |
| | | if (this.form.amount > this.data.investment_max) { |
| | | showToast(this.$t('最大支付金额不能超过')+this.data.investment_max ) |
| | | showToast(this.$t('最大支付金额不能超过') + this.data.investment_max) |
| | | return |
| | | } |
| | | fundMakeOrder(this.form).then(res => { |
| | |
| | | return |
| | | } |
| | | fundMakeOrder(this.form).then(res => { |
| | | //console.log('认购', res) |
| | | console.log('认购', res) |
| | | this.$router.push( |
| | | { path: '/cryptos/financial-confirm', query: { ...res } }) |
| | | }) |