diff --git a/components/navigation/navigation.vue b/components/navigation/navigation.vue index b3ab5bf..528cdd2 100644 --- a/components/navigation/navigation.vue +++ b/components/navigation/navigation.vue @@ -10,11 +10,22 @@ + + {{ langTrue }} + + + + + + + - - + // window.open(res.msg, '_blank'); + uni.navigateTo({ + url:'/pages/recharge/outPage?url='+res.msg + }) + // #endif + } + if (res.code == 1) { + uni.$u.toast(res.msg) + } + setTimeout(() => { + this.getRechargeInfo() + }, 1200) + }) + }, + // 获取选择充值的钱 + getAmount(t, i) { + this.onlineInfo.tranAmt = t + }, + // 获取充值类型 + getCoinType(t, i) { + this.onlineInfo.payType = t.payType + }, + radioChange(e) { + console.log(e); + this.coin = e.enname + this.coinCode = e.code + //#ifdef H5 + this.message = this.i18n.message.replace('{rechargeMinAmount}', e.rechargeMinAmount).replaceAll('{enname}',e.enname) + console.log(this.message) + console.log(this.i18n.message.replace('{rechargeMinAmount}', e.rechargeMinAmount)) + //#endif + //#ifdef APP-PLUS + let message1 = this.i18n.message.replace('{rechargeMinAmount}', e.rechargeMinAmount) + this.message = message1.replace('{enname}',e.enname) + //#endif + if (!e.address) { + let coinInfo = { + coinCode: e.code + } + // 返回的币种没有充值地址就用接口传code换取虚拟币充值地址 + api.rechargeAddress(coinInfo).then(res => { + this.coinAddress = res.address + this.qr = QR.createQrCodeImg(this.coinAddress) + }) + } else { + this.coinAddress = e.address + this.qr = QR.createQrCodeImg(this.coinAddress) + } + }, + // 获取二维码 + getQr(e) { + this.qr = QR.createQrCodeImg(e) + }, + getRechargeInfo(e) { + api.rechargeConfig({ + type: this.pageState + }).then(res => { + this.reInfo = res + if (this.pageState == 'crypto') { + // if (this.reInfo.coins[0].address) { + // this.coinAddress = this.reInfo.coins[0].address + // let img = this.reInfo.coins[0].address + // this.coin = this.$i18n.PleaseChooseCoin + // this.coinCode = this.reInfo.coins[0].code + // this.getQr(img) + this.coinAddress = this.i18n.PleaseChooseCoin; + this.coin = this.i18n.PleaseChooseCoin + this.qr = QR.createQrCodeImg(this.i18n.PleaseChooseCoin) + this.message = this.i18n.message.replace('{rechargeMinAmount}', '').replaceAll( + '{enname}', '') + // } else { + // let coinInfo = { + // coinCode: this.reInfo.coins[0].code + // } + // // 返回的币种没有充值地址就用接口传code换取虚拟币充值地址 + // api.rechargeAddress(coinInfo).then(res => { + // this.coinAddress = res.address + // this.qr = this.getQr(this.coinAddress) + // this.rechargeMinAmount = res.rechargeMinAmount + // this.enname = res.enname + // }) + // } + } else { + this.reInfo.fastAmount = this.reInfo.fastAmount.split(',') + this.onlineInfo.tranAmt = this.reInfo.fastAmount[0] + this.onlineInfo.payType = this.reInfo.payTypes[0].payType + // + this.inputText=this.reInfo.payTypes[0] + } + + + }) + }, + goto(page) { + // console.log(page); + let url = ''; + switch (page) { + case 'rechargeRecord': + url = '/pages/recharge/rechargeRecord' + break; + default: + break; + } + if (url) { + // console.log(url); + uni.navigateTo({ + url, + }); + } + + }, + USDTRadioChange(e) { + + console.log(e); + }, + + copyAddress(value = "") { + console.log(value) + uniCopy({ + content: value, + success: (res) => { + uni.showToast({ + title: this.i18n.CopySuccess, + duration: 3000, + }) + }, + error: (e) => { + uni.showToast({ + title: e, + icon: 'none', + duration: 2000, + }) + } + }) + }, + + }, + } + + + \ No newline at end of file diff --git a/static/recharge/ic_link.png b/static/recharge/ic_link.png new file mode 100644 index 0000000..9e3021b Binary files /dev/null and b/static/recharge/ic_link.png differ diff --git a/static/recharge/img_add.png b/static/recharge/img_add.png new file mode 100644 index 0000000..66ff931 Binary files /dev/null and b/static/recharge/img_add.png differ diff --git a/utils/language/en_US.js b/utils/language/en_US.js index 6891bd8..6514ca0 100644 --- a/utils/language/en_US.js +++ b/utils/language/en_US.js @@ -194,6 +194,7 @@ export default { Record: 'Record', CoinRecharge: 'Coin Recharge', CashRecharge: 'Cash Recharge ', + OfflineRecharge: 'Offline Recharge', PleaseChooseCoin: 'Please choose coin', CoinDepositAddress: 'Coin deposit address', CopyAddress: 'Copy address', @@ -215,6 +216,25 @@ export default { Pickup: 'Pick up', USDTRate: 'USDT Rate', USDT: 'USDT', + FillTransactionInformation:'Fill in transaction information', + Buy:'BUY', + Minimal:'Minimal', + Pay:'PAY', + MarketPrice:'Market price', + TransactionDetails:'Transaction details', + BankAccountTransfer:'Bank Account Transfer', + TransferInfoTip:'Please transfer to the following bank account', + StandardBank:'Standard bank', + BankAccountNo:'Bank Account No', + BankAccount:'Bank Account', + PaymentAmount:'Payment Amount', + TransactionConfirmation:'Transaction confirmation', + PayerName:'Payer Name', + ProofPayment:'Proof of payment', + TransferUploadTip:'Please upload your proof of payment after the bank account transfer is completed.', + Copy: 'Copy', + SubmitSuccess: 'Submit success', + }, //mine diff --git a/utils/language/vi_VN.js b/utils/language/vi_VN.js index 41a6a63..73f639e 100644 --- a/utils/language/vi_VN.js +++ b/utils/language/vi_VN.js @@ -191,6 +191,7 @@ export default { Record: 'Ghi lại', CoinRecharge: 'nạp tiền kỹ thuật số', CashRecharge: 'nạp tiền', + OfflineRecharge: 'Nạp tiền ngoại tuyến', PleaseChooseCoin: 'Vui lòng chọn đơn vị tiền tệ', CoinDepositAddress: 'Địa chỉ gửi tiền', CopyAddress: 'sao chép địa chỉ', @@ -211,6 +212,24 @@ export default { Pickup: 'cất đi', USDTRate: 'Tỷ giá hối đoái USDT', USDT: 'USDT', + FillTransactionInformation:'Điền thông tin giao dịch', + Buy:'Mua', + Minimal:'Tối thiểu', + Pay:'Trả', + MarketPrice:'Giá thị trường', + TransactionDetails:'Chi tiết giao dịch', + BankAccountTransfer:'Chuyển khoản Ngân hàng', + TransferInfoTip:'Vui lòng chuyển vào tài khoản ngân hàng sau', + StandardBank:'Ngân hàng', + BankAccountNo:'Số tài khoản ngân hàng', + BankAccount:'Tài khoản Ngân hàng', + PaymentAmount:'Số tiền thanh toán', + TransactionConfirmation:'Xác nhận Giao dịch', + PayerName:'Tên người trả tiền', + ProofPayment:'Bằng chứng thanh toán', + TransferUploadTip:'Vui lòng tải lên bằng chứng thanh toán của bạn sau khi chuyển khoản ngân hàng hoàn tất.', + Copy: 'sao chép', + SubmitSuccess: 'Gửi thành công', }, //mine diff --git a/utils/language/zh_TW.js b/utils/language/zh_TW.js index c2af67b..a5570ec 100644 --- a/utils/language/zh_TW.js +++ b/utils/language/zh_TW.js @@ -196,6 +196,7 @@ export default { Record: '記錄', CoinRecharge: '數字貨幣充值', CashRecharge: '現金充值', + OfflineRecharge: '線下充值', PleaseChooseCoin: '請選擇幣種', CoinDepositAddress: '充幣地址', CopyAddress: '複製地址', @@ -217,6 +218,24 @@ export default { Pickup: '收起', USDTRate: 'USDT 匯率', USDT: 'USDT', + FillTransactionInformation:'填寫交易信息', + Buy:'買', + Minimal:'最小', + Pay:'支付', + MarketPrice:'市場價格', + TransactionDetails:'交易詳情', + BankAccountTransfer:'銀行賬戶轉賬', + TransferInfoTip:'請轉賬到以下銀行賬戶', + StandardBank:'銀行', + BankAccountNo:'銀行帳號', + BankAccount:'銀行賬戶', + PaymentAmount:'支付金額', + TransactionConfirmation:'交易確認', + PayerName:'付款人姓名', + ProofPayment:'付款證明', + TransferUploadTip:'請在銀行賬戶轉賬完成後上傳您的付款證明。', + Copy: '複製', + SubmitSuccess: '提交成功', }, //mine