| | |
| | | import QRCode from "qrcode"; |
| | | import ListCoins from "@/components/my/listCoins.vue"; |
| | | import { Plus, CaretBottom, ArrowLeftBold } from "@element-plus/icons-vue"; |
| | | import Axios from "@/api/perpetualContract.js"; |
| | | |
| | | export default { |
| | | components: { Plus, CaretBottom, ListCoins }, |
| | |
| | | //充币 |
| | | handleRecharge() { |
| | | if (this.quantity && this.quantity > 0) { |
| | | Axios2.url("wap/api/rechargeBlockchain!recharge.action", { |
| | | session_token: this.session_token, |
| | | amount: this.quantity, |
| | | from: this.address, |
| | | blockchain_name: this.blockchain_name, |
| | | coin: this.coin, |
| | | channel_address: this.address, |
| | | tx: "", |
| | | img: this.rechargeImg, |
| | | }).then((res) => { |
| | | this.getSessionToken(); |
| | | if (res.code == "0") { |
| | | this.$message.success(this.$t("message.user.ti27")); |
| | | this.quantity = ""; |
| | | this.rechargeImg = ""; |
| | | this.oneImg = ""; |
| | | this.getRechargeRecord(); |
| | | } |
| | | }); |
| | | // Axios2.url("wap/api/rechargeBlockchain!recharge.action", { |
| | | // session_token: this.session_token, |
| | | // amount: this.quantity, |
| | | // from: this.address, |
| | | // blockchain_name: this.blockchain_name, |
| | | // coin: this.coin, |
| | | // channel_address: this.address, |
| | | // tx: "", |
| | | // img: this.rechargeImg, |
| | | // }) |
| | | Axios.rechargeBlockchainrecharge( |
| | | { |
| | | session_token: this.session_token, |
| | | amount: this.quantity, |
| | | from: this.address, |
| | | blockchain_name: this.blockchain_name, |
| | | coin: this.coin, |
| | | channel_address: this.address, |
| | | tx: "", |
| | | img: this.rechargeImg, |
| | | }, |
| | | false |
| | | ) |
| | | .then((res) => { |
| | | this.getSessionToken(); |
| | | console.log("请等待上一笔充值完成!", res); |
| | | |
| | | if (res.code == "0") { |
| | | this.$message.success(this.$t("message.user.ti27")); |
| | | this.quantity = ""; |
| | | this.rechargeImg = ""; |
| | | this.oneImg = ""; |
| | | this.getRechargeRecord(); |
| | | } else if (res.msg == "请等待上一笔充值完成!") { |
| | | this.$message.error(this.$t("message.user.ti28")); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.log(error, "11"); |
| | | if (error.data.msg == "请等待上一笔充值完成!") { |
| | | this.$message.error(this.$t("message.user.ti28")); |
| | | } |
| | | }); |
| | | } else { |
| | | this.$message.error(this.$t("message.user.xian33")); |
| | | } |