| | |
| | | ref="copytxt" |
| | | readonly |
| | | class="css-vurnku noborder" |
| | | style="width: 320px" |
| | | style="width: 320px; color: #959595" |
| | | /> |
| | | <!-- 复制icon --> |
| | | <div class="css-c1olmu"> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 充币数量 --> |
| | | <!-- <div class="css-1oi6dii"> |
| | | <div class="css-1oi6dii"> |
| | | <div class="css-1x9w05y"> |
| | | {{ $t("message.user.ti6") }} |
| | | </div> |
| | |
| | | v-model="quantity" |
| | | ></el-input> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <!-- 上传凭证 --> |
| | | <!-- <div class="css-1oi6dii"> --> |
| | | <!-- <div class="css-1x9w05y"> |
| | |
| | | <!-- </div> --> |
| | | <!-- </div> --> |
| | | <!-- 充币按钮 --> |
| | | <!-- <div class="css-1oi6dii"> |
| | | <div class="css-1oi6dii"> |
| | | <div class="css-1x9w05y"></div> |
| | | <div style="display: flex; width: 100%"> |
| | | <el-button |
| | |
| | | {{ $t("message.user.ti8") }}</el-button |
| | | > |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <!-- 充值未到账 --> |
| | | <div class="css-107bu5v"> |
| | |
| | | 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 }, |
| | |
| | | listTitle: this.$t("message.user.ti24"), |
| | | listOpData: [ |
| | | { icon: "usdt", name: "USDT" }, |
| | | { icon: "usdc", name: "USDC" }, |
| | | { icon: "btc", name: "BTC" }, |
| | | { icon: "eth", name: "ETH" }, |
| | | ], |
| | |
| | | coin: "USDT", |
| | | address: "", |
| | | codeImg: "", |
| | | blockchain: {}, |
| | | blockchain: [], |
| | | imgURl: "", |
| | | m_showCode: true, |
| | | quantity: "", //充币数量 |
| | |
| | | ); |
| | | }, |
| | | getAddress() { |
| | | Axios2.url("wap/api/channelBlockchain!getBlockchainName.action", { |
| | | // channelBlockchain!getBlockchainName.action pc接口 |
| | | // user!appList app接口 |
| | | Axios2.url("wap/api/user!appList", { |
| | | coin: this.coin, |
| | | }).then((res) => { |
| | | this.blockchain = res.data; |
| | | const elarr = res.data.page.elements; |
| | | this.listOpData1 = []; |
| | | for (var i in res.data) { |
| | | this.listOpData1.push({ |
| | | icon: res.data[i].coin, |
| | | name: res.data[i].blockchain_name, |
| | | }); |
| | | for (var i in elarr) { |
| | | if ( |
| | | this.listOpData[this.biChooseIndex].name == |
| | | elarr[i].coin.toUpperCase() |
| | | ) { |
| | | this.listOpData1.push({ |
| | | icon: elarr[i].coin, |
| | | name: elarr[i].blockchain_name, |
| | | ...elarr[i], |
| | | }); |
| | | } |
| | | } |
| | | this.blockchain = this.listOpData1; |
| | | this.blockchainIndex = 0; |
| | | this.address = this.blockchain[0].address; |
| | | this.imgURl = this.mounted(this.blockchain[0].address); //TODO 接口返回的地址有问题 |
| | |
| | | //充币 |
| | | 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")); |
| | | } |