|
@@ -1,10 +1,9 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="container">
|
|
<view class="container">
|
|
|
|
|
+ <view class="title">资产</view>
|
|
|
<view>
|
|
<view>
|
|
|
<view class="list-box">
|
|
<view class="list-box">
|
|
|
- <view class="bg">
|
|
|
|
|
- <image src="../../static/img/assets-bg.png" mode=""></image>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="bg"><image src="../../static/img/assets-bg.png" mode=""></image></view>
|
|
|
<view class="info-box">
|
|
<view class="info-box">
|
|
|
<view class="flex" v-show="show == true">
|
|
<view class="flex" v-show="show == true">
|
|
|
<view class="info">
|
|
<view class="info">
|
|
@@ -46,7 +45,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="list-cell" v-for="(ls, index) in list" :key="index" @click="toDateils(ls, index)">
|
|
<view class="list-cell" v-for="(ls, index) in list" :key="index" @click="toDateils(ls, index)">
|
|
|
<view class="cell flex">
|
|
<view class="cell flex">
|
|
|
- <view class="cell-title">{{ ls.name }}</view>
|
|
|
|
|
|
|
+ <view class="cell-title flex">
|
|
|
|
|
+ <image :src="ls.LOGO" mode="scaleToFill" class="logo"></image>
|
|
|
|
|
+ <view class="name">{{ ls.name }}</view>
|
|
|
|
|
+ </view>
|
|
|
<image src="../../static/img/img16.png"></image>
|
|
<image src="../../static/img/img16.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex cell-list">
|
|
<view class="flex cell-list">
|
|
@@ -54,38 +56,17 @@
|
|
|
<view class="name">可用</view>
|
|
<view class="name">可用</view>
|
|
|
<view class="tpl">{{ ls.money.money * 1 }}</view>
|
|
<view class="tpl">{{ ls.money.money * 1 }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="cell-tpl tip-tpl">
|
|
|
|
|
- <view class="name">冻结</view>
|
|
|
|
|
- <view class="tpl">{{ ls.lock_moeny }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
<view class="cell-tpl tip-box">
|
|
<view class="cell-tpl tip-box">
|
|
|
<view class="name">折合(USDT)</view>
|
|
<view class="name">折合(USDT)</view>
|
|
|
<view class="tpl clamp">{{ ls.usdt * 1 }}</view>
|
|
<view class="tpl clamp">{{ ls.usdt * 1 }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <!-- <uni-popup ref="popup" type="center">
|
|
|
|
|
- <view class="popup">
|
|
|
|
|
- <view class="cancel flex" @click="close">
|
|
|
|
|
- <view></view>
|
|
|
|
|
- <view class="tip">x</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="list-boxs">
|
|
|
|
|
- <view class="popup-text">购买数量:</view>
|
|
|
|
|
- <view class="password"><input type="number" v-model="num" placeholder="请输入算力数量"></view>
|
|
|
|
|
- <view class="popup-text">币种选择:</view>
|
|
|
|
|
- <view class="content" @click="useOutClickSide">
|
|
|
|
|
- <easy-select ref="easySelect" :options='moneyTypeList' :value="money" @selectOne="selectOne"></easy-select>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="confirm-btn" @click="pay"><text>确认充币</text></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </uni-popup> -->
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { recharge, wallet,moneyType } from '@/api/finance.js';
|
|
|
|
|
|
|
+import { wallet } from '@/api/finance.js';
|
|
|
import easyselect from '@/components/easy-select/easy-select.vue';
|
|
import easyselect from '@/components/easy-select/easy-select.vue';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -97,19 +78,17 @@ export default {
|
|
|
money: '',
|
|
money: '',
|
|
|
type: '',
|
|
type: '',
|
|
|
moneyTypeList: [],
|
|
moneyTypeList: [],
|
|
|
- list: '',
|
|
|
|
|
|
|
+ list: [],
|
|
|
show: true,
|
|
show: true,
|
|
|
like_rmb: '',
|
|
like_rmb: '',
|
|
|
like_usdt: '',
|
|
like_usdt: '',
|
|
|
- wallet: '',
|
|
|
|
|
|
|
+ wallet: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
|
- this.moneyType();
|
|
|
|
|
this.loadData();
|
|
this.loadData();
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- this.moneyType();
|
|
|
|
|
this.loadData();
|
|
this.loadData();
|
|
|
let show = uni.getStorageSync('showPick');
|
|
let show = uni.getStorageSync('showPick');
|
|
|
if (show == false) {
|
|
if (show == false) {
|
|
@@ -122,31 +101,29 @@ export default {
|
|
|
//下拉刷新
|
|
//下拉刷新
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
this.loadData();
|
|
this.loadData();
|
|
|
- this.moneyType();
|
|
|
|
|
setTimeout(function() {
|
|
setTimeout(function() {
|
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // 所有币种
|
|
|
|
|
- async moneyType() {
|
|
|
|
|
- let obj = this;
|
|
|
|
|
- moneyType({}).then(({ data }) => {
|
|
|
|
|
- obj.moneyTypeList = data;
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
// 请求载入数据
|
|
// 请求载入数据
|
|
|
loadData() {
|
|
loadData() {
|
|
|
let obj = this;
|
|
let obj = this;
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
- title:'加载中'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ title: '加载中'
|
|
|
|
|
+ });
|
|
|
obj.loading = true;
|
|
obj.loading = true;
|
|
|
wallet({}).then(({ data }) => {
|
|
wallet({}).then(({ data }) => {
|
|
|
console.log(data);
|
|
console.log(data);
|
|
|
- obj.like_rmb = data.like_rmb;
|
|
|
|
|
- obj.like_usdt = data.like_usdt;
|
|
|
|
|
- obj.list = data.back;
|
|
|
|
|
|
|
+ obj.like_rmb = data.all_rmb;
|
|
|
|
|
+ obj.like_usdt = data.all_usdt;
|
|
|
|
|
+ const arr = Object.keys(data.back);
|
|
|
|
|
+ console.log(arr);
|
|
|
|
|
+ let ar = [];
|
|
|
|
|
+ arr.forEach(e => {
|
|
|
|
|
+ ar.push(data.back[e]);
|
|
|
|
|
+ });
|
|
|
|
|
+ obj.list = ar;
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -158,9 +135,6 @@ export default {
|
|
|
success: function() {}
|
|
success: function() {}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- recharge() {
|
|
|
|
|
- this.$refs.popup.open();
|
|
|
|
|
- },
|
|
|
|
|
selectOne(options) {
|
|
selectOne(options) {
|
|
|
this.money = options.name;
|
|
this.money = options.name;
|
|
|
this.type = options.code;
|
|
this.type = options.code;
|
|
@@ -168,24 +142,6 @@ export default {
|
|
|
useOutClickSide() {
|
|
useOutClickSide() {
|
|
|
this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions();
|
|
this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions();
|
|
|
},
|
|
},
|
|
|
- // pay(){
|
|
|
|
|
- // let obj = this;
|
|
|
|
|
- // recharge({
|
|
|
|
|
- // num:obj.num,
|
|
|
|
|
- // money_type:obj.type
|
|
|
|
|
- // },obj.buyId).then(({ data }) => {
|
|
|
|
|
- // console.log(data)
|
|
|
|
|
- // obj.$api.msg(data.msg);
|
|
|
|
|
- // obj.$refs.popup.close();
|
|
|
|
|
- // obj.num='';
|
|
|
|
|
- // obj.type = '';
|
|
|
|
|
- // uni.navigateTo({
|
|
|
|
|
- // url:'/pages/finance/recharge?LOGO='+data._address_qr+'&order_id='+data.order_id+'&ddress='+data.__money_address+'&id='+data.id
|
|
|
|
|
- // })
|
|
|
|
|
- // }).catch(e => {
|
|
|
|
|
- // obj.$refs.popup.close();
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
close() {
|
|
close() {
|
|
|
this.$refs.popup.close();
|
|
this.$refs.popup.close();
|
|
|
},
|
|
},
|
|
@@ -235,7 +191,7 @@ export default {
|
|
|
'&way=' +
|
|
'&way=' +
|
|
|
ls.way +
|
|
ls.way +
|
|
|
'&waypath=' +
|
|
'&waypath=' +
|
|
|
- waypath+
|
|
|
|
|
|
|
+ waypath +
|
|
|
'&less=' +
|
|
'&less=' +
|
|
|
ls.less
|
|
ls.less
|
|
|
});
|
|
});
|
|
@@ -253,6 +209,13 @@ page {
|
|
|
padding: 25rpx 40rpx;
|
|
padding: 25rpx 40rpx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.title {
|
|
|
|
|
+ font-size: 46rpx;
|
|
|
|
|
+ font-family: PingFang SC;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: $font-color-dark;
|
|
|
|
|
+ margin-bottom: 30rpx;
|
|
|
|
|
+}
|
|
|
.list-tips {
|
|
.list-tips {
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
right: 0;
|
|
right: 0;
|
|
@@ -333,7 +296,7 @@ page {
|
|
|
font-size: 27rpx;
|
|
font-size: 27rpx;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
padding-left: 10rpx;
|
|
padding-left: 10rpx;
|
|
|
- color: #FFFFFF;
|
|
|
|
|
|
|
+ color: #ffffff;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -350,6 +313,16 @@ page {
|
|
|
font-size: 34rpx;
|
|
font-size: 34rpx;
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
color: #5771df;
|
|
color: #5771df;
|
|
|
|
|
+ .logo{
|
|
|
|
|
+ border-radius: 99rpx;
|
|
|
|
|
+ width:50rpx ;
|
|
|
|
|
+ height:50rpx ;
|
|
|
|
|
+ }
|
|
|
|
|
+ .name{
|
|
|
|
|
+ margin-left: 20rpx;
|
|
|
|
|
+ color: $font-color-dark;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.cell-list {
|
|
.cell-list {
|
|
@@ -425,5 +398,4 @@ page {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
</style>
|
|
</style>
|