|
|
@ -8,103 +8,105 @@ |
|
|
</navigation> |
|
|
</navigation> |
|
|
<!-- headBtn --> |
|
|
<!-- headBtn --> |
|
|
|
|
|
|
|
|
<!-- #ifdef H5 --> |
|
|
<!-- #ifdef H5 --> |
|
|
<view class="head" style="margin-top: 120rpx;"> |
|
|
<view class="head" style="margin-top: 120rpx;"> |
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
<!-- #ifdef APP-PLUS --> |
|
|
|
|
|
<view class="head"> |
|
|
<!-- #endif --> |
|
|
<!-- #endif --> |
|
|
<!-- #ifdef APP-PLUS --> |
|
|
|
|
|
<view class="head"> |
|
|
|
|
|
<!-- #endif --> |
|
|
|
|
|
|
|
|
|
|
|
<view class="headItem" @click="pageState = 'crypto',getRechargeInfo()" |
|
|
<view class="headItem" @click="pageState = 'crypto',getRechargeInfo()" |
|
|
:class="{ select: pageState === 'crypto' }"> |
|
|
:class="{ select: pageState === 'crypto' }"> |
|
|
{{ i18n.CoinRecharge }} |
|
|
{{ i18n.CoinRecharge }} |
|
|
</view> |
|
|
|
|
|
<view class="headItem" @click="pageState = 'online',getRechargeInfo()" |
|
|
|
|
|
:class="{ select: pageState === 'online' }"> |
|
|
|
|
|
{{ i18n.CashRecharge }} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="coinContent" v-if="pageState === 'crypto'"> |
|
|
|
|
|
<!-- coin选择框 --> |
|
|
|
|
|
<view class="input-item"> |
|
|
|
|
|
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none" |
|
|
|
|
|
:placeholder="i18n.PleaseChooseCoin" :disabled="true"> |
|
|
|
|
|
</u-input> |
|
|
|
|
|
<view class="selectCoinBtn" @click="USDTPopupShow = true">{{coin}} |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="headItem" @click="pageState = 'online',getRechargeInfo()" |
|
|
|
|
|
:class="{ select: pageState === 'online' }"> |
|
|
<view class="coin-item"> |
|
|
{{ i18n.CashRecharge }} |
|
|
<view class="QRCode"> |
|
|
|
|
|
<u-image class="QRCodeImg" :src="qr" width="310rpx" height="310rpx"> |
|
|
|
|
|
</u-image> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="CoinAddressTitle">{{ i18n.CoinDepositAddress }}</view> |
|
|
|
|
|
<view class="Copy" @click="copyAddress(coinAddress)">{{ i18n.CopyAddress }}</view> |
|
|
|
|
|
<view class="CoinAddress">{{ coinAddress }}</view> |
|
|
|
|
|
<u-divider text="" :dashed="true"></u-divider> |
|
|
|
|
|
<view class="ScanQR">{{ i18n.ScanQR }}</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="message-item"> |
|
|
<view class="coinContent" v-if="pageState === 'crypto'"> |
|
|
{{ i18n.message }} |
|
|
<!-- coin选择框 --> |
|
|
</view> |
|
|
<view class="input-item"> |
|
|
|
|
|
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none" |
|
|
<!-- USDT按钮通知弹出层 --> |
|
|
:placeholder="i18n.PleaseChooseCoin" :disabled="true"> |
|
|
<u-popup class="USDTPopup" :show="USDTPopupShow" round="40rpx" mode="bottom" @close="USDTPopupShow = false" |
|
|
</u-input> |
|
|
@open="USDTPopupShow = true" bgColor="#211F32"> |
|
|
<view class="selectCoinBtn" @click="USDTPopupShow = true">{{coin}} |
|
|
<view class="content"> |
|
|
</view> |
|
|
<view class="close" @click="USDTPopupShow = false"></view> |
|
|
|
|
|
<scroll-view scroll-y="true" style="height: 432rpx;" scroll-with-animation="true" |
|
|
|
|
|
@touchmove.stop.prevent=""> |
|
|
|
|
|
<radio-group class="radioGroup" @change="USDTRadioChange" v-model="USDTRadioValue"> |
|
|
|
|
|
<label class="checkBox" v-for="(item, index) in reInfo.coins" :key="index" |
|
|
|
|
|
@click="radioChange(item)"> |
|
|
|
|
|
<view class="icon"> |
|
|
|
|
|
<u-icon :name="baseURL+'/coins/'+item.code+'.png'" size="52rpx" width="52rpx"> |
|
|
|
|
|
</u-icon> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="iconName"> |
|
|
|
|
|
<view class="top">{{item.enname}}</view> |
|
|
|
|
|
<view class="bottom">{{item.useCapital}}{{" "}}{{item.code}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<radio color="#00E8A2" shape="square" :checked="coin==item.enname"></radio> |
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
|
|
|
|
</radio-group> |
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
|
|
|
<u-button class="button" color="#00E8A2" throttleTime="500" @click="USDTPopupShow = false">OK |
|
|
|
|
|
</u-button> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</u-popup> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="cashContent" v-if="pageState === 'online'"> |
|
|
<view class="coin-item"> |
|
|
<view class="enter"> |
|
|
<view class="QRCode"> |
|
|
<view class="selectTitle">{{ i18n.selectAmount }}</view> |
|
|
<u-image class="QRCodeImg" :src="qr" width="310rpx" height="310rpx"> |
|
|
<view class="numberSelect"> |
|
|
</u-image> |
|
|
<view :class="{ select: item === onlineInfo.tranAmt }" class="item" v-for="item,index in reInfo.fastAmount" @click="getAmount(item,index)"> |
|
|
|
|
|
{{item}}{{coinTypeInfo.system_coin_code}} |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="CoinAddressTitle">{{ i18n.CoinDepositAddress }}</view> |
|
|
|
|
|
<view class="Copy" @click="copyAddress(coinAddress)">{{ i18n.CopyAddress }}</view> |
|
|
|
|
|
<view class="CoinAddress">{{ coinAddress }}</view> |
|
|
|
|
|
<u-divider text="" :dashed="true"></u-divider> |
|
|
|
|
|
<view class="ScanQR">{{ i18n.ScanQR }}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="message-item"> |
|
|
|
|
|
{{ i18n.message }} |
|
|
</view> |
|
|
</view> |
|
|
<input class="input" v-model="onlineInfo.tranAmt" focus :placeholder="i18n.EnterNumber" |
|
|
|
|
|
placeholder-style="color:#A1A0A8" /> |
|
|
<!-- USDT按钮通知弹出层 --> |
|
|
|
|
|
<u-popup class="USDTPopup" :show="USDTPopupShow" round="40rpx" mode="bottom" |
|
|
|
|
|
@close="USDTPopupShow = false" @open="USDTPopupShow = true" bgColor="#211F32"> |
|
|
|
|
|
<view class="content"> |
|
|
|
|
|
<view class="close" @click="USDTPopupShow = false"></view> |
|
|
|
|
|
<scroll-view scroll-y="true" style="height: 432rpx;" scroll-with-animation="true" |
|
|
|
|
|
@touchmove.stop.prevent=""> |
|
|
|
|
|
<radio-group class="radioGroup" @change="USDTRadioChange" v-model="USDTRadioValue"> |
|
|
|
|
|
<label class="checkBox" v-for="(item, index) in reInfo.coins" :key="index" |
|
|
|
|
|
@click="radioChange(item)"> |
|
|
|
|
|
<view class="icon"> |
|
|
|
|
|
<u-icon :name="baseURL+'/coins/'+item.code+'.png'" size="52rpx" width="52rpx"> |
|
|
|
|
|
</u-icon> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="iconName"> |
|
|
|
|
|
<view class="top">{{item.enname}}</view> |
|
|
|
|
|
<view class="bottom">{{item.useCapital}}{{" "}}{{item.code}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<radio color="#00E8A2" shape="square" :checked="coin==item.enname"></radio> |
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
|
|
|
|
</radio-group> |
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
|
|
|
<u-button class="button" color="#00E8A2" throttleTime="500" @click="USDTPopupShow = false">OK |
|
|
|
|
|
</u-button> |
|
|
|
|
|
</view> |
|
|
|
|
|
</u-popup> |
|
|
</view> |
|
|
</view> |
|
|
<view class="RechargeMethod"> |
|
|
|
|
|
<view class="methodTitle">{{ i18n.RechargeMethod }}</view> |
|
|
<view class="cashContent" v-if="pageState === 'online'"> |
|
|
<view class="methodSelect"> |
|
|
<view class="enter"> |
|
|
<view class="item" v-for="item,index in reInfo.payTypes" :class="{ select:item.payType === onlineInfo.payType }" @click="getCoinType(item,index)" > |
|
|
<view class="selectTitle">{{ i18n.selectAmount }}</view> |
|
|
{{item.typeName}} |
|
|
<view class="numberSelect"> |
|
|
|
|
|
<view :class="{ select: item === onlineInfo.tranAmt }" class="item" |
|
|
|
|
|
v-for="item,index in reInfo.fastAmount" @click="getAmount(item,index)"> |
|
|
|
|
|
{{item}}{{coinTypeInfo.system_coin_code}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<input class="input" v-model="onlineInfo.tranAmt" focus :placeholder="i18n.EnterNumber" |
|
|
|
|
|
placeholder-style="color:#A1A0A8" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="RechargeMethod"> |
|
|
|
|
|
<view class="methodTitle">{{ i18n.RechargeMethod }}</view> |
|
|
|
|
|
<view class="methodSelect"> |
|
|
|
|
|
<view class="item" v-for="item,index in reInfo.payTypes" |
|
|
|
|
|
:class="{ select:item.payType === onlineInfo.payType }" @click="getCoinType(item,index)"> |
|
|
|
|
|
{{item.typeName}} |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<u-button class="button" color="#00E8A2" throttleTime="500" @click="recharge">{{ i18n.Submit }} |
|
|
<u-button class="button" color="#00E8A2" throttleTime="500" @click="recharge">{{ i18n.Submit }} |
|
|
</u-button> |
|
|
</u-button> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
@ -155,21 +157,32 @@ |
|
|
onShow() {}, |
|
|
onShow() {}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 法币充值 |
|
|
// 法币充值 |
|
|
recharge(){ |
|
|
recharge() { |
|
|
api.recharge(this.onlineInfo).then(res => { |
|
|
api.recharge(this.onlineInfo).then(res => { |
|
|
uni.$u.toast(this.$t("login").Rechargesucceeded) |
|
|
// uni.$u.toast(this.$t("login").Rechargesucceeded) |
|
|
setTimeout(()=>{ |
|
|
if (res.code == 0) { |
|
|
this.getRechargeInfo() |
|
|
// #ifdef APP-PLUS |
|
|
},1200) |
|
|
plus.runtime.openURL(res.msg); |
|
|
|
|
|
// #endif |
|
|
|
|
|
// #ifdef H5 |
|
|
|
|
|
window.location.href = res.msg |
|
|
|
|
|
// #endif |
|
|
|
|
|
} |
|
|
|
|
|
if (res.code == 1) { |
|
|
|
|
|
uni.$u.toast(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.getRechargeInfo() |
|
|
|
|
|
}, 1200) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 获取选择充值的钱 |
|
|
// 获取选择充值的钱 |
|
|
getAmount(t,i) { |
|
|
getAmount(t, i) { |
|
|
this.onlineInfo.tranAmt=t |
|
|
this.onlineInfo.tranAmt = t |
|
|
}, |
|
|
}, |
|
|
// 获取充值类型 |
|
|
// 获取充值类型 |
|
|
getCoinType(t,i){ |
|
|
getCoinType(t, i) { |
|
|
this.onlineInfo.payType=t.payType |
|
|
this.onlineInfo.payType = t.payType |
|
|
}, |
|
|
}, |
|
|
radioChange(e) { |
|
|
radioChange(e) { |
|
|
this.coin = e.enname |
|
|
this.coin = e.enname |
|
|
@ -181,11 +194,11 @@ |
|
|
// 返回的币种没有充值地址就用接口传code换取虚拟币充值地址 |
|
|
// 返回的币种没有充值地址就用接口传code换取虚拟币充值地址 |
|
|
api.rechargeAddress(coinInfo).then(res => { |
|
|
api.rechargeAddress(coinInfo).then(res => { |
|
|
this.coinAddress = res.address |
|
|
this.coinAddress = res.address |
|
|
this.qr = this.reInfo.generateQRCodeUrl + this.coinAddress |
|
|
this.qr = this.coinAddress |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.coinAddress = e.address |
|
|
this.coinAddress = e.address |
|
|
this.qr = this.reInfo.generateQRCodeUrl + this.coinAddress |
|
|
this.qr = this.coinAddress |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 获取二维码 |
|
|
// 获取二维码 |
|
|
@ -200,7 +213,7 @@ |
|
|
if (this.pageState == 'crypto') { |
|
|
if (this.pageState == 'crypto') { |
|
|
if (this.reInfo.coins[0].address) { |
|
|
if (this.reInfo.coins[0].address) { |
|
|
this.coinAddress = this.reInfo.coins[0].address |
|
|
this.coinAddress = this.reInfo.coins[0].address |
|
|
let img = this.reInfo.generateQRCodeUrl + this.reInfo.coins[0].address |
|
|
let img = this.reInfo.coins[0].address |
|
|
this.coin = this.reInfo.coins[0].enname |
|
|
this.coin = this.reInfo.coins[0].enname |
|
|
this.coinCode = this.reInfo.coins[0].code |
|
|
this.coinCode = this.reInfo.coins[0].code |
|
|
this.getQr(img) |
|
|
this.getQr(img) |
|
|
@ -211,13 +224,13 @@ |
|
|
// 返回的币种没有充值地址就用接口传code换取虚拟币充值地址 |
|
|
// 返回的币种没有充值地址就用接口传code换取虚拟币充值地址 |
|
|
api.rechargeAddress(coinInfo).then(res => { |
|
|
api.rechargeAddress(coinInfo).then(res => { |
|
|
this.coinAddress = res.address |
|
|
this.coinAddress = res.address |
|
|
this.qr = this.reInfo.generateQRCodeUrl + this.coinAddress |
|
|
this.qr = this.coinAddress |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.reInfo.fastAmount = this.reInfo.fastAmount.split(',') |
|
|
this.reInfo.fastAmount = this.reInfo.fastAmount.split(',') |
|
|
this.onlineInfo.tranAmt=this.reInfo.fastAmount[0] |
|
|
this.onlineInfo.tranAmt = this.reInfo.fastAmount[0] |
|
|
this.onlineInfo.payType=this.reInfo.payTypes[0].payType |
|
|
this.onlineInfo.payType = this.reInfo.payTypes[0].payType |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|