Browse Source

提现充值划转等完成

master
j1ack 3 years ago
parent
commit
25ea09dd83
  1. 174
      pages/me/transfer.vue
  2. 1115
      pages/recharge/recharge.vue
  3. 371
      pages/recharge/rechargeRecord.vue
  4. 94
      pages/withdrawal/addAddress.vue
  5. 612
      pages/withdrawal/chooseAddress.vue
  6. 1470
      pages/withdrawal/withdrawal.vue
  7. 401
      pages/withdrawal/withdrawalRecord.vue
  8. 7
      utils/language/en_US.js
  9. 1624
      utils/qrCode/wxqrcode.js

174
pages/me/transfer.vue

@ -7,7 +7,7 @@
<!-- coin选择框 -->
<view class="text">{{ i18n.SelectCurrency }}</view>
<view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
<u-input class="input" v-model="coinInfo.coinCode" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.PleaseChooseCoin">
</u-input>
<view class="downSelect" @click="USDTPopupShow = true"></view>
@ -15,7 +15,7 @@
<!-- form地址选择框 -->
<view class="text">{{ i18n.From }}</view>
<view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
<u-input class="input" v-model="coinInfo.fromWays" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.OptionAccount">
</u-input>
<view class="downSelect" @click="accountPopupShow = true"></view>
@ -23,27 +23,30 @@
<!-- to地址选择框 -->
<view class="text">{{ i18n.To }}</view>
<view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
<u-input class="input" v-model="coinInfo.toWays" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.TradingAccount">
</u-input>
<view class="downSelect" @click="accountPopupShow = true"></view>
<view class="downSelect" @click="accountPopupShowTo = true"></view>
</view>
<!-- 数量 -->
<view class="text">{{ i18n.TransferNumber }}</view>
<view class="input-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
<u-input class="input" v-model="coinInfo.tranAmt" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.PleaseEnterNumber">
</u-input>
<view class="numberDownSelect">USDT <view class="all">{{i18n.ALL}}</view>
<view class="numberDownSelect">{{coinInfo.coinCode||''}}
<view class="all" @click="coinInfo.tranAmt=coinWayInfo.userCapital">{{i18n.ALL}}</view>
</view>
</view>
<view class="Usable">{{ i18n.Usable }}
<view class="number">{{info.userCapital}}{{info.coinCode}}</view>
<view class="number">{{coinWayInfo.userCapital>=0?coinWayInfo.userCapital:info.userCapital}}{{coinWayInfo.coinCode?coinWayInfo.coinCode:info.coinCode}}</view>
</view>
</view>
<!-- 按钮 -->
<u-button class="transferButton" color="#00E8A2" throttleTime="500">{{
<u-button class="transferButton" color="#00E8A2" throttleTime="500" :disabled="!transferDis"
@click="transfer">{{
i18n.Transfer
}}</u-button>
@ -55,47 +58,79 @@
<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">
<label class="checkBox" v-for="(item, index) in info.coinList" :key="index"
@click="radioChange(item)">
<view class="icon">
<u-icon name="../../static/maskets/bye.png" size="52rpx" width="52rpx"></u-icon>
<u-icon :name="baseURL+'/coins/'+item.enname+'.png'" size="52rpx" width="52rpx">
</u-icon>
</view>
<view class="iconName">
<view class="top">USDT</view>
<view class="bottom">BTC</view>
<view class="top">{{item.enname}}</view>
<view class="bottom">{{item.useCapital}}{{" "}}{{item.code}}</view>
</view>
<radio color="#00E8A2" shape="square"></radio>
<radio color="#00E8A2" shape="square" :checked="coinInfo.coinCode==item.enname"></radio>
</label>
</radio-group>
</scroll-view>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="USDTPopupShow = false">OK
<u-button class="button" color="#00E8A2" throttleTime="500" @click="getCoin">OK
</u-button>
</view>
</u-popup>
<!-- account账户按钮通知弹出层 -->
<!-- account账户按钮form通知弹出层 -->
<u-popup class="accountPopup" :show="accountPopupShow" round="40rpx" mode="bottom"
@close="accountPopupShow = false" @open="accountPopupShow = true" bgColor="#211F32">
<view class="content">
<view class="close" @click="accountPopupShow = false"></view>
<scroll-view scroll-y="true" style="height: 200rpx;" scroll-with-animation="true"
@touchmove.stop.prevent="">
<radio-group class="radioGroup" @change="accountRadioChange" v-model="accountRadioValue">
<label class="checkBox" v-for="(item, index) in 3" :key="index">
<view class="name">Option account</view>
<radio color="#00E8A2" shape="square"></radio>
<radio-group class="radioGroup" >
<!-- 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>
</label>
<label class="checkBox" @click="getAccount('contract','form')">
<view class="name">Contract account</view>
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.fromWays=='contract'"></radio>
</label>
</radio-group>
</scroll-view>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="accountPopupShow = false">OK
<u-button class="button" color="#00E8A2" throttleTime="500" @click="getCoinOrAccount">OK
</u-button>
</view>
</u-popup>
<!-- account账户按钮to通知弹出层 -->
<u-popup class="accountPopup" :show="accountPopupShowTo" round="40rpx" mode="bottom"
@close="accountPopupShowTo = false" @open="accountPopupShowTo = true" bgColor="#211F32">
<view class="content">
<view class="close" @click="accountPopupShowTo = false"></view>
<scroll-view scroll-y="true" style="height: 200rpx;" scroll-with-animation="true"
@touchmove.stop.prevent="">
<radio-group class="radioGroup" >
<!-- 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>
</label>
<label class="checkBox" @click="getAccount('exchange','to')">
<view class="name">Balance account</view>
<radio color="#00E8A2" shape="square" :checked="transCoinInfo.toWays=='exchange'"></radio>
</label>
</radio-group>
</scroll-view>
<u-button class="button" color="#00E8A2" throttleTime="500" @click="getCoinOrAccount">OK
</u-button>
</view>
</u-popup>
</view>
</view>
@ -103,14 +138,31 @@
<script>
import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default {
name: "transfer",
data() {
return {
info:{},
type:'',
coinWayInfo:{},
transCoinInfo:{
coinCode:null,
fromWays:null,
},
coinCode: null,
coinCode2: null,
coinInfo: {
coinCode: null,
fromWays: null,
toWays: null,
tranAmt: null,
},
baseURL: '',
info: {},
coin: '',
USDTPopupShow: false,
accountPopupShow: false,
accountPopupShowTo: false,
USDTRadioValue: '',
accountRadioValue: '',
};
@ -119,24 +171,86 @@
i18n() {
return this.$t("me");
},
transferDis() {
return this.coinInfo.coinCode && this.coinInfo.fromWays && this.coinInfo.toWays && this.coinInfo.tranAmt
},
},
onLoad() {
this.baseURL = constant.BASE_URL
this.getInfo()
},
onShow() {},
methods: {
//
reset(){
this.type=''
this.coinWayInfo={}
this.transCoinInfo={
coinCode:null,
fromWays:null,
}
this.coinCode=null,
this.coinCode2=null,
this.coinInfo={
coinCode: null,
fromWays: null,
toWays: null,
tranAmt: null,
}
},
getAccount(e,type){
this.type=type
if(type=='form'){
this.transCoinInfo.fromWays=e
}else{
this.transCoinInfo.toWays=e
}
this.$forceUpdate()
},
//
transfer() {
api.transfer(this.coinInfo).then(res => {
uni.$u.toast(this.$t("login").Transfersucceeded)
this.reset()
setTimeout(() => {
this.getInfo()
}, 1200)
})
},
//
radioChange(e) {
this.coinCode = e.enname
this.coinCode2 = e.code
},
//
getCoin() {
this.coinInfo.coinCode = this.coinCode
this.coinInfo.coinCode2 = this.coinCode2
this.USDTPopupShow = false
},
//
getCoinOrAccount() {
this.transCoinInfo.coinCode=this.coinInfo.coinCode2
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 => {
this.coinWayInfo=res
this.accountPopupShow = false
})
},
//
getInfo() {
api.getTransferConfig({}).then(res => {
console.log(res)
this.info=res
this.info = res
})
},
USDTRadioChange(e) {
console.log(e);
},
accountRadioChange(e) {
console.log(e);
}
USDTRadioChange(e) {},
},
}

1115
pages/recharge/recharge.vue

File diff suppressed because it is too large

371
pages/recharge/rechargeRecord.vue

@ -1,159 +1,228 @@
<template>
<view class="main">
<!-- nav -->
<navigation>{{ i18n.RechargeRecord }}</navigation>
<!-- headBtn -->
<view class="head">
<view class="headItem" @click="pageState = 'coinRecharge'"
:class="{ select: pageState === 'coinRecharge' }">
{{ i18n.CoinRecharge }}
</view>
<view class="headItem" @click="pageState = 'cashRecharge'"
:class="{ select: pageState === 'cashRecharge' }">
{{ i18n.CashRecharge }}
</view>
</view>
<view class="cardList">
<view class="card" v-for="(item, index) in 4" :key="index">
<!-- 卡片条件渲染 -->
<!-- balance -->
<card-header v-if="pageState === 'coinRecharge'" iconName="../../static/recharge/money-recive.png"
:title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
</card-header>
<view class="dataBody" v-if="pageState === 'coinRecharge'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
<show-more>
<key-value-row :keyName="i18n.Address" :value="'dhiukyfdhi8797979870800'"></key-value-row>
<key-value-row :keyName="i18n.Hash" :value="'dhiukyfdhi8797979870800'"></key-value-row>
<view class="text">Postscript : ontact customer service on the top-left corner for identity
verific
</view>
</show-more>
</view>
</view>
<!-- contarct -->
<card-header v-if="pageState === 'cashRecharge'" iconName="../../static/recharge/money-recive.png"
:title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
</card-header>
<view class="dataBody" v-if="pageState === 'cashRecharge'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
<show-more>
<key-value-row :keyName="i18n.USDTRate" :value="'19298'"></key-value-row>
<key-value-row :keyName="i18n.USDT" :value="'298237'"></key-value-row>
<view class="text">Postscript : ontact customer service on the top-left corner for identity
verific
</view>
</show-more>
</view>
</view>
</view>
</view>
</view>
<view class="main">
<!-- nav -->
<navigation>{{ i18n.RechargeRecord }}</navigation>
<!-- headBtn -->
<view class="head">
<view class="headItem" @click="form.type = 'crypto',getList()"
:class="{ select: form.type === 'crypto' }">
{{ i18n.CoinRecharge }}
</view>
<view class="headItem" @click="form.type = 'online',getList()"
:class="{ select:form.type === 'online' }">
{{ i18n.CashRecharge }}
</view>
</view>
<view class="cardList">
<view class="card" v-for="(item, index) in userInfoObj" :key="index">
<!-- 卡片条件渲染 -->
<!-- balance -->
<!-- <card-header v-if="form.type === 'crypto'" iconName="../../static/recharge/money-recive.png"
:title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
</card-header> -->
<card-header v-if="form.type === 'crypto'" :iconName="baseURL+'/coins/'+item.coinCode+'.png'"
:title="item.tranAmt+item.coinCode"
:rightName="item.orderStatus=='pay_unpaid'?'Unpaid':item.orderStatus=='pay_success'?'Success':
item.orderStatus=='pay_failure'?'Failed':item.orderStatus=='pay_processing'?'Paying':'Closed'"
:fontColor="item.orderStatus=='pay_unpaid'?'#F2FE8D':item.orderStatus=='pay_success'?'#00E8A2':
item.orderStatus=='pay_failure'?'#F4506A':item.orderStatus=='pay_processing'?'#00D1FF':'#A1A0A8'">
</card-header>
<view class="dataBody" v-if="form.type === 'crypto'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="(item.tranAmt-(parseInt(item.realAmount,16)))+item.coinCode"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
<show-more>
<key-value-row :keyName="i18n.Address" :value="item.toAddress"></key-value-row>
<key-value-row :keyName="i18n.Hash" :value="item.txid"></key-value-row>
</show-more>
</view>
</view>
<!-- contarct -->
<card-header v-if="form.type === 'online'" iconName="../../static/recharge/money-recive.png"
:title="item.tranAmt+item.coinCode"
:rightName="item.orderStatus=='pay_unpaid'?'Unpaid':item.orderStatus=='pay_success'?'Success':
item.orderStatus=='pay_failure'?'Failed':item.orderStatus=='pay_processing'?'Paying':'Closed'"
:fontColor="item.orderStatus=='pay_unpaid'?'#F2FE8D':item.orderStatus=='pay_success'?'#00E8A2':
item.orderStatus=='pay_failure'?'#F4506A':item.orderStatus=='pay_processing'?'#00D1FF':'#A1A0A8'">
</card-header>
<view class="dataBody" v-if="form.type === 'online'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="(item.tranAmt-(parseInt(item.realAmount,16)))+item.coinCode"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
<show-more>
<key-value-row :keyName="i18n.USDTRate" :value="item.usdtRate"></key-value-row>
<key-value-row :keyName="i18n.USDT" :value="item.usdtAmount"></key-value-row>
</show-more>
</view>
</view>
</view>
</view>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="userInfoObj.length==0"></u-empty>
<u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
:nomore-text="nomoreText" v-if="userInfoObj.length" height="80" />
</view>
</template>
<script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
import ShowMore from '../../components/showMore/showMore.vue';
export default {
components: { KeyValueRow, CardHeader, ShowMore },
name: "rechargeRecord",
data() {
return {
pageState: 'coinRecharge',
};
},
computed: {
i18n() {
return this.$t("recharge");
},
},
onLoad() {
},
onShow() { },
methods: {
change(e) {
console.log(e);
}
},
}
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
import ShowMore from '../../components/showMore/showMore.vue';
import constant from '@/utils/constant.js';
import api from '@/utils/api'
export default {
components: {
KeyValueRow,
CardHeader,
ShowMore
},
name: "rechargeRecord",
data() {
return {
baseURL:'',
pageState: 'coinRecharge',
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
form: {
pageNumber: 1,
pageSize: 20,
type:'crypto',
},
userInfoObj: [],
};
},
computed: {
i18n() {
return this.$t("recharge");
},
},
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getList();
}
},
onLoad() {
this.baseURL = constant.BASE_URL
this.getList()
},
onShow() {},
methods: {
change(e) {
console.log(e);
},
getList() {
this.isLoadMore = true
api.rechargeList(this.form).then(res => {
if (res.content.length) {
if (this.form.pageNumber > 1) {
this.userInfoObj = this.userInfoObj.concat(res.content)
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
} else {
this.userInfoObj = res.content
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
}
if (this.userInfoObj.length >= Number(res.totalElements)) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
}
} else {
this.isLoadMore = true
this.loadStatus = 'nomore'
this.userInfoObj = []
}
this.$forceUpdate()
})
},
},
}
</script>
<style lang="scss" scoped>
.main {
.head {
margin-top: 200rpx;
margin-left: 60rpx;
width: 632rpx;
display: flex;
justify-content: space-around;
align-items: center;
padding: 48rpx 0;
.headItem {
width: 300rpx;
height: 68rpx;
line-height: 68rpx;
background: #211F32;
border-radius: 16rpx;
text-align: center;
font-size: 32rpx;
color: #A1A0A8;
&.select {
background: #00E8A2;
color: #15141F;
}
}
}
.cardList {
padding-bottom: 40rpx;
.card {
overflow: hidden;
background: #211F32;
border-radius: 32rpx;
margin: 0 32rpx 32rpx;
.dataBody {
box-sizing: border-box;
.text {
margin-top: 20rpx;
padding: 10rpx 16rpx;
background: #323045;
border-radius: 8rpx;
font-size: 24rpx;
color: #A1A0A8;
}
}
}
}
}
.main {
.head {
margin-top: 200rpx;
margin-left: 60rpx;
width: 632rpx;
display: flex;
justify-content: space-around;
align-items: center;
padding: 48rpx 0;
.headItem {
width: 300rpx;
height: 68rpx;
line-height: 68rpx;
background: #211F32;
border-radius: 16rpx;
text-align: center;
font-size: 32rpx;
color: #A1A0A8;
&.select {
background: #00E8A2;
color: #15141F;
}
}
}
.cardList {
padding-bottom: 40rpx;
.card {
overflow: hidden;
background: #211F32;
border-radius: 32rpx;
margin: 0 32rpx 32rpx;
.dataBody {
box-sizing: border-box;
.text {
margin-top: 20rpx;
padding: 10rpx 16rpx;
background: #323045;
border-radius: 8rpx;
font-size: 24rpx;
color: #A1A0A8;
}
}
}
}
}
</style>

94
pages/withdrawal/addAddress.vue

@ -5,29 +5,29 @@
<view class="body">
<!-- coin选择框 -->
<view class="choose-item">
<u-input class="input" v-model="coin" color="#fff" fontSize="32rpx" border="none"
<u-input class="input" v-model="coinInfo.coinCode" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.PleaseChooseCoin">
</u-input>
<view class="selectCoinBtn" @click="USDTPopupShow = true">USDT
<view class="selectCoinBtn" @click="USDTPopupShow = true">{{coinInfo.coinCode}}
</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"
<u-input class="input" v-model="coinInfo.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"
<u-input class="input" v-model="coinInfo.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 class="button" color="#00E8A2" throttleTime="500" :disabled="btnIsCanClick" @click="save">{{ i18n.Confirm }}
</u-button>
<!-- USDT按钮通知弹出层 -->
@ -37,17 +37,18 @@
<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>
<label class="checkBox" v-for="(item, index) in withdrawInfo.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="coinInfo.coinCode==item.enname"></radio>
</label>
</radio-group>
</scroll-view>
@ -67,14 +68,25 @@
<script>
import uniCopy from '@/utils/uni-copy'
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default {
components: { KeyValueRow },
name: "withdrawal",
data() {
return {
baseURL:'',
//
selectCoinInfo: {},
coinInfo: {
coinCode:null,
address:null,
remarks:null,
},
//
withdrawInfo: {},
coin: '',
address: '',
address: '',
USDTRadioValue: '',
USDTPopupShow: false,
@ -85,7 +97,7 @@ export default {
return this.$t("withdrawal");
},
btnIsCanClick() { //
if (this.coin && this.address && this.address) {
if (this.coinInfo.coinCode && this.coinInfo.address && this.coinInfo.remarks) {
return false; //
}else{
return true
@ -93,6 +105,8 @@ export default {
}
},
onLoad() {
this.baseURL = constant.BASE_URL
this.getWithConfig()
//
uni.$on('coinAddressChang', (data) => {
this.coinAddress = data.coinAddress
@ -104,6 +118,45 @@ export default {
},
onShow() { },
methods: {
//
save(){
api.withdrawAddressAdd({
coinCode:this.coinInfo.coinCode2,
address:this.coinInfo.address,
remarks:this.coinInfo.remarks,
}).then(res => {
uni.$u.toast(this.$t("login").Savesucceeded)
setTimeout(()=>{
this.coinInfo={
coinCode:null,
address:null,
remarks:null,
coinCode2:null,
}
},1200)
})
},
//
radioChange(e) {
this.selectCoinInfo = e
this.coinInfo.coinCode = e.enname
this.coinInfo.coinCode2 = e.code
},
//
getWithConfig() {
api.withdrawConfig({
type: 'crypto'
}).then(res => {
if (res) {
//
this.withdrawInfo = res
this.coinInfo.coinCode = this.withdrawInfo.coins[0].enname
this.coinInfo.coinCode2 = this.withdrawInfo.coins[0].code
}
})
},
goto(page) {
// console.log(page);
let url = '';
@ -189,10 +242,9 @@ export default {
.selectCoinBtn {
position: absolute;
width: 170rpx;
height: 54rpx;
top: 36rpx;
right: 32rpx;
right: 80rpx;
line-height: 56rpx;
font-size: 36rpx;
padding: 0;
@ -208,7 +260,7 @@ export default {
width: 32rpx;
height: 32rpx;
top: 12rpx;
right: 10rpx;
right: -50rpx;
}
}

612
pages/withdrawal/chooseAddress.vue

@ -1,289 +1,361 @@
<template>
<view class="main">
<!-- nav -->
<navigation>{{ i18n.ChooseAddress }}<view slot="right" class="right" @click="editFlag = !editFlag;">{{
<view class="main">
<!-- nav -->
<navigation>{{ i18n.ChooseAddress }}
<view slot="right" class="right" @click="editFlag = !editFlag;">{{
editFlag ? i18n.OK : i18n.Edit
}}
</view>
</navigation>
<view class="content">
<view class="message-item">
{{ i18n.message4 }}
</view>
<view class="message-item last">
{{ i18n.message5 }}
</view>
<view class="card" v-if="coinList.length > 0">
<view class="dataBody" v-for="(item, index) in 4" :key="index">
<view class="coinTitle">USDT</view>
<view class="addressItem" v-for="(addressItem, addressIndex) in 2" :key="addressIndex"
@click="itemClick(index, addressIndex)">
<view class="radio"
:class="{ select: (editCoinIndex === index && editCoinAddressIndex === addressIndex) }"
v-if="editFlag"></view>
<view class="addressInfo">
<view class="addressTitle">{{ i18n.myOmniAddress }}</view>
<view class="address">SDIHJSD9809U9ERF9IOU0980970</view>
<view class="time">2022/08/06 14:50:34</view>
</view>
</view>
</view>
</view>
<!-- 确认框 -->
<u-modal :show="modalShow" :confirmText="i18n.OK" :cancelText="i18n.Cancel" :showCancelButton="true"
:title="i18n.WarmTips" :content='i18n.WarmTipsText' @confirm="deleteAddress" @cancel="modalShow = false"
confirmColor="#00E8A2">
</u-modal>
<!-- 编辑按钮 -->
<view class="buttonBg">
<u-button class="button" :color="editFlag ? '#F4506A' : '#00E8A2'" throttleTime="500" @click="btnClick"
:disabled="btnIsCanClick">
{{ editFlag ? i18n.DeleteAddress : i18n.AddAddress }}
</u-button>
</view>
</view>
</view>
</view>
</navigation>
<view class="content">
<view class="message-item">
{{ i18n.message4 }}
</view>
<view class="message-item last">
{{ i18n.message5 }}
</view>
<view class="card" v-if="userInfoObj.length > 0">
<view class="dataBody" v-for="(item, index) in userInfoObj" :key="index">
<view class="coinTitle">{{item.coinEnname}}</view>
<!-- v-for="(addressItem, addressIndex) in 2" :key="addressIndex" -->
<view class="addressItem"
@click="itemClick(index, item)">
<view class="radio"
:class="{ select: (editCoinIndex === index && editCoinAddressIndex === item.id) }"
v-if="editFlag"></view>
<view class="addressInfo">
<view class="addressTitle">{{ i18n.myOmniAddress }}</view>
<view class="address">{{item.address}}</view>
<view class="time">{{item.timestr}}</view>
</view>
</view>
</view>
</view>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="userInfoObj.length==0"></u-empty>
<u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
:nomore-text="nomoreText" v-if="userInfoObj.length" height="80" />
<!-- 确认框 -->
<u-modal :show="modalShow" :confirmText="i18n.OK" :cancelText="i18n.Cancel" :showCancelButton="true"
:title="i18n.WarmTips" :content='i18n.WarmTipsText' @confirm="deleteAddress" @cancel="modalShow = false"
confirmColor="#00E8A2" cancelColor="#96959E">
</u-modal>
<!-- 编辑按钮 -->
<view class="buttonBg">
<u-button class="button" :color="editFlag ? '#F4506A' : '#00E8A2'" throttleTime="500" @click="btnClick"
:disabled="btnIsCanClick">
{{ editFlag ? i18n.DeleteAddress : i18n.AddAddress }}
</u-button>
</view>
</view>
</view>
</template>
<script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
export default {
components: { KeyValueRow },
name: "chooseAddress",
data() {
return {
coinList: [{}],
coinAddressList: [{}],
editFlag: false, //
editCoinIndex: '',
editCoinAddressIndex: '',
coinAddress: 'SDIHJSD9809U9ERF9IOU0980970',
currentCoin: 'USDT',
modalShow: false,
};
},
computed: {
i18n() {
return this.$t("withdrawal");
},
btnIsCanClick() { //
if (this.editFlag) {
// console.log(`${this.editCoinIndex}` ? false : true);
return `${this.editCoinIndex}` ? false : true; // ,
} else {
return false; //
}
}
},
onLoad() {
},
onShow() { },
methods: {
itemClick(index, addressIndex) {
//
if (this.editFlag) {
// console.log(index, addressIndex);
if (this.editCoinIndex === index && this.editCoinAddressIndex === addressIndex) { //
this.editCoinIndex = '';
this.editCoinAddressIndex = '';
} else { //
this.editCoinIndex = index;
this.editCoinAddressIndex = addressIndex;
}
} else {
// vuex
uni.$emit('coinAddressChang', {
coinAddress: this.coinAddress,
});
uni.navigateBack()
}
},
btnClick() {
//
if (this.editFlag) {
this.modalShow = true
} else {
//
uni.navigateTo({
url : '/pages/withdrawal/addAddress'
});
}
},
deleteAddress() {
this.modalShow = false;
console.log('deleteAddress');
},
},
}
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import api from '@/utils/api'
import constant from '@/utils/constant.js';
export default {
components: {
KeyValueRow
},
name: "chooseAddress",
data() {
return {
coinList: [{}],
coinAddressList: [{}],
editFlag: false, //
editCoinIndex: '',
editCoinAddressIndex: '',
coinAddress: 'SDIHJSD9809U9ERF9IOU0980970',
currentCoin: 'USDT',
modalShow: false,
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
form: {
pageNumber: 1,
pageSize: 20,
type: 'crypto',
},
userInfoObj: [],
};
},
computed: {
i18n() {
return this.$t("withdrawal");
},
btnIsCanClick() { //
if (this.editFlag) {
// console.log(`${this.editCoinIndex}` ? false : true);
return `${this.editCoinIndex}` ? false : true; // ,
} else {
return false; //
}
}
},
onLoad() {
},
onShow() {
this.getList()
},
methods: {
getList() {
this.isLoadMore = true
api.withdrawAddressList(this.form).then(res => {
if (res.content.length) {
if (this.form.pageNumber > 1) {
this.userInfoObj = this.userInfoObj.concat(res.content)
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
} else {
this.userInfoObj = res.content
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
}
if (this.userInfoObj.length >= Number(res.totalElements)) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
}
} else {
this.isLoadMore = true
this.loadStatus = 'nomore'
this.userInfoObj = []
}
this.$forceUpdate()
})
},
itemClick(index, addressIndex) {
console.log(index, addressIndex)
//
if (this.editFlag) {
// console.log(index, addressIndex);
if (this.editCoinIndex === index && this.editCoinAddressIndex === addressIndex.id) { //
this.editCoinIndex = '';
this.editCoinAddressIndex = '';
} else { //
this.editCoinIndex = index;
this.editCoinAddressIndex = addressIndex.id;
}
} else {
// vuex
uni.$emit('coinAddressChang', {
coinid: addressIndex.id,
coinAddress: addressIndex.address,
});
uni.navigateBack()
}
},
btnClick() {
//
if (this.editFlag) {
this.modalShow = true
} else {
//
uni.navigateTo({
url: '/pages/withdrawal/addAddress'
});
}
},
deleteAddress() {
this.modalShow = false;
//
api.withdrawAddressDel({
addressId:this.editCoinAddressIndex,
}).then(res => {
uni.$u.toast(this.$t("login").Deletesucceeded)
setTimeout(()=>{
this.getList()
},600)
})
},
},
}
</script>
<style lang="scss" scoped>
.main {
.right {
width: 82rpx;
height: 56rpx;
line-height: 56rpx;
position: absolute;
right: 32rpx;
font-size: 24rpx;
background: rgba(246, 166, 9, 0.1);
border-radius: 8px;
color: #FFBC1F;
}
.content {
margin-top: 200rpx;
padding: 40rpx;
.message-item {
padding: 0 16rpx;
font-size: 24rpx;
color: #A1A0A8;
line-height: 36rpx;
&.last {
margin-bottom: 30rpx;
}
}
.card {
.dataBody {
margin-bottom: 32rpx;
padding: 32rpx;
box-sizing: border-box;
background: #211F32;
border-radius: 20rpx;
.coinTitle {
font-size: 24rpx;
line-height: 28rpx;
margin-bottom: 32rpx;
}
.addressItem {
height: 180rpx;
box-sizing: border-box;
padding: 32rpx 0;
border-top: 2rpx solid #323045;
display: flex;
.radio {
margin-top: 32rpx;
margin-right: 24rpx;
box-sizing: border-box;
width: 48rpx;
height: 48rpx;
background: #323045;
border: 3rpx solid #DCDBE0;
border-radius: 16rpx;
&.select {
background-image: url(../../static/withdrawal/Checkbox_pr.png);
background-repeat: no-repeat;
background-size: 48rpx;
border: none;
}
}
.addressInfo {
flex: 1;
.addressTitle {
position: relative;
font-size: 24rpx;
margin-bottom: 20rpx;
&::after {
display: block;
position: absolute;
content: '';
background-image: url(../../static/charity/ic_ma_arrow_down.png);
background-repeat: no-repeat;
background-size: 32rpx;
width: 32rpx;
height: 32rpx;
top: 0rpx;
right: 0rpx;
transform: rotate(270deg);
}
}
.address {
font-size: 24rpx;
line-height: 28rpx;
color: #A1A0A8;
}
.time {
font-size: 24rpx;
line-height: 28rpx;
color: #A1A0A8;
}
}
}
/deep/ .u-modal__content__text{
color: #96959E;
}
.main {
.right {
width: 82rpx;
height: 56rpx;
line-height: 56rpx;
position: absolute;
right: 32rpx;
font-size: 24rpx;
background: rgba(246, 166, 9, 0.1);
border-radius: 8px;
color: #FFBC1F;
}
.content {
margin-top: 200rpx;
padding: 40rpx;
.message-item {
padding: 0 16rpx;
font-size: 24rpx;
color: #A1A0A8;
line-height: 36rpx;
&.last {
margin-bottom: 30rpx;
}
}
.card {
.dataBody {
margin-bottom: 32rpx;
padding: 32rpx;
box-sizing: border-box;
background: #211F32;
border-radius: 20rpx;
.coinTitle {
font-size: 24rpx;
line-height: 28rpx;
margin-bottom: 32rpx;
}
.addressItem {
flex: 0 1 50%;
height: 180rpx;
box-sizing: border-box;
padding: 32rpx 0;
border-top: 2rpx solid #323045;
display: flex;
.radio {
margin-top: 32rpx;
margin-right: 24rpx;
box-sizing: border-box;
width: 48rpx;
height: 48rpx;
background: #323045;
border: 3rpx solid #DCDBE0;
border-radius: 16rpx;
&.select {
background-image: url(../../static/withdrawal/Checkbox_pr.png);
background-repeat: no-repeat;
background-size: 48rpx;
border: none;
}
}
.addressInfo {
width: 590rpx;
.addressTitle {
position: relative;
font-size: 24rpx;
margin-bottom: 20rpx;
&::after {
display: block;
position: absolute;
content: '';
background-image: url(../../static/charity/ic_ma_arrow_down.png);
background-repeat: no-repeat;
background-size: 32rpx;
width: 32rpx;
height: 32rpx;
top: 0rpx;
right: 0rpx;
transform: rotate(270deg);
}
}
.address {
font-size: 24rpx;
line-height: 28rpx;
color: #A1A0A8;
word-break: break-all;
}
.time {
font-size: 24rpx;
line-height: 28rpx;
color: #A1A0A8;
}
}
}
&:last-child {
margin-bottom: 160rpx;
}
&:last-child {
margin-bottom: 160rpx;
}
}
}
/deep/.u-popup__content {
background: #323045;
.u-modal__title {
color: #fff;
}
.u-modal__content__text {
text-align: center;
}
}
.buttonBg {
position: fixed;
bottom: 0rpx;
background-color: #15141F;
.button {
width: 670rpx;
box-sizing: border-box;
height: 112rpx;
margin-bottom: 40rpx;
border-radius: 32rpx;
font-weight: 700;
font-size: 32rpx;
color: #15141F !important;
}
}
}
}
/deep/.u-popup__content {
background: #323045;
.u-modal__title {
color: #fff;
}
.u-modal__content__text {
text-align: center;
}
}
.buttonBg {
position: fixed;
bottom: 0rpx;
background-color: #15141F;
.button {
width: 670rpx;
box-sizing: border-box;
height: 112rpx;
margin-bottom: 40rpx;
border-radius: 32rpx;
font-weight: 700;
font-size: 32rpx;
color: #15141F !important;
}
}
}
}
}
}
</style>

1470
pages/withdrawal/withdrawal.vue

File diff suppressed because it is too large

401
pages/withdrawal/withdrawalRecord.vue

@ -1,172 +1,245 @@
<template>
<view class="main">
<!-- nav -->
<navigation>{{ i18n.WithdrawalRecord }}</navigation>
<!-- headBtn -->
<view class="head">
<view class="headItem" @click="pageState = 'digitalCurrency'"
:class="{ select: pageState === 'digitalCurrency' }">
{{ i18n.DigitalCurrency }}
</view>
<view class="headItem" @click="pageState = 'onLine'" :class="{ select: pageState === 'onLine' }">
{{ i18n.OnLine }}
</view>
</view>
<view class="cardList">
<view class="card" v-for="(item, index) in 4" :key="index">
<!-- 卡片条件渲染 -->
<!-- balance -->
<card-header v-if="pageState === 'digitalCurrency'" iconName="../../static/withdrawal/money-send.png"
:title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
</card-header>
<view class="dataBody" v-if="pageState === 'digitalCurrency'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
<show-more class="digitalShowMore">
<key-value-row :keyName="i18n.Address" :value="'dhiukyfdhi8797979870800'"></key-value-row>
<key-value-row :keyName="i18n.Hash" :value="'dhiukyfdhi8797979870800'"></key-value-row>
<view class="text">Postscript : ontact customer service on the top-left corner for identity
verific
</view>
</show-more>
</view>
</view>
<!-- contarct -->
<card-header v-if="pageState === 'onLine'" iconName="../../static/withdrawal/money-send.png"
:title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
</card-header>
<view class="dataBody" v-if="pageState === 'onLine'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="'293829773920223873676'"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="'10.0922'"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="'2022/08/06 14:50:34'"></key-value-row>
</view>
<show-more class="onLineShowMore" style="border-top: 2rpx solid #323045;margin-bottom: 20rpx;">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.USDTRate" :value="'19298'"></key-value-row>
<key-value-row :keyName="i18n.USDT" :value="'298237'"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.CardNo" :value="'4349 9545 9893 9854 027'">
</key-value-row>
<key-value-row :keyName="i18n.Bank" :value="'Bank of Melbourne'"></key-value-row>
<key-value-row :keyName="i18n.Payee" :value="'Zhou jielun'"></key-value-row>
<view class="text">Postscript ontact customer service on the top-left corner for identity
verific
</view>
</view>
</show-more>
</view>
</view>
</view>
</view>
<view class="main">
<!-- nav -->
<navigation>{{ i18n.WithdrawalRecord }}</navigation>
<!-- headBtn -->
<view class="head">
<view class="headItem" @click="form.type = 'crypto',getList()"
:class="{ select: form.type === 'crypto' }">
{{ i18n.DigitalCurrency }}
</view>
<view class="headItem" @click="form.type = 'online',getList()" :class="{ select:form.type=== 'online' }">
{{ i18n.OnLine }}
</view>
</view>
<view class="cardList">
<view class="card" v-for="(item, index) in userInfoObj" :key="index">
<!-- 卡片条件渲染 -->
<!-- balance -->
<card-header v-if="form.type === 'crypto'" :iconName="baseURL+'/coins/'+item.coinCode+'.png'"
:title="item.tranAmt+item.coinCode"
:rightName="item.orderStatus=='processreview'?'Underreview':item.orderStatus=='processsuccess'?'Success':
item.orderStatus=='processing'?'Processing':item.orderStatus=='processfailed'?'Failed':'Failed'"
:fontColor="item.orderStatus=='processreview'?'#F2FE8D':item.orderStatus=='processsuccess'?'#00E8A2':
item.orderStatus=='processfailed'?'#F4506A':item.orderStatus=='processing'?'#00D1FF':'#A1A0A8'">
</card-header>
<view class="dataBody" v-if="form.type === 'crypto'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="item.tranFee"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
<show-more class="digitalShowMore">
<key-value-row :keyName="i18n.Address" :value="item.toAddress"></key-value-row>
<key-value-row :keyName="i18n.Hash" :value="item.txid"></key-value-row>
<!-- <view class="text">Postscript : ontact customer service on the top-left corner for identity
verific
</view> -->
</show-more>
</view>
</view>
<!-- contarct -->
<!-- <card-header v-if="form.type === 'online'" iconName="../../static/withdrawal/money-send.png"
:title="'904.29483230ACTA'" rightName="Succeed" fontColor="#00E8A2">
</card-header> -->
<card-header v-if="form.type === 'crypto'" iconName="../../static/withdrawal/money-send.png"
:title="item.tranAmt+item.coinCode"
:rightName="item.orderStatus=='processreview'?'Underreview':item.orderStatus=='processsuccess'?'Success':
item.orderStatus=='processing'?'Processing':item.orderStatus=='processfailed'?'Failed':'Failed'"
:fontColor="item.orderStatus=='processreview'?'#F2FE8D':item.orderStatus=='processsuccess'?'#00E8A2':
item.orderStatus=='processfailed'?'#F4506A':item.orderStatus=='processing'?'#00D1FF':'#A1A0A8'">
</card-header>
<view class="dataBody" v-if="form.type === 'online'">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="item.tranFee"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
</view>
<show-more class="onLineShowMore" style="border-top: 2rpx solid #323045;margin-bottom: 20rpx;">
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.USDTRate" :value="item.usdtRate"></key-value-row>
<!-- -->
<key-value-row :keyName="i18n.USDT" :value="parseInt(item.channelAmount,16)"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.CardNo" :value="item.acctId">
</key-value-row>
<key-value-row :keyName="i18n.Bank" :value="item.bankName"></key-value-row>
<key-value-row :keyName="i18n.Payee" :value="item.acctName"></key-value-row>
<!-- <view class="text">Postscript ontact customer service on the top-left corner for identity
verific
</view> -->
</view>
</show-more>
</view>
</view>
<u-empty :text="i18n.Dataisempty" mode="data" v-if="userInfoObj.length==0"></u-empty>
<u-loadmore :status="loadStatus" :loading-text="loadingText" :loadmore-text="loadmoreText"
:nomore-text="nomoreText" v-if="userInfoObj.length" height="80" />
</view>
</view>
</template>
<script>
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
import ShowMore from '../../components/showMore/showMore.vue';
export default {
components: { KeyValueRow, CardHeader, ShowMore },
name: "withdrawalRecord",
data() {
return {
pageState: 'digitalCurrency',
};
},
computed: {
i18n() {
return this.$t("withdrawal");
},
},
onLoad() {
},
onShow() { },
methods: {
change(e) {
console.log(e);
}
},
}
import KeyValueRow from '../../components/KeyValueRow/KeyValueRow.vue';
import CardHeader from '../../components/cardHeader/cardHeader.vue';
import ShowMore from '../../components/showMore/showMore.vue';
import constant from '@/utils/constant.js';
import api from '@/utils/api'
export default {
components: {
KeyValueRow,
CardHeader,
ShowMore
},
name: "withdrawalRecord",
data() {
return {
pageState: 'digitalCurrency',
baseURL: '',
isLoadMore: false, //
loadStatus: 'loadmore',
loadingText: this.$t("login").toload,
loadmoreText: this.$t("login").pullup,
nomoreText: this.$t("login").Nomore,
form: {
pageNumber: 1,
pageSize: 20,
type: 'crypto',
},
userInfoObj: [],
};
},
computed: {
i18n() {
return this.$t("withdrawal");
},
},
onReachBottom() {
if (!this.isLoadMore) {
this.form.pageNumber += 1
this.getList();
}
},
onLoad() {
this.baseURL = constant.BASE_URL
this.getList()
},
onShow() {},
methods: {
getList() {
this.isLoadMore = true
api.withdrawList(this.form).then(res => {
if (res.content.length) {
if (this.form.pageNumber > 1) {
this.userInfoObj = this.userInfoObj.concat(res.content)
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
} else {
this.userInfoObj = res.content
for (var i = 0; i < this.userInfoObj.length; i++) {
if (this.userInfoObj[i].addTime) {
this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
i].addTime)
}
}
}
if (this.userInfoObj.length >= Number(res.totalElements)) { //
this.isLoadMore = true
this.loadStatus = 'nomore'
} else {
this.isLoadMore = false
}
} else {
this.isLoadMore = true
this.loadStatus = 'nomore'
this.userInfoObj = []
}
this.$forceUpdate()
})
},
change(e) {
console.log(e);
}
},
}
</script>
<style lang="scss" scoped>
.main {
.head {
margin-top: 200rpx;
margin-left: 60rpx;
width: 632rpx;
display: flex;
justify-content: space-around;
align-items: center;
padding: 48rpx 0;
.headItem {
width: 300rpx;
height: 68rpx;
line-height: 68rpx;
background: #211F32;
border-radius: 16rpx;
text-align: center;
font-size: 32rpx;
color: #A1A0A8;
&.select {
background: #00E8A2;
color: #15141F;
}
}
}
.cardList {
padding-bottom: 40rpx;
.card {
overflow: hidden;
background: #211F32;
border-radius: 32rpx;
margin: 0 32rpx 32rpx;
.dataBody {
box-sizing: border-box;
.onLineShowMore {
/deep/.showMoreTool {
margin: 0 32rpx;
}
}
.text {
margin-top: 20rpx;
padding: 10rpx 16rpx;
background: #323045;
border-radius: 8rpx;
font-size: 24rpx;
color: #A1A0A8;
}
}
}
}
}
.main {
.head {
margin-top: 200rpx;
margin-left: 60rpx;
width: 632rpx;
display: flex;
justify-content: space-around;
align-items: center;
padding: 48rpx 0;
.headItem {
width: 300rpx;
height: 68rpx;
line-height: 68rpx;
background: #211F32;
border-radius: 16rpx;
text-align: center;
font-size: 32rpx;
color: #A1A0A8;
&.select {
background: #00E8A2;
color: #15141F;
}
}
}
.cardList {
padding-bottom: 40rpx;
.card {
overflow: hidden;
background: #211F32;
border-radius: 32rpx;
margin: 0 32rpx 32rpx;
.dataBody {
box-sizing: border-box;
.onLineShowMore {
/deep/.showMoreTool {
margin: 0 32rpx;
}
}
.text {
margin-top: 20rpx;
padding: 10rpx 16rpx;
background: #323045;
border-radius: 8rpx;
font-size: 24rpx;
color: #A1A0A8;
}
}
}
}
}
</style>

7
utils/language/en_US.js

@ -10,6 +10,11 @@ export default {
},
// 登陆相关页面
login: {
Withdrawalsucceeded:'Withdrawal succeeded',
Deletesucceeded:'Delete succeeded',
Savesucceeded:'Saved successfully',
Rechargesucceeded:'Recharge succeeded',
Transfersucceeded:'Transfer succeeded',
Donationsucceeded:'Donation succeeded',
Insufficient:'Insufficient available balance',
pullup:'Gently pull up',
@ -155,6 +160,7 @@ export default {
// recharge
recharge: {
Dataisempty:'Data is empty',
Recharge: 'Recharge',
Record: 'Record',
CoinRecharge: 'Coin Recharge',
@ -216,6 +222,7 @@ export default {
// withdrawal
withdrawal: {
Dataisempty:'Data is empty',
Withdrawal: 'Withdrawal',
Record: 'Record',
DigitalCurrency: 'Digital currency',

1624
utils/qrCode/wxqrcode.js

File diff suppressed because it is too large
Loading…
Cancel
Save