|
|
|
@ -13,24 +13,24 @@ |
|
|
|
<!-- coin选择框 --> |
|
|
|
<view class="text">{{ i18n.SelectCurrency }}</view> |
|
|
|
<view class="input-item"> |
|
|
|
<u-input @focus="USDTPopupShow = true" class="input" v-model="coinInfo.coinCode" color="#fff" fontSize="32rpx" border="none" |
|
|
|
:placeholder="i18n.PleaseChooseCoin" > |
|
|
|
<u-input class="input" v-model="coinInfo.coinCode" color="#fff" fontSize="32rpx" border="none" |
|
|
|
:placeholder="i18n.PleaseChooseCoin" :disabled="true"> |
|
|
|
</u-input> |
|
|
|
<view class="downSelect" ></view> |
|
|
|
<view class="downSelect" @click="USDTPopupShow = true"></view> |
|
|
|
</view> |
|
|
|
<!-- form地址选择框 --> |
|
|
|
<view class="text">{{ i18n.From }}</view> |
|
|
|
<view class="input-item"> |
|
|
|
<u-input class="input" v-model="coinInfo.fromWays" color="#fff" fontSize="32rpx" border="none" |
|
|
|
:placeholder="i18n.OptionAccount"> |
|
|
|
<u-input class="input" v-model="transCoinInfo.fromWays" color="#fff" fontSize="32rpx" border="none" |
|
|
|
:placeholder="i18n.OptionAccount" :disabled="true"> |
|
|
|
</u-input> |
|
|
|
<view class="downSelect" @click="accountPopupShow = true"></view> |
|
|
|
</view> |
|
|
|
<!-- to地址选择框 --> |
|
|
|
<view class="text">{{ i18n.To }}</view> |
|
|
|
<view class="input-item"> |
|
|
|
<u-input class="input" v-model="coinInfo.toWays" color="#fff" fontSize="32rpx" border="none" |
|
|
|
:placeholder="i18n.TradingAccount"> |
|
|
|
<u-input class="input" v-model="transCoinInfo.toWays" color="#fff" fontSize="32rpx" border="none" |
|
|
|
:placeholder="i18n.TradingAccount" :disabled="true"> |
|
|
|
</u-input> |
|
|
|
<view class="downSelect" @click="accountPopupShowTo = true"></view> |
|
|
|
</view> |
|
|
|
@ -38,7 +38,7 @@ |
|
|
|
<view class="text">{{ i18n.TransferNumber }}</view> |
|
|
|
<view class="input-item"> |
|
|
|
<u-input class="input" v-model="coinInfo.tranAmt" color="#fff" fontSize="32rpx" border="none" |
|
|
|
:placeholder="i18n.PleaseEnterNumber"> |
|
|
|
:placeholder="i18n.pamount" > |
|
|
|
</u-input> |
|
|
|
<view class="numberDownSelect">{{coinInfo.coinCode||''}} |
|
|
|
<view class="all" @click="coinInfo.tranAmt=coinWayInfo.userCapital">{{i18n.ALL}}</view> |
|
|
|
@ -96,11 +96,11 @@ |
|
|
|
<!-- v-for="(item, index) in 3" :key="index" --> |
|
|
|
<label class="checkBox" @click="getAccount('exchange','form')"> |
|
|
|
<view class="name">Balance account</view> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.fromWays=='exchange'"></radio> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.fromWays=='Balance account'"></radio> |
|
|
|
</label> |
|
|
|
<label class="checkBox" @click="getAccount('contract','form')"> |
|
|
|
<view class="name">Contract account</view> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.fromWays=='contract'"></radio> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.fromWays=='Contract account'"></radio> |
|
|
|
</label> |
|
|
|
</radio-group> |
|
|
|
</scroll-view> |
|
|
|
@ -121,11 +121,11 @@ |
|
|
|
<!-- v-for="(item, index) in 3" :key="index" --> |
|
|
|
<label class="checkBox" @click="getAccount('contract','to')"> |
|
|
|
<view class="name">Contract account</view> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.toWays=='contract'"></radio> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.toWays=='Contract account'"></radio> |
|
|
|
</label> |
|
|
|
<label class="checkBox" @click="getAccount('exchange','to')"> |
|
|
|
<view class="name">Balance account</view> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.toWays=='exchange'"></radio> |
|
|
|
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.toWays=='Balance account'"></radio> |
|
|
|
</label> |
|
|
|
|
|
|
|
</radio-group> |
|
|
|
@ -208,9 +208,19 @@ |
|
|
|
getAccount(e,type){ |
|
|
|
this.type=type |
|
|
|
if(type=='form'){ |
|
|
|
this.transCoinInfo.fromWays=e |
|
|
|
if(e=='exchange'){ |
|
|
|
this.transCoinInfo.fromWays='Balance account' |
|
|
|
}else{ |
|
|
|
this.transCoinInfo.toWays=e |
|
|
|
this.transCoinInfo.fromWays='Contract account' |
|
|
|
} |
|
|
|
this.coinInfo.fromWays=e |
|
|
|
}else{ |
|
|
|
if(e=='exchange'){ |
|
|
|
this.transCoinInfo.toWays='Balance account' |
|
|
|
}else{ |
|
|
|
this.transCoinInfo.toWays='Contract account' |
|
|
|
} |
|
|
|
this.coinInfo.toWays=e |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
}, |
|
|
|
@ -218,9 +228,9 @@ |
|
|
|
transfer() { |
|
|
|
api.transfer(this.coinInfo).then(res => { |
|
|
|
uni.$u.toast(this.$t("login").Transfersucceeded) |
|
|
|
this.reset() |
|
|
|
setTimeout(() => { |
|
|
|
this.getInfo() |
|
|
|
this.getInfo(true) |
|
|
|
this.reset() |
|
|
|
}, 1200) |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -238,22 +248,36 @@ |
|
|
|
// 切换币种或转出账户 |
|
|
|
getCoinOrAccount() { |
|
|
|
this.transCoinInfo.coinCode=this.coinInfo.coinCode2 |
|
|
|
this.coinInfo.fromWays=this.transCoinInfo.fromWays |
|
|
|
this.coinInfo.toWays=this.transCoinInfo.toWays |
|
|
|
// this.coinInfo.fromWays=this.transCoinInfo.fromWays |
|
|
|
// this.coinInfo.toWays=this.transCoinInfo.toWays |
|
|
|
if(this.type=='to'){ |
|
|
|
this.accountPopupShowTo = false |
|
|
|
return; |
|
|
|
} |
|
|
|
api.changeCoinWays(this.transCoinInfo).then(res => { |
|
|
|
api.changeCoinWays({ |
|
|
|
coinCode:this.transCoinInfo.coinCode, |
|
|
|
fromWays:this.coinInfo.fromWays, |
|
|
|
}).then(res => { |
|
|
|
this.coinWayInfo=res |
|
|
|
this.accountPopupShow = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取配置信息 |
|
|
|
getInfo() { |
|
|
|
getInfo(type) { |
|
|
|
api.getTransferConfig({}).then(res => { |
|
|
|
console.log(res) |
|
|
|
this.info = res |
|
|
|
// 首次进来才默认选择 |
|
|
|
if(type){ |
|
|
|
return; |
|
|
|
} |
|
|
|
// 3个下拉框默认选中第一个,另外选项弹出框也默认第一个 |
|
|
|
this.coinInfo.coinCode=this.info.coinList[0].enname |
|
|
|
this.coinCode = this.info.coinList[0].enname |
|
|
|
this.coinCode2 = this.info.coinList[0].code |
|
|
|
this.coinInfo.fromWays='exchange'; |
|
|
|
this.coinInfo.toWays='contract'; |
|
|
|
this.transCoinInfo.fromWays='Balance account'; |
|
|
|
this.transCoinInfo.toWays='Contract account'; |
|
|
|
}) |
|
|
|
}, |
|
|
|
USDTRadioChange(e) {}, |
|
|
|
@ -263,6 +287,9 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
/deep/ .u-input--square{ |
|
|
|
border-radius: 34rpx !important; |
|
|
|
} |
|
|
|
.main { |
|
|
|
.body { |
|
|
|
.form { |
|
|
|
@ -287,6 +314,7 @@ |
|
|
|
width: 400rpx; |
|
|
|
height: 112rpx; |
|
|
|
padding-left: 40rpx !important; |
|
|
|
background: #323045 !important; |
|
|
|
} |
|
|
|
|
|
|
|
.downSelect { |
|
|
|
|