1.虚拟币---明细

2024.3.08 sws
master
sws 2024-03-08 18:55:37 +08:00
parent d643105022
commit ffc6b765a9
11 changed files with 493 additions and 106 deletions

View File

@ -3,7 +3,7 @@
<view class="pa-w" :class="(propFixed ? 'pf z-i left-0 top-0 right-0' : '') + ' ' + propClass" :style="'padding-top:' + (status_bar_height > 0 ? status_bar_height + 5 : 0) + 'px;background-color:rgba(255,255,255,' + opacity + ');' + propStyle">
<!-- 返回 -->
<view v-if="(propName || null) != null || propIsRightSlot || propIsShowBack" class="nav-back padding-horizontal-main round va-m flex-row align-c" :class="(opacity > 0.3 ? 'cr-black ' : 'cr-white ') + (status_bar_height > 0 ? '' : 'padding-vertical-main')">
<view v-if="(propName || null) != null" :class="'text-size-md tc pa left-0 right-0 padding-top-xs '+propNameClass" :style="propNameOpacity ? (opacity ? 'color:rgba(51,51,51,' + opacity + ')' : '') : ''">{{ propName }}</view>
<view v-if="(propName || null) != null" :class="'text-size-md tc pa left-0 right-0 padding-top-xs ' + propNameClass" :style="propNameOpacity ? (opacity ? 'color:rgba(51,51,51,' + opacity + ')' : '') : ''">{{ propName }}</view>
<!-- #ifndef MP-ALIPAY -->
<iconfont v-if="propIsShowBack" name="icon-arrow-left" size="40rpx" @tap="top_nav_left_back_event" propClass="pr top-xs z-i" :color="propColor"></iconfont>
<!-- #endif -->

View File

@ -1276,6 +1276,20 @@
"navigationBarTitleText": ""
}
},
{
"path": "detail/detail",
"style": {
// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || APP
"navigationStyle": "custom",
// #endif
// #ifdef MP-ALIPAY
"transparentTitle": "auto",
"titlePenetrate":"YES",
// #endif
"enablePullDownRefresh": true,
"navigationBarTitleText": ""
}
},
{
"path": "transfer-accounts-detail/transfer-accounts-detail",
"style": {

View File

@ -0,0 +1,11 @@
.convert .nav {
z-index: 102;
}
/*
*
*/
.popup_wallet_container .item {
background-color: #f4f4f4;
border-radius: 30rpx;
}

View File

@ -1,73 +1,77 @@
<template>
<view :class="theme_view">
<view>
<view class="convert">
<view class="padding-main bg-white pr nav flex-row">
<view class="flex-row align-c margin-right-main" @tap="popup_wallet_open_event">
<view>钱包</view>
<view class="padding-left-sm"><iconfont :name="popup_wallet_status ? 'icon-arrow-top' : 'icon-arrow-bottom'" size="24rpx"></iconfont></view>
</view>
<view class="flex-row align-c margin-left-sm" @tap="popup_type_open_event">
<view>类型</view>
<view class="padding-left-sm"><iconfont :name="popup_type_status ? 'icon-arrow-top' : 'icon-arrow-bottom'" size="24rpx"></iconfont></view>
</view>
</view>
<scroll-view :scroll-y="true" class="scroll-box" lower-threshold="60" @scroll="scroll_event">
<view class="padding-main pr">
<view class="padding-lg bg-white radius-md margin-bottom-main">
<view class="br-f5 margin-bottom-main radius-md padding-lg flex-row jc-sb">
<view>
<picker class="coin-dropdown text-size-md pr" @change="coin_event_old" :value="coin_index_old" :range="coin_list_old" range-key="name">
<view class="picker pr">
<view class="flex-row align-c">
<image :src="coin_list_old[coin_index_old]['img']" mode="widthFix" class="coin-list-img round" />
<span class="padding-left-sm flex-1 flex-width single-text">{{ coin_list_old[coin_index_old]['name'] }}</span>
</view>
<view class="coin-dropdown-icon pa padding-left-xxl">
<iconfont name="icon-arrow-bottom" size="24rpx" color="#000"></iconfont>
</view>
</view>
</picker>
<view class="margin-top-main text-size-xs flex-row align-c"> <text class="margin-right-sm">余额:</text><text class="cr-blue">23.234</text> </view>
<view class="padding-main">
<view class="padding-main bg-white radius-md">
<view class="br-b-dashed padding-bottom-main margin-bottom-main flex-row jc-sb align-c">
<view>转账时间</view>
<view class="cr-grey-9">2023-09-20 15:12:35</view>
</view>
<view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">转出余额</text>
<text class="fw-b">20000.00</text>
</view>
<view class="coin-num pr flex-col">
<input type="digit" class="num input-br text-size" placeholder-class="text-size-sm cr-grey-9" placeholder="金额" />
<view class="margin-top-main tr text-size-xs">$21.00</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">转换汇率</text>
<text class="fw-b">0.01</text>
</view>
<view class="flex-row">
<text class="cr-grey-9">最新金额</text>
<text class="fw-b">150000.00</text>
</view>
</view>
<view class="coin-center-convert pa flex-row jc-c align-c" @tap="coin_center_convert_event">
<iconfont name="icon-convert2" class="pa convert-icon" :class="convert_bool ? 'convert_true' : 'convert_false'" color="#1D7DEF" size="36rpx"></iconfont>
</view>
<view class="br-f5 margin-bottom-main radius-md padding-lg flex-row jc-sb">
<view>
<picker class="coin-dropdown text-size-md pr" @change="coin_event_new" :value="coin_index_new" :range="coin_list_new" range-key="name">
<view class="picker pr">
<view class="flex-row align-c">
<image :src="coin_list_new[coin_index_new]['img']" mode="widthFix" class="coin-list-img round" />
<span class="padding-left-sm flex-1 flex-width single-text">{{ coin_list_new[coin_index_new]['name'] }}</span>
</view>
<view class="coin-dropdown-icon pa padding-left-xxl">
<iconfont name="icon-arrow-bottom" size="24rpx" color="#000"></iconfont>
</view>
</view>
</picker>
<view class="margin-top-main text-size-xs flex-row align-c"> <text class="margin-right-sm">余额:</text><text class="cr-blue">23.234</text> </view>
</view>
<view class="coin-num pr flex-col">
<input type="digit" class="num text-size" placeholder-class="text-size-sm cr-grey-9" disabled placeholder="金额" />
<view class="margin-top-main tr text-size-xs">$21.00</view>
</view>
</view>
<view class="flex-row align-c">
<iconfont name="icon-recharge" color="#333" size="32rpx"></iconfont>
<view class="margin-left-sm">1XRP = 2.45546 <text class="cr-grey-9">($21.00)</text></view>
</view>
</view>
<view class="padding-main bg-white radius-md margin-bottom-xxxxl flex-row align-c">
<text class="padding-right">支付密码</text>
<input type="number" class="text-size flex-1 flex-width" placeholder-class="text-size-md cr-grey-9" placeholder="请输入支付密码" />
</view>
<view class="padding-main radius-md margin-bottom-main">
<button type="default" class="convert-btn cr-white round" @tap="popup_goods_search_event"></button>
</view>
</view>
</scroll-view>
<!-- 钱包 -->
<component-popup :propShow="popup_wallet_status" propPosition="top" :propTop="popup_top_height + 'px'" @onclose="popup_wallet_close_event">
<view class="padding-vertical-lg">
<view class="padding-horizontal-main text-size-xs">钱包种类</view>
<view class="popup_wallet_container padding-sm flex-row flex-warp align-c tc text-size-md">
<view v-for="(item, index) in wallet_list" class="flex-width-half-half">
<view class="item margin-sm padding-vertical-sm" :class="wallet_list_index === index ? 'cr-main bg-main-light' : ''" :data-index="index" @tap="wallet_event">{{ item.name }}</view>
</view>
</view>
<view class="tc padding-top-lg br-t" @tap="popup_wallet_close_event">
<text class="padding-right-sm">{{ $t('nav-more.nav-more.h9g4b1') }}</text>
<iconfont name="icon-arrow-top" color="#ccc"></iconfont>
</view>
</view>
</component-popup>
<!-- 类型 -->
<component-popup :propShow="popup_type_status" propPosition="top" :propTop="popup_top_height + 'px'" @onclose="popup_type_close_event">
<view class="padding-vertical-lg">
<view class="padding-horizontal-main text-size-xs">提现类型</view>
<view class="popup_wallet_container padding-sm flex-row flex-warp align-c tc text-size-md">
<view v-for="(item, index) in type_list" class="flex-width-half-half">
<view class="item margin-sm padding-vertical-sm" :class="type_list_index === index ? 'cr-main bg-main-light' : ''" :data-index="index" @tap="type_event">{{ item.name }}</view>
</view>
</view>
<view class="tc padding-top-lg br-t" @tap="popup_type_close_event">
<text class="padding-right-sm">{{ $t('nav-more.nav-more.h9g4b1') }}</text>
<iconfont name="icon-arrow-top" color="#ccc"></iconfont>
</view>
</view>
</component-popup>
</view>
</view>
</template>
<script>
const app = getApp();
import componentNoData from '@/components/no-data/no-data';
import componentPopup from '@/components/popup/popup';
var wallet_static_url = app.globalData.get_static_url('coin', true) + 'app/';
//
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
@ -80,43 +84,58 @@
theme_view: app.globalData.get_theme_value_view(),
wallet_static_url: wallet_static_url,
//
coin_index_old: 0,
coin_list_old: [
//
popup_top_height: 0,
//
popup_wallet_status: false,
wallet_list_index: 0,
wallet_list: [
{
name: '全部',
},
{
name: 'BTC',
img: wallet_static_url + 'user-head-bg.png',
},
{
name: 'USDT-polygon',
img: wallet_static_url + 'user-head-bg.png',
name: 'ETH',
},
{
name: 'XRP',
},
{
name: 'DASH',
},
],
coin_index_new: 0,
coin_list_new: [
//
popup_type_status: false,
type_list_index: 0,
type_list: [
{
name: 'BTC',
img: wallet_static_url + 'user-head-bg.png',
name: '全部',
},
{
name: 'USDT-polygon',
img: wallet_static_url + 'user-head-bg.png',
name: '未打款',
},
{
name: '已打款',
},
{
name: '打款失败',
},
],
//
convert_bool: false,
};
},
components: {
componentNoData,
componentPopup,
},
props: {},
onLoad(params) {
//
app.globalData.page_event_onload_handle(params);
this.init();
},
onShow() {
@ -125,6 +144,8 @@
//
app.globalData.page_share_handle();
this.init();
},
//
@ -142,6 +163,14 @@
});
} else {
this.get_data();
var self = this;
var timer = setInterval(function () {
if (self.popup_top_height == 0) {
self.popup_top_height_computer();
} else {
clearInterval(timer);
}
}, 500);
}
}
},
@ -149,31 +178,68 @@
//
get_data() {},
// 1
coin_event_old(e) {
//
popup_wallet_open_event() {
if (!this.popup_type_status) {
this.setData({
popup_wallet_status: !this.popup_wallet_status,
});
}
},
//
popup_wallet_close_event() {
this.setData({
coin_index_old: parseInt(e.detail.value || 0),
popup_wallet_status: false,
});
},
// 2
coin_event_new(e) {
//
wallet_event(e) {
this.setData({
coin_index_new: parseInt(e.detail.value || 0),
wallet_list_index: e.currentTarget.dataset.index,
});
},
//
coin_center_convert_event() {
var old_index = this.coin_index_old;
var new_index = this.coin_index_new;
//
popup_type_open_event() {
if (!this.popup_wallet_status) {
this.setData({
popup_type_status: !this.popup_type_status,
});
}
},
//
popup_type_close_event() {
this.setData({
coin_index_new: old_index,
coin_index_old: new_index,
convert_bool: !this.convert_bool,
popup_type_status: false,
});
},
//
type_event(e) {
this.setData({
type_list_index: e.currentTarget.dataset.index,
});
},
//
popup_top_height_computer() {
const query = uni.createSelectorQuery();
query
.select('.nav')
.boundingClientRect((res) => {
if ((res || null) != null) {
//
this.setData({
popup_top_height: res.height,
});
}
})
.exec();
},
//
scroll_event(e) {
uni.$emit('onPageScroll', e.detail);

View File

@ -0,0 +1,41 @@
/*
*
*/
.coin-title {
background: radial-gradient(60% 70% at 90% 79%, rgba(33, 125, 239, 0.41) 0%, rgba(222, 237, 255, 0.56) 100%);
padding-top: 130rpx;
/* #ifndef H5 */
padding-top: calc(var(--status-bar-height) + 5px + 130rpx);
/* #endif */
border-bottom-left-radius: 60rpx;
border-bottom-right-radius: 60rpx;
}
.coin-oprate-list {
--size: 76rpx;
height: var(--size);
border-radius: 32rpx;
}
/*
*
*/
.coin-content .coin-item {
max-height: calc(100vh - 688rpx);
/* #ifndef H5 */
max-height: calc(100vh - 688rpx - var(--status-bar-height) - 5px);
/* #endif */
overflow-y: auto;
}
.coin-content-list-img {
--size: 80rpx;
width: var(--size);
height: var(--size) !important;
}
/*
*
*/
.popup_user_detail_container .item {
background: #EFF0F1;
}

View File

@ -0,0 +1,246 @@
<template>
<view :class="theme_view">
<component-nav-back propName="BTC详情"></component-nav-back>
<view>
<scroll-view :scroll-y="true" class="scroll-box" lower-threshold="60" @scroll="scroll_event">
<view class="coin-title flex-col padding-lg">
<view class="margin-bottom-xxxxl margin-top-xl padding-bottom-main flex-row jc-sb align-c">
<view class="flex-row">
<image :src="coin_list[coin_index]['img']" mode="widthFix" class="coin-content-list-img round" />
<view class="padding-left-main">
<picker class="coin-dropdown text-size-md pr margin-bottom-xs" @change="coin_event" :value="coin_index" :range="coin_list" range-key="name">
<view class="picker flex-row">
<text class="cr-666">{{ coin_list[coin_index]['name'] }}</text>
<view class="padding-left-sm">
<iconfont name="icon-arrow-bottom" size="24rpx" color="#666"></iconfont>
</view>
</view>
</picker>
<view class="fw-b text-size">{{ is_price_show ? '5410.00' : '***' }}</view>
</view>
</view>
<view @tap="price_change">
<iconfont :name="is_price_show ? 'icon-wodeqianbao-eye' : 'icon-wodeqianbao-eyeclo2'" size="44rpx"></iconfont>
</view>
</view>
<view class="flex-row jc-sb">
<view v-for="(item, index) in coin_oprate_list" class="flex-1 padding-sm tc text-size-md" :key="index" :data-value="item.url" :data-method="item.method" @tap="url_event">
<view class="coin-oprate-list bg-white flex-row align-c jc-c">
<view class="pr top-xs">
<iconfont :name="item.icon" size="28rpx" color="#635BFF"></iconfont>
</view>
<view class="margin-left-sm fw-b">{{ item.name }}</view>
</view>
</view>
</view>
</view>
<view class="coin-content padding-lg">
<view v-for="(item, index) in coin_data" :key="index" class="bg-white radius-md padding-main margin-bottom-main">
<view class="br-b-dashed padding-bottom-main margin-bottom-main flex-row jc-sb align-c">
<view>消费</view>
<view class="cr-grey-9">2023-09-20 15:12:35</view>
</view>
<view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">金额类型</text>
<text class="fw-b">有效</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">操作金额</text>
<text class="fw-b">2190.00</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">原始金额</text>
<text class="fw-b">1500.00</text>
</view>
<view class="flex-row">
<text class="cr-grey-9">最新金额</text>
<text class="fw-b">1500.00</text>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 明细 -->
<component-popup :propShow="popup_user_detail_status" propPosition="bottom" @onclose="popup_user_detail_close_event">
<view class="padding-horizontal-main padding-top-main bg-white">
<view class="oh">
<text class="text-size">明细</text>
<view class="fr" @tap.stop="popup_user_detail_close_event">
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
</view>
</view>
<view class="popup_user_detail_container padding-vertical-main flex-row flex-warp align-c tc text-size">
<view class="flex-width-half">
<view class="item padding-vertical-lg radius margin-sm" data-value="/pages/plugins/coin/transfer-accounts-detail/transfer-accounts-detail" @tap="url_event"></view>
</view>
<view class="flex-width-half">
<view class="item padding-vertical-lg radius margin-sm" data-value="/pages/plugins/coin/transaction-detail/transaction-detail" @tap="url_event"></view>
</view>
<view class="flex-width-half">
<view class="item padding-vertical-lg radius margin-sm" data-value="/pages/plugins/coin/withdrawal-detail/withdrawal-detail" @tap="url_event"></view>
</view>
<view class="flex-width-half">
<view class="item padding-vertical-lg radius margin-sm" data-value="/pages/plugins/coin/convert-detail/convert-detail" @tap="url_event"></view>
</view>
</view>
</view>
</component-popup>
</view>
</view>
</template>
<script>
const app = getApp();
import componentNavBack from '@/components/nav-back/nav-back';
import componentNoData from '@/components/no-data/no-data';
import componentPopup from '@/components/popup/popup';
var wallet_static_url = app.globalData.get_static_url('coin', true) + 'app/';
//
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
// #ifdef MP-TOUTIAO
bar_height = 0;
// #endif
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
wallet_static_url: wallet_static_url,
status_bar_height: bar_height,
//
is_price_show: false,
//
coin_oprate_list: [
{
name: '充值',
icon: 'icon-transfer-count',
url: '/pages/plugins/coin/recharge/recharge',
},
{
name: '收款',
icon: 'icon-collection',
url: '/pages/plugins/coin/convert/convert',
},
{
name: '明细',
icon: 'icon-detail',
url: '',
method: true,
},
],
coin_data: [
{
img: wallet_static_url + 'user-head-bg.png',
name: 'BTC',
price: '¥20000',
num: '200000',
},
],
//
coin_index: 0,
coin_list: [
{
name: 'BTC',
img: wallet_static_url + 'recharge-price.png',
},
{
name: 'USDT-polygon',
img: wallet_static_url + 'recharge-price.png',
},
],
//
popup_user_detail_status: false,
};
},
components: {
componentNavBack,
componentNoData,
componentPopup,
},
props: {},
onLoad(params) {
//
app.globalData.page_event_onload_handle(params);
this.init();
},
onShow() {
//
app.globalData.page_event_onshow_handle();
//
app.globalData.page_share_handle();
},
//
onPullDownRefresh() {
this.get_data();
},
methods: {
init(e) {
var user = app.globalData.get_user_info(this, 'init');
if (user != false) {
//
if (app.globalData.user_is_need_login(user)) {
uni.navigateTo({
url: '/pages/login/login?event_callback=init',
});
} else {
this.get_data();
}
}
},
//
get_data() {},
//
price_change() {
this.setData({
is_price_show: !this.is_price_show,
});
},
//
scroll_event(e) {
uni.$emit('onPageScroll', e.detail);
},
//
coin_event(e) {
this.setData({
coin_index: parseInt(e.detail.value || 0),
});
},
//
popup_user_detail_open_event() {
this.setData({
popup_user_detail_status: true,
});
},
//
popup_user_detail_close_event(e) {
this.setData({
popup_user_detail_status: false,
});
},
// url
url_event(e) {
console.log(e);
if (e.currentTarget.dataset.method) {
this.popup_user_detail_open_event();
} else {
app.globalData.url_event(e);
}
},
},
};
</script>
<style>
@import './detail.css';
</style>

View File

@ -21,19 +21,19 @@
<view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">金额类型</text>
<text>有效</text>
<text class="fw-b">有效</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">操作金额</text>
<text>2190.00</text>
<text class="fw-b">2190.00</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">原始金额</text>
<text>1500.00</text>
<text class="fw-b">1500.00</text>
</view>
<view class="margin-bottom-sm flex-row">
<view class="flex-row">
<text class="cr-grey-9">最新金额</text>
<text>1500.00</text>
<text class="fw-b">1500.00</text>
</view>
</view>
</view>

View File

@ -21,15 +21,15 @@
<view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">收款人</text>
<text>李晓丽</text>
<text class="fw-b">李晓丽</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">转账金额</text>
<text>2190.00</text>
<text class="fw-b">2190.00</text>
</view>
<view class="margin-bottom-sm flex-row">
<view class="flex-row">
<text class="cr-grey-9">转账备注</text>
<text>收款后请尽快联系</text>
<text class="fw-b">收款后请尽快联系</text>
</view>
</view>
</view>

View File

@ -25,7 +25,7 @@
<view class="coin-content padding-lg">
<view class="bg-white radius-lg padding-sm">
<view class="coin-item padding-main">
<view v-for="(item, index) in coin_data" :key="index" class="flex-row jc-sb align-c" :class="coin_data.length == index + 1 ? '' : 'br-b-f5 margin-bottom-lg padding-bottom-lg'">
<view v-for="(item, index) in coin_data" :key="index" class="flex-row jc-sb align-c" :class="coin_data.length == index + 1 ? '' : 'br-b-f5 margin-bottom-lg padding-bottom-lg'" :data-value="item.url + '?id=' + item.id" @tap="url_event">
<view class="flex-width flex-row align-c padding-right-main">
<image :src="item.img" mode="widthFix" class="coin-content-list-img round" />
<text class="fw-b single-text margin-left-main">{{ item.name }}</text>
@ -112,10 +112,12 @@
],
coin_data: [
{
id: 0,
img: wallet_static_url + 'user-head-bg.png',
name: 'BTC',
price: '¥20000',
num: '200000',
url: '/pages/plugins/coin/detail/detail',
},
],
//

View File

@ -0,0 +1,11 @@
.withdrawal .nav {
z-index: 102;
}
/*
*
*/
.popup_wallet_container .item {
background-color: #f4f4f4;
border-radius: 30rpx;
}

View File

@ -1,6 +1,6 @@
<template>
<view :class="theme_view">
<view class="transfer-accounts">
<view class="withdrawal">
<view class="padding-main bg-white pr nav flex-row">
<view class="flex-row align-c margin-right-main" @tap="popup_wallet_open_event">
<view>钱包</view>
@ -15,21 +15,17 @@
<view class="padding-main">
<view class="padding-main bg-white radius-md">
<view class="br-b-dashed padding-bottom-main margin-bottom-main flex-row jc-sb align-c">
<view>转账时间</view>
<view class="cr-grey-9">2023-09-20 15:12:35</view>
<view>未打款</view>
</view>
<view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">收款人</text>
<text>李晓丽</text>
<text class="cr-grey-9">提现单号</text>
<text class="fw-b">202330303030303030</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">转账金额</text>
<text>2190.00</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9">转账备注</text>
<text>收款后请尽快联系</text>
<view class="flex-row">
<text class="cr-grey-9">提现金额</text>
<text class="fw-b">2190.00</text>
</view>
</view>
</view>
@ -248,5 +244,5 @@
};
</script>
<style>
@import './transfer-accounts-detail.css';
@import './withdrawal-detail.css';
</style>