| | |
| | | <template> |
| | | <div> |
| | | <van-nav-bar |
| | | :placeholder="true" |
| | | :safe-area-inset-top="true" |
| | | :title="$t('提款')" |
| | | left-arrow |
| | | @click-left="onClickLeft" |
| | | > |
| | | <van-nav-bar :placeholder="true" :safe-area-inset-top="true" :title="$t('提款')" left-arrow @click-left="onClickLeft"> |
| | | <template #right> |
| | | <van-icon |
| | | @click="$router.push('/cashlist')" |
| | | name="orders-o" |
| | | size="20" |
| | | /> |
| | | <van-icon @click="$router.push('/cashlist')" name="orders-o" size="20" /> |
| | | </template> |
| | | </van-nav-bar> |
| | | <main> |
| | | <div class="main-title">{{ $t("請選擇提款账户") }}</div> |
| | | <van-cell |
| | | is-link |
| | | :title="rechargeAccountData.name || $t('請選擇')" |
| | | @click="rechargeAccountShow = true" |
| | | /> |
| | | <van-action-sheet |
| | | v-model="rechargeAccountShow" |
| | | :actions="rechargeAccountActions" |
| | | :cancel-text="$t('hj106')" |
| | | close-on-click-action |
| | | @select="rechargeAccountSelect" |
| | | /> |
| | | <van-cell is-link :title="rechargeAccountData.name || $t('請選擇')" @click="rechargeAccountShow = true" /> |
| | | <van-action-sheet v-model="rechargeAccountShow" :actions="rechargeAccountActions" :cancel-text="$t('hj106')" |
| | | close-on-click-action @select="rechargeAccountSelect" /> |
| | | |
| | | <div class="main-title">{{ $t("支持得提款渠道") }}</div> |
| | | <van-cell |
| | | is-link |
| | | :title="rechargeSelect.name || $t('請選擇')" |
| | | @click="show = true" |
| | | /> |
| | | <van-action-sheet |
| | | v-model="show" |
| | | :actions="actions" |
| | | :cancel-text="$t('hj106')" |
| | | close-on-click-action |
| | | @select="select" |
| | | /> |
| | | <div v-if="rechargeSelect.key !== undefined"> |
| | | <van-cell is-link :title="rechargeSelect.name || $t('請選擇')" @click="show = true" /> |
| | | <van-action-sheet v-model="show" :actions="actions" :cancel-text="$t('hj106')" close-on-click-action |
| | | @select="select" /> |
| | | |
| | | <!-- <div v-if="rechargeSelect.key !== undefined"> |
| | | <div class="main-title">{{ $t("請選擇銀行卡") }}</div> |
| | | <!-- <van-cell is-link :title="bankCard.bankName || $t('請選擇')" /> --> |
| | | <van-cell |
| | | is-link |
| | | :title="yhkrechargeSelect.bankName || $t('請選擇')" |
| | | :title="yhkrechargeSelect.bankName || $t('請選擇')" |
| | | @click="yhkshow = true" |
| | | /> |
| | | <van-action-sheet |
| | |
| | | close-on-click-action |
| | | @select="yhkselect" |
| | | /> |
| | | </div> --> |
| | | |
| | | <div v-if="rechargeSelect.key == 'YHK'"> |
| | | <div class="main-title">{{ $t("hj213") }}</div> |
| | | <van-cell> |
| | | <input type="text" v-model="editForm.bankName" :placeholder="$t('hj218')" class="form-input" /> |
| | | </van-cell> |
| | | <div class="main-title">{{ $t("分行名称") }}</div> |
| | | <van-cell> |
| | | <input type="text" v-model="editForm.bankAddress" :placeholder="$t('分行名称')" class="form-input" /> |
| | | </van-cell> |
| | | <div class="main-title">{{ $t("分行代码") }}</div> |
| | | <van-cell> |
| | | <input type="text" v-model="editForm.branchCode" :placeholder="$t('分行代码')" class="form-input" /> |
| | | </van-cell> |
| | | <div class="main-title">{{ $t("账户号码") }}</div> |
| | | <van-cell> |
| | | <input type="text" v-model="editForm.bankId" :placeholder="$t('账户号码')" class="form-input" /> |
| | | </van-cell> |
| | | <div class="main-title">{{ $t("账户持有人姓名") }}</div> |
| | | <van-cell> |
| | | <input type="text" v-model="editForm.cardholderName" :placeholder="$t('hj316')" class="form-input" /> |
| | | </van-cell> |
| | | </div> |
| | | |
| | | <div v-else-if="rechargeSelect.key == 'USDT'"> |
| | | <div class="main-title">{{ $t("地址") }}</div> |
| | | <van-cell> |
| | | <input type="text" v-model="editForm.bankId" :placeholder="$t('地址')" class="form-input" /> |
| | | </van-cell> |
| | | </div> |
| | | |
| | | <div class="main-title">{{ $t("请选择提现金额") }}</div> |
| | | <div class="white-input"> |
| | | <input type="number" :value="value" @input="inputValue" /> |
| | | <span |
| | | class="myr" |
| | | @click="value = Math.floor(availableBalanceUSD * 100) / 100" |
| | | >{{ $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> |
| | | <van-button |
| | | class="but" |
| | | type="primary" |
| | | style="margin-top: 1.04rem; margin-bottom: 1.04rem" |
| | | @click="setOutMoney" |
| | | :disabled="isclick" |
| | | >{{ $t("提款") }}</van-button |
| | | > |
| | | <van-button class="but" type="primary" style="margin-top: 1.04rem; margin-bottom: 1.04rem" @click="setOutMoney" |
| | | :disabled="isclick">{{ $t("提款") }}</van-button> |
| | | </main> |
| | | </div> |
| | | </template> |
| | |
| | | <script> |
| | | import { ActionSheet, Notify } from "vant"; |
| | | import ClipboardJS from "clipboard"; |
| | | import _ from 'lodash'; |
| | | import _ from "lodash"; |
| | | import { getBankCard, getMoney, outMoney } from "../../axios/api"; |
| | | |
| | | export default { |
| | |
| | | value: 0, |
| | | |
| | | paymentSelectData: "IN", |
| | | isclick:false, |
| | | isclick: false, |
| | | show: false, |
| | | yhkshow:false, |
| | | yhkshow: false, |
| | | // 提款聚到 |
| | | rechargeSelect: {}, |
| | | yhkrechargeSelect: {}, |
| | | actions: [{ name: this.$t("hj215"), key: "YHK" }], |
| | | actions: [{ name: this.$t("hj215"), key: "YHK" },{ name: "USDT", key: "USDT" }], |
| | | yhkactions: [], |
| | | paymentShow: false, |
| | | |
| | |
| | | rechargeAccountData: {}, |
| | | rechargeAccountActions: [ |
| | | { |
| | | name: this.$t("IN"), |
| | | key: "IN", |
| | | name: this.$t("US"), |
| | | key: "US" |
| | | }, |
| | | // { |
| | | // name: this.$t("MAS"), |
| | | // key: "MAS", |
| | | // }, |
| | | // { |
| | | // name: this.$t("HK"), |
| | | // key: "HK", |
| | | // }, |
| | | { |
| | | name: this.$t("日股账户"), |
| | | key: "JP" |
| | | }, |
| | | ], |
| | | |
| | | bankCard: [], |
| | |
| | | getMoneyList: [], |
| | | assetsType: "", |
| | | symbolCode: "", |
| | | yhkid:'', |
| | | yhkid: "", |
| | | // 提款银行信息 |
| | | editForm: { |
| | | bankName: "", |
| | | bankAddress: "", |
| | | branchCode: "", |
| | | bankId: "", |
| | | cardholderName: "", |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getykh(); |
| | | this.getMoneys(); |
| | | // this.getykh(); // 获取绑定银行卡 |
| | | this.getMoneys(); // 获取账户余额 |
| | | }, |
| | | methods: { |
| | | async setOutMoney() { |
| | | if (this.isclick) return; |
| | | console.log('11111'); |
| | | const res = await outMoney({ |
| | | amt: this.value, |
| | | assetsType: this.accectType, |
| | | bankId:this.yhkid |
| | | // bankId: this.yhkid |
| | | ...this.editForm |
| | | }); |
| | | this.isclick = false; |
| | | if (res.status === 0) { |
| | | Notify({ type: "success", message: this.$t("hj182") }); |
| | | // setTimeout(() => { |
| | | this.$router.push("/cashlist"); |
| | | 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 |
| | | this.yhkactions = res.data; |
| | | for (var i = 0; i < this.yhkactions.length; i++) { |
| | | this.yhkactions[i].name = this.yhkactions[i].bankName; |
| | | } |
| | | } |
| | | }, |
| | |
| | | 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) { |
| | | this.availableBalanceUSD = item.availableBalance; |
| | | this.symbolCode = item.symbolCode; |
| | |
| | | }, |
| | | 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.go(-1); |
| | | }, |
| | | yhkselect(e) { |
| | | this.yhkrechargeSelect = e; |
| | | this.yhkid = e.id |
| | | this.yhkid = e.id; |
| | | console.log(e); |
| | | }, |
| | | select(e) { |
| | | // 切换渠道时清空表单 |
| | | this.editForm = { |
| | | bankName: "", |
| | | bankAddress: "", |
| | | branchCode: "", |
| | | bankId: "", |
| | | cardholderName: "", |
| | | }; |
| | | this.rechargeSelect = e; |
| | | console.log(e); |
| | | }, |
| | | rechargeAccountSelect(e) { |
| | | this.rechargeAccountData = e; |
| | | (this.getMoneyList || []).map((item) => { |
| | | (this.getMoneyList || []).map(item => { |
| | | if (item.accectType === this.rechargeAccountData.key) { |
| | | this.availableBalanceUSD = item.availableBalance; |
| | | this.symbolCode = item.symbolCode; |
| | |
| | | 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; |
| | | } |
| | | |
| | | .bottom-text { |
| | | width: 100%; |
| | | background-color: #fff; |
| | | padding: 0.26667rem 0.37333rem; |
| | | box-sizing: border-box; |
| | | margin-top: 0.26667rem; |
| | | |
| | | // margin-bottom: 80px; |
| | | .balance { |
| | | display: flex; |
| | |
| | | font-style: normal; |
| | | font-weight: 500; |
| | | box-sizing: border-box; |
| | | |
| | | .balance-text { |
| | | color: #181818; |
| | | font-family: PingFang SC; |
| | |
| | | margin-bottom: 0.37333rem; |
| | | } |
| | | } |
| | | |
| | | .division { |
| | | width: 100%; |
| | | height: 0.02667rem; |
| | |
| | | background-color: #e5e8ed; |
| | | margin: 0.37333rem 0; |
| | | } |
| | | |
| | | .upload-text { |
| | | color: #181818; |
| | | font-family: PingFang SC; |
| | |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | |
| | | /deep/ .van-nav-bar__content { |
| | | height: 65px; |
| | | } |
| | | |
| | | /deep/ .van-nav-bar__title { |
| | | font-family: "DINPro"; |
| | | width: 100%; |
| | |
| | | font-size: 0.48rem; |
| | | color: #14181f; |
| | | } |
| | | |
| | | /deep/ .van-cell { |
| | | list-style: none; |
| | | width: 100%; |
| | |
| | | margin-top: 0.26667rem; |
| | | box-shadow: 0 0.16rem 0.32rem #eaeaea99; |
| | | } |
| | | |
| | | main { |
| | | padding: 0 0.4rem 0.53333rem; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .main-title { |
| | | font-style: normal; |
| | | font-weight: 400; |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .fuzhi { |
| | | font-size: 28px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .myr { |
| | | color: rgb(5, 106, 239); |
| | | color: @green; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .dz-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | margin-top: 0.31333rem; |
| | | padding: 0 0.13333rem; |
| | | box-sizing: border-box; |
| | | |
| | | .balance-text { |
| | | font-style: normal; |
| | | font-weight: 500; |