| | |
| | | :title="$t('提款')" |
| | | left-arrow |
| | | @click-left="onClickLeft" |
| | | /> |
| | | > |
| | | <template #right> |
| | | <van-icon |
| | | @click="$router.push('/cashlist')" |
| | | name="orders-o" |
| | | size="20" |
| | | /> |
| | | </template> |
| | | </van-nav-bar> |
| | | <main> |
| | | <div class="main-title">{{ $t("請選擇提款账户") }}</div> |
| | | <van-cell |
| | |
| | | /> |
| | | <div v-if="rechargeSelect.key !== undefined"> |
| | | <div class="main-title">{{ $t("請選擇銀行卡") }}</div> |
| | | <van-cell is-link :title="bankCard.bankNo || $t('請選擇')" /> |
| | | <!-- <van-cell is-link :title="bankCard.bankName || $t('請選擇')" /> --> |
| | | <van-cell |
| | | is-link |
| | | :title="yhkrechargeSelect.bankName || $t('請選擇')" |
| | | @click="yhkshow = true" |
| | | /> |
| | | <van-action-sheet |
| | | v-model="yhkshow" |
| | | :actions="yhkactions" |
| | | :cancel-text="$t('hj106')" |
| | | close-on-click-action |
| | | @select="yhkselect" |
| | | /> |
| | | </div> |
| | | <div class="main-title">{{ $t("請選擇充值金額") }}</div> |
| | | <div class="main-title">{{ $t("请选择提现金额") }}</div> |
| | | <div class="white-input"> |
| | | <input type="number" :value="value" @input="inputValue" /> |
| | | <span class="myr" @click="value = availableBalanceUSD">{{ |
| | | $t("最大") |
| | | }}</span> |
| | | <span |
| | | class="myr" |
| | | @click="value = Math.floor(availableBalanceUSD * 100) / 100" |
| | | >{{ $t("最大") }}</span |
| | | > |
| | | </div> |
| | | <div> |
| | | <div class="dz-title" v-if="rechargeAccountData.key !== undefined"> |
| | | <div>餘額</div> |
| | | <div>{{ $t("可用餘額") }}</div> |
| | | <div class="balance-text"> |
| | | {{ availableBalanceUSD }} {{ symbolCode }} |
| | | {{ availableBalanceUSD | _toLocaleString }} {{ symbolCode }} |
| | | <!-- {{ symbolCode }} --> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- <div class="dz-title"> |
| | | <div>實際到帳</div> |
| | | <div class="balance-text">0.0000</div> |
| | | </div> --> |
| | | <!-- <div class="dz-title" v-if="rechargeAccountData.key !== undefined"> |
| | | <div>最小提款金額</div> |
| | | <div class="balance-text">0.0000</div> |
| | | </div> --> |
| | | </div> |
| | | <van-button |
| | | class="but" |
| | | type="primary" |
| | | style="margin-top: 1.04rem; margin-bottom: 1.04rem" |
| | | @click="setOutMoney" |
| | | :disabled="isclick" |
| | | >{{ $t("提款") }}</van-button |
| | | > |
| | | </main> |
| | |
| | | <script> |
| | | import { ActionSheet, Notify } from "vant"; |
| | | import ClipboardJS from "clipboard"; |
| | | import _ from "lodash"; |
| | | import { getBankCard, getMoney, outMoney } from "../../axios/api"; |
| | | |
| | | export default { |
| | |
| | | return { |
| | | value: 0, |
| | | |
| | | paymentSelectData: "US", |
| | | |
| | | paymentSelectData: "IN", |
| | | isclick: false, |
| | | show: false, |
| | | |
| | | yhkshow: false, |
| | | // 提款聚到 |
| | | rechargeSelect: {}, |
| | | yhkrechargeSelect: {}, |
| | | actions: [{ name: this.$t("hj215"), key: "YHK" }], |
| | | yhkactions: [], |
| | | paymentShow: false, |
| | | |
| | | rechargeAccountShow: false, |
| | | // 请选择提款账户 |
| | | rechargeAccountData: {}, |
| | | rechargeAccountActions: [ |
| | | // { |
| | | // name: this.$t("IN"), |
| | | // key: "IN", |
| | | // }, |
| | | { |
| | | name: this.$t("US"), |
| | | key: "US", |
| | | }, |
| | | { |
| | | name: this.$t("MAS"), |
| | | key: "MAS", |
| | | }, |
| | | name: "MEX", |
| | | key: "MEX" |
| | | } |
| | | // { |
| | | // name: this.$t("MAS"), |
| | | // key: "MAS", |
| | | // }, |
| | | // { |
| | | // name: this.$t("HK"), |
| | | // key: "HK", |
| | | // }, |
| | | ], |
| | | bankCard: {}, |
| | | |
| | | bankCard: [], |
| | | availableBalanceUSD: "0.0000", |
| | | getMoneyList: [], |
| | | assetsType: "", |
| | | symbolCode: "", |
| | | yhkid: "" |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | methods: { |
| | | async setOutMoney() { |
| | | if (this.isclick) return; |
| | | console.log("11111"); |
| | | const res = await outMoney({ |
| | | amt: this.value, |
| | | assetsType: this.accectType, |
| | | bankId: this.yhkid |
| | | }); |
| | | this.isclick = false; |
| | | if (res.status === 0) { |
| | | Notify({ type: "success", message: this.$t("提款成功,等待审核") }); |
| | | setTimeout(() => { |
| | | this.onClickLeft(); |
| | | }, 500); |
| | | Notify({ type: "success", message: this.$t("hj182") }); |
| | | // setTimeout(() => { |
| | | this.$router.push("/cashlist"); |
| | | // }, 500); |
| | | } else { |
| | | Notify(res.msg); |
| | | } |
| | |
| | | const res = await getBankCard(); |
| | | if (res.status === 0) { |
| | | this.bankCard = res.data; |
| | | this.yhkactions = res.data; |
| | | for (var i = 0; i < this.yhkactions.length; i++) { |
| | | this.yhkactions[i].name = this.yhkactions[i].bankName; |
| | | } |
| | | } |
| | | }, |
| | | async getMoneys() { |
| | | const res = await getMoney(); |
| | | if (res.status === 0) { |
| | | this.getMoneyList = res.data; |
| | | res.data.map((item) => { |
| | | res.data.map(item => { |
| | | if (item.accectType === this.rechargeAccountData.key) { |
| | | console.log(item.accectType, "assetsType1"); |
| | | this.availableBalanceUSD = item.availableBalance; |
| | | this.symbolCode = item.symbolCode; |
| | | this.accectType = item.accectType; |
| | |
| | | }, |
| | | copyText(e, data) { |
| | | var clipboard = new ClipboardJS(".copy-button", { |
| | | text: () => data, |
| | | text: () => data |
| | | }); |
| | | |
| | | clipboard.on("success", () => { |
| | |
| | | clipboard.onClick(e); |
| | | }, |
| | | onClickLeft() { |
| | | this.$router.push("/user"); |
| | | this.$router.push("/account"); |
| | | }, |
| | | yhkselect(e) { |
| | | this.yhkrechargeSelect = e; |
| | | this.yhkid = e.id; |
| | | console.log(e); |
| | | }, |
| | | select(e) { |
| | | this.rechargeSelect = e; |
| | |
| | | }, |
| | | rechargeAccountSelect(e) { |
| | | this.rechargeAccountData = e; |
| | | (this.getMoneyList || []).map((item) => { |
| | | (this.getMoneyList || []).map(item => { |
| | | if (item.accectType === this.rechargeAccountData.key) { |
| | | this.availableBalanceUSD = item.availableBalanceUSD; |
| | | this.availableBalanceUSD = item.availableBalance; |
| | | this.symbolCode = item.symbolCode; |
| | | this.accectType = item.accectType; |
| | | } |
| | |
| | | paymentSelect(e) { |
| | | this.paymentSelectData = e.name; |
| | | console.log(e); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | @green: #c4d600; |
| | | .but { |
| | | width: 100%; |
| | | color: #ffffff; |
| | | background-color: #1989fa; |
| | | background-color: @green; |
| | | border: none; |
| | | border-radius: 8px; |
| | | height: 66px; |
| | | font-size: 22px; |
| | |
| | | cursor: pointer; |
| | | } |
| | | .myr { |
| | | color: rgb(5, 106, 239); |
| | | color: @green; |
| | | cursor: pointer; |
| | | } |
| | | .dz-title { |
| | |
| | | color: #4f5257; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |