You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
352 lines
9.4 KiB
352 lines
9.4 KiB
<template>
|
|
<view class="main">
|
|
<!-- nav -->
|
|
<navigation>{{ i18n.AddAddress }} </navigation>
|
|
<view class="body">
|
|
<!-- coin选择框 -->
|
|
<view class="choose-item">
|
|
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
|
|
:placeholder="i18n.PleaseChooseCoin">
|
|
</u-input>
|
|
<view class="selectCoinBtn" @click="USDTPopupShow = true">USDT
|
|
</view>
|
|
</view>
|
|
|
|
<view class="addressBody">
|
|
<view class="address-title">{{ i18n.Address }}</view>
|
|
<view class="input-item">
|
|
<u-input class="input" v-model="address" color="#fff" fontSize="32rpx" border="none"
|
|
:placeholder="i18n.enterAddressTips">
|
|
</u-input>
|
|
</view>
|
|
<view class="address-title">{{ i18n.Remarks }}</view>
|
|
<view class="input-item">
|
|
<u-input class="input" v-model="remarks" color="#fff" fontSize="32rpx" border="none"
|
|
:placeholder="i18n.enterRemarksTips">
|
|
</u-input>
|
|
</view>
|
|
</view>
|
|
|
|
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="btnIsCanClick">{{ i18n.Confirm }}
|
|
</u-button>
|
|
|
|
<!-- 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 10" :key="index">
|
|
<view class="icon">
|
|
<u-icon name="../../static/maskets/logo.png" size="64rpx" width="64rpx"></u-icon>
|
|
</view>
|
|
<view class="iconName">
|
|
<view class="top">USDT</view>
|
|
<view class="bottom">BTC</view>
|
|
</view>
|
|
|
|
<radio color="#00E8A2" shape="square"></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>
|
|
</template>
|
|
|
|
<script>
|
|
import uniCopy from '@/utils/uni-copy'
|
|
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
|
|
export default {
|
|
components: { KeyValueRow },
|
|
name: "withdrawal",
|
|
data() {
|
|
return {
|
|
coin: '',
|
|
address: '',
|
|
address: '',
|
|
USDTRadioValue: '',
|
|
USDTPopupShow: false,
|
|
|
|
};
|
|
},
|
|
computed: {
|
|
i18n() {
|
|
return this.$t("withdrawal");
|
|
},
|
|
btnIsCanClick() { // 按钮是否可以点击
|
|
if (this.coin && this.address && this.address) {
|
|
return false; // 有值才可以点
|
|
}else{
|
|
return true
|
|
}
|
|
}
|
|
},
|
|
onLoad() {
|
|
// 监听事件
|
|
uni.$on('coinAddressChang', (data) => {
|
|
this.coinAddress = data.coinAddress
|
|
})
|
|
},
|
|
onUnload() {
|
|
// 移除监听事件
|
|
uni.$off('coinAddressChang');
|
|
},
|
|
onShow() { },
|
|
methods: {
|
|
goto(page) {
|
|
// console.log(page);
|
|
let url = '';
|
|
switch (page) {
|
|
case 'withdrawalRecord':
|
|
url = '/pages/withdrawal/withdrawalRecord'
|
|
break;
|
|
case 'chooseAddress':
|
|
url = '/pages/withdrawal/chooseAddress?form=withdrawal'
|
|
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: "复制成功",
|
|
duration: 3000,
|
|
})
|
|
},
|
|
error: (e) => {
|
|
uni.showToast({
|
|
title: e,
|
|
icon: 'none',
|
|
duration: 2000,
|
|
})
|
|
}
|
|
})
|
|
},
|
|
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.main {
|
|
|
|
.right {
|
|
position: absolute;
|
|
right: 32rpx;
|
|
font-size: 24rpx;
|
|
}
|
|
|
|
.body {
|
|
margin-top: 200rpx;
|
|
padding: 32rpx;
|
|
}
|
|
|
|
.choose-item {
|
|
overflow: hidden;
|
|
position: relative;
|
|
height: 124rpx;
|
|
line-height: 124rpx;
|
|
background: #211F32;
|
|
margin-bottom: 48rpx;
|
|
border-radius: 32rpx;
|
|
padding: 0 40rpx;
|
|
|
|
/deep/.u-form-item__body {
|
|
padding: 0;
|
|
}
|
|
|
|
.input {
|
|
width: 460rpx;
|
|
height: 124rpx;
|
|
display: inline-block;
|
|
}
|
|
|
|
.selectCoinBtn {
|
|
position: absolute;
|
|
width: 170rpx;
|
|
height: 54rpx;
|
|
top: 36rpx;
|
|
right: 32rpx;
|
|
line-height: 56rpx;
|
|
font-size: 36rpx;
|
|
padding: 0;
|
|
color: #fff;
|
|
|
|
&::after {
|
|
display: block;
|
|
position: absolute;
|
|
content: '';
|
|
background-image: url(../../static/me/ic_input_arrow_down.png);
|
|
background-repeat: no-repeat;
|
|
background-size: 32rpx;
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
top: 12rpx;
|
|
right: 10rpx;
|
|
}
|
|
}
|
|
|
|
.all {
|
|
position: absolute;
|
|
display: inline;
|
|
font-size: 20rpx;
|
|
color: #00E8A2;
|
|
top: 0rpx;
|
|
right: 30rpx;
|
|
}
|
|
}
|
|
|
|
.addressBody {
|
|
overflow: hidden;
|
|
background: #211F32;
|
|
border-radius: 32rpx;
|
|
padding: 32rpx;
|
|
|
|
.address-title {
|
|
font-size: 32rpx;
|
|
color: #A1A0A8;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.input-item {
|
|
height: 112rpx;
|
|
background: #323045;
|
|
border-radius: 32rpx;
|
|
padding-left: 40rpx;
|
|
margin-bottom: 20rpx;
|
|
|
|
.input {
|
|
height: 112rpx;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
.button {
|
|
position: fixed;
|
|
bottom: 40rpx;
|
|
width: 686rpx;
|
|
box-sizing: border-box;
|
|
height: 112rpx;
|
|
background: #00E8A2;
|
|
border-radius: 32rpx;
|
|
font-weight: 700;
|
|
font-size: 32rpx;
|
|
color: #15141F !important;
|
|
|
|
}
|
|
|
|
|
|
.USDTPopup {
|
|
.content {
|
|
height: 730rpx;
|
|
|
|
.close {
|
|
margin: 48rpx 346rpx;
|
|
width: 58rpx;
|
|
height: 20rpx;
|
|
background-image: url(../../static/charity/Turn.png);
|
|
background-repeat: no-repeat;
|
|
background-size: 58rpx 20rpx;
|
|
}
|
|
|
|
.radioGroup {
|
|
height: 432rpx;
|
|
|
|
.checkBox {
|
|
height: 84rpx;
|
|
width: 670rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
margin: 0 40rpx 32rpx;
|
|
|
|
.icon {
|
|
width: 64rpx;
|
|
height: 64rpx;
|
|
border-radius: 20rpx;
|
|
overflow: hidden;
|
|
display: inline-block;
|
|
box-sizing: border-box;
|
|
margin-right: 20rpx;
|
|
}
|
|
|
|
.iconName {
|
|
width: 520rpx;
|
|
|
|
.top {
|
|
font-size: 32rpx;
|
|
color: #fff;
|
|
}
|
|
|
|
|
|
.bottom {
|
|
font-size: 24rpx;
|
|
color: #A1A0A8;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/deep/.uni-radio-input {
|
|
width: 48rpx;
|
|
height: 48rpx;
|
|
border-radius: 16rpx;
|
|
background: #323045;
|
|
}
|
|
|
|
/deep/.uni-radio-input-checked::before {
|
|
font-size: 36rpx;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
.button {
|
|
width: 654rpx;
|
|
margin: 40rpx 48rpx;
|
|
border-radius: 32rpx;
|
|
height: 112rpx;
|
|
font-weight: 600;
|
|
line-height: 112rpx;
|
|
color: #15141F !important;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
</style>
|
|
|