123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- <template>
- <view class="container">
- <view class="status_bar"></view>
- <view class="title">资产</view>
- <view>
- <view class="list-box">
- <view class="bg"><image src="../../static/img/assets-bg.png" mode=""></image></view>
- <view class="info-box">
- <view class="flex" v-show="show == true">
- <view class="info">
- <view class="list-title">总资产合计(USDT)</view>
- <view class="list-name clamp">{{ like_usdt * 1 }}</view>
- <view class="ustd">≈ {{ like_rmb * 1 }}RMB</view>
- </view>
- <image class="image" src="../../static/img/eyes.png" @click="showPick(false)"></image>
- </view>
- <view class="flex" v-show="show == false">
- <view class="info">
- <view class="list-title">总资产合计(USDT)</view>
- <view class="list-name clamp">****</view>
- <view class="ustd">≈ ****RMB</view>
- </view>
- <image class="image" src="../../static/img/img43.png" @click="showPick(true)"></image>
- </view>
- </view>
- <view class="list-tpl flex">
- <view class="tpl" @click="navTo('/pages/assets/transfer')">
- <image class="zhuanz" src="../../static/img/zhuan.png"></image>
- <view class="tpl-name">转账</view>
- </view>
- <view class="tpl" @click="navTo('/pages/assets/recharge')">
- <!-- @click="recharge" -->
- <image src="../../static/img/chong.png"></image>
- <view class="tpl-name">充币</view>
- </view>
- <view class="tpl" @click="navTo('/pages/assets/withdraw')">
- <image src="../../static/img/ti.png"></image>
- <view class="tpl-name">提币</view>
- </view>
- </view>
- <!-- <view class="list-tips flex_item">
- <image src="../../static/img/img07.png"></image>
- <view>资产正在保护中</view>
- </view> -->
- </view>
- <view class="list-cell" v-for="(ls, index) in list" :key="index" @click="toDateils(ls, index)">
- <view class="cell flex">
- <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>
- </view>
- <view class="flex cell-list">
- <view class="cell-tpl tips">
- <view class="name">可用</view>
- <view class="tpl">{{ ls.money.money * 1 }}</view>
- </view>
- <view class="cell-tpl tips">
- <view class="name">冻结中</view>
- <view class="tpl">{{ ls.lock_money * 1 }}</view>
- </view>
- <view class="cell-tpl tip-box">
- <view class="name">折合(USDT)</view>
- <view class="tpl clamp">{{ ls.usdt * 1 }}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { wallet } from '@/api/finance.js';
- import easyselect from '@/components/easy-select/easy-select.vue';
- export default {
- components: {
- easyselect
- },
- data() {
- return {
- num: '',
- money: '',
- type: '',
- moneyTypeList: [],
- list: [],
- show: true,
- like_rmb: '',
- like_usdt: '',
- wallet: ''
- };
- },
- onLoad(option) {
- this.loadData();
- },
- onShow() {
- this.loadData();
- let show = uni.getStorageSync('showPick');
- if (show == false) {
- this.show = false;
- }
- if (show == true) {
- this.show = true;
- }
- },
- //下拉刷新
- onPullDownRefresh() {
- this.loadData();
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- methods: {
- // 请求载入数据
- loadData() {
- let obj = this;
- uni.showLoading({
- title: '加载中'
- });
- obj.loading = true;
- wallet({}).then(({ data }) => {
- console.log(data);
- 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();
- });
- },
- showPick(item) {
- this.show = item;
- uni.setStorage({
- key: 'showPick',
- data: item,
- success: function() {}
- });
- },
- selectOne(options) {
- this.money = options.name;
- this.type = options.code;
- },
- useOutClickSide() {
- this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions();
- },
- close() {
- this.$refs.popup.close();
- },
- navTo(url) {
- uni.navigateTo({
- url
- });
- },
- toDateils(ls) {
- console.log(ls, '55');
- let wayaddress = {};
- uni.navigateTo({
- url: '/pages/assets/details?name=' + ls.name
- });
- }
- }
- };
- </script>
- <style lang="scss">
- page {
- min-height: 100%;
- background-color: #ffffff;
- .container {
- width: 100%;
- padding: 25rpx 40rpx;
- }
- }
- .status_bar {
- height: var(--status-bar-height);
- width: 100%;
- }
- .title {
- font-size: 46rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: $font-color-dark;
- margin-bottom: 30rpx;
- }
- .list-tips {
- position: absolute;
- right: 0;
- top: 25rpx;
- font-size: 24rpx;
- background-color: #f4ca1c;
- padding: 14rpx 27rpx;
- border-bottom-left-radius: 50rpx;
- border-top-left-radius: 50rpx;
- color: #5771df;
- image {
- width: 30rpx;
- height: 31rpx;
- margin-right: 12rpx;
- }
- }
- .list-box {
- .bg {
- position: absolute;
- right: 0;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- image {
- height: 100%;
- width: 100%;
- }
- }
- position: relative;
- color: #ffffff;
- border-radius: 20rpx;
- margin-bottom: 60rpx;
- .info-box {
- z-index: 10;
- position: relative;
- padding: 31rpx 43rpx;
- .image {
- width: 44rpx !important;
- height: 30rpx !important;
- }
- .info {
- width: 80%;
- .list-title {
- position: relative;
- z-index: 10;
- font-size: 30rpx;
- font-weight: 500;
- color: #ffffff;
- }
- .list-name {
- width: 100%;
- font-size: 64rpx;
- font-weight: bold;
- padding: 25rpx 0rpx;
- }
- .ustd {
- font-size: 30rpx;
- font-weight: normal;
- }
- }
- }
- .list-tpl {
- z-index: 10;
- position: relative;
- padding: 30rpx 100rpx;
- .tpl {
- text-align: center;
- image {
- width: 45rpx;
- height: 42rpx;
- }
- .zhuanz {
- width: 45rpx;
- height: 42rpx;
- }
- .tpl-name {
- font-size: 27rpx;
- font-weight: bold;
- padding-left: 10rpx;
- color: #ffffff;
- }
- }
- }
- }
- .list-cell {
- padding-bottom: 58rpx;
- .cell {
- padding-bottom: 31rpx;
- image {
- width: 12rpx;
- height: 24rpx;
- }
- .cell-title {
- font-size: 34rpx;
- font-weight: 500;
- color: #5771df;
- .logo {
- border-radius: 99rpx;
- width: 50rpx;
- height: 50rpx;
- }
- .name {
- margin-left: 20rpx;
- color: $font-color-dark;
- font-weight: bold;
- }
- }
- }
- .cell-list {
- width: 100%;
- justify-content: space-between;
- .cell-tpl {
- text-align: left;
- .name {
- font-size: 24rpx;
- font-weight: 500;
- color: #999999;
- padding-bottom: 15rpx;
- }
- }
- .tip-box {
- text-align: right;
- // width: 40%;
- }
- .tip-tpl {
- text-align: center;
- // width: 30%;
- }
- .tips {
- // width: 30%;
- }
- }
- }
- //弹窗
- .popup {
- background-color: #ffffff;
- border-radius: 25rpx;
- font-size: 30rpx;
- .cancel {
- text-align: center;
- width: 100%;
- line-height: 60rpx;
- .tip {
- background-color: #5771df;
- color: #ffffff;
- width: 70rpx;
- height: 70rpx;
- border-top-right-radius: 25rpx;
- }
- }
- .list-boxs {
- padding: 0rpx 80rpx;
- .password {
- padding: 50rpx 0rpx;
- width: 100%;
- input {
- width: 70%;
- height: 80rpx;
- border: 2rpx solid #999999;
- padding-left: 25rpx;
- box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.27);
- border-radius: 11rpx;
- }
- }
- .confirm-btn {
- padding-bottom: 120rpx;
- padding-top: 30rpx;
- text {
- background-color: #5771df;
- color: #ffffff;
- width: 70%;
- text-align: center;
- padding: 25rpx 90rpx;
- border-radius: 15rpx;
- }
- }
- }
- }
- .loading {
- width: 100%;
- height: 100%;
- }
- </style>
|