From ab3e84ca5e0aedf77bb2fc390be8a468ebb72cba Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Thu, 01 Aug 2024 18:15:45 +0800
Subject: [PATCH] 1
---
src/page/user/recharge-sure.vue | 128 +++++++++++++++++++++++++-----------------
1 files changed, 76 insertions(+), 52 deletions(-)
diff --git a/src/page/user/recharge-sure.vue b/src/page/user/recharge-sure.vue
index 3bd1f42..6ca9144 100644
--- a/src/page/user/recharge-sure.vue
+++ b/src/page/user/recharge-sure.vue
@@ -3,76 +3,86 @@
<van-nav-bar
:placeholder="true"
:safe-area-inset-top="true"
- title="提款"
+ :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">請選擇提款账户</div>
+ <div class="main-title">{{ $t("請選擇提款账户") }}</div>
<van-cell
is-link
- :title="rechargeAccountData.name || '請選擇'"
+ :title="rechargeAccountData.name || $t('請選擇')"
@click="rechargeAccountShow = true"
/>
<van-action-sheet
v-model="rechargeAccountShow"
:actions="rechargeAccountActions"
- cancel-text="取消"
+ :cancel-text="$t('hj106')"
close-on-click-action
@select="rechargeAccountSelect"
/>
- <div class="main-title">支持得提款渠道</div>
+ <div class="main-title">{{ $t("支持得提款渠道") }}</div>
<van-cell
is-link
- :title="rechargeSelect.name || '請選擇'"
+ :title="rechargeSelect.name || $t('請選擇')"
@click="show = true"
/>
<van-action-sheet
v-model="show"
:actions="actions"
- cancel-text="取消"
+ :cancel-text="$t('hj106')"
close-on-click-action
@select="select"
/>
<div v-if="rechargeSelect.key !== undefined">
- <div class="main-title">請選擇銀行卡</div>
- <van-cell is-link :title="bankCard.bankNo || '請選擇'" />
- <!-- @click="show = true" -->
- <!-- <van-action-sheet
- v-model="show"
- :actions="actions"
- cancel-text="取消"
+ <div class="main-title">{{ $t("請選擇銀行卡") }}</div>
+ <!-- <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="select"
- /> -->
+ @select="yhkselect"
+ />
</div>
- <div class="main-title">請選擇充值金額</div>
+ <div class="main-title">{{ $t("请选择提现金额") }}</div>
<div class="white-input">
<input type="number" :value="value" @input="inputValue" />
- <span class="myr" @click="value = availableBalanceUSD">最大</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 class="balance-text">{{ availableBalanceUSD }} USD</div>
+ <div>{{ $t("可用餘額") }}</div>
+ <div class="balance-text">
+ {{ 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"
- >提款</van-button
+ >{{ $t("提款") }}</van-button
>
</main>
</div>
@@ -89,13 +99,15 @@
return {
value: 0,
- paymentSelectData: "US",
+ paymentSelectData: "IN",
show: false,
-
+ yhkshow:false,
// 提款聚到
rechargeSelect: {},
- actions: [{ name: "銀行卡充值", key: "YHK" }],
+ yhkrechargeSelect: {},
+ actions: [{ name: this.$t("hj215"), key: "YHK" }],
+ yhkactions: [],
paymentShow: false,
rechargeAccountShow: false,
@@ -103,22 +115,25 @@
rechargeAccountData: {},
rechargeAccountActions: [
{
- name: "美股賬戶",
- key: "US",
- },
- {
- name: "印股帳戶",
+ name: this.$t("IN"),
key: "IN",
},
- {
- name: "馬股賬戶",
- key: "MAS",
- },
+ // {
+ // name: this.$t("MAS"),
+ // key: "MAS",
+ // },
+ // {
+ // name: this.$t("HK"),
+ // key: "HK",
+ // },
],
- bankCard: {},
+
+ bankCard: [],
availableBalanceUSD: "0.0000",
getMoneyList: [],
assetsType: "",
+ symbolCode: "",
+ yhkid:'',
};
},
mounted() {
@@ -127,15 +142,15 @@
},
methods: {
async setOutMoney() {
- console.log(this.assetsType);
const res = await outMoney({
amt: this.value,
assetsType: this.accectType,
+ bankId:this.yhkid
});
if (res.status === 0) {
- Notify({ type: "success", message: "提款成功,等待审核" });
+ Notify({ type: "success", message: this.$t("hj182") });
setTimeout(() => {
- this.onClickLeft();
+ this.$router.push("/cashlist");
}, 500);
} else {
Notify(res.msg);
@@ -149,6 +164,10 @@
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() {
@@ -157,8 +176,8 @@
this.getMoneyList = res.data;
res.data.map((item) => {
if (item.accectType === this.rechargeAccountData.key) {
- console.log(item.accectType, "assetsType1");
- this.availableBalanceUSD = item.availableBalanceUSD;
+ this.availableBalanceUSD = item.availableBalance;
+ this.symbolCode = item.symbolCode;
this.accectType = item.accectType;
}
});
@@ -183,6 +202,11 @@
onClickLeft() {
this.$router.push("/user");
},
+ yhkselect(e) {
+ this.yhkrechargeSelect = e;
+ this.yhkid = e.id
+ console.log(e);
+ },
select(e) {
this.rechargeSelect = e;
console.log(e);
@@ -191,8 +215,8 @@
this.rechargeAccountData = e;
(this.getMoneyList || []).map((item) => {
if (item.accectType === this.rechargeAccountData.key) {
- console.log(item.accectType, "accectType2", item);
- this.availableBalanceUSD = item.availableBalanceUSD;
+ this.availableBalanceUSD = item.availableBalance;
+ this.symbolCode = item.symbolCode;
this.accectType = item.accectType;
}
});
@@ -345,4 +369,4 @@
color: #4f5257;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3