diff --git a/pages/plugins/coin/convert-detail/convert-detail.vue b/pages/plugins/coin/convert-detail/convert-detail.vue index 08200948..f0769426 100644 --- a/pages/plugins/coin/convert-detail/convert-detail.vue +++ b/pages/plugins/coin/convert-detail/convert-detail.vue @@ -2,9 +2,9 @@ - + 账户 - + @@ -50,6 +50,9 @@ 账户种类 + + 全部 + {{ item.platform_name }} @@ -79,6 +82,9 @@ return { theme_view: app.globalData.get_theme_value_view(), accounts_static_url: accounts_static_url, + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, // 弹窗距离顶部距离 popup_top_height: 0, @@ -86,7 +92,7 @@ // 账户 popup_accounts_status: false, accounts_id: null, - accounts_list_index: 0, + accounts_list_index: null, accounts_list: [], data: [], diff --git a/pages/plugins/coin/recharge-detail/recharge-detail.vue b/pages/plugins/coin/recharge-detail/recharge-detail.vue index bc2c2618..857fe27c 100644 --- a/pages/plugins/coin/recharge-detail/recharge-detail.vue +++ b/pages/plugins/coin/recharge-detail/recharge-detail.vue @@ -2,17 +2,17 @@ - + 账户 - + - + 状态 - + - + 网络 - + @@ -58,6 +58,9 @@ 账户种类 + + 全部 + {{ item.platform_name }} @@ -73,6 +76,9 @@ 提现类型 + + 全部 + {{ item.name }} @@ -88,6 +94,9 @@ 提现类型 + + 全部 + {{ item.name }} @@ -127,17 +136,17 @@ // 账户 popup_accounts_status: false, accounts_id: null, - accounts_list_index: 0, + accounts_list_index: null, accounts_list: [], // 类型 popup_recharge_status_status: false, status: null, - recharge_status_list_index: 0, + recharge_status_list_index: null, recharge_status_list: [], // 网络 popup_network_status: false, network_id: null, - network_list_index: 0, + network_list_index: null, network_list: [], data: [], diff --git a/pages/plugins/coin/transaction-detail/transaction-detail.css b/pages/plugins/coin/transaction-detail/transaction-detail.css index c2d725b0..21b544d1 100644 --- a/pages/plugins/coin/transaction-detail/transaction-detail.css +++ b/pages/plugins/coin/transaction-detail/transaction-detail.css @@ -5,10 +5,14 @@ height: calc(100vh - 88rpx); } +.convert-group-row .title { + min-width: 140rpx; +} + /* * 钱包弹窗 */ -.popup_wallet_container .item { +.popup_accounts_container .item { background-color: #f4f4f4; border-radius: 30rpx; } \ No newline at end of file diff --git a/pages/plugins/coin/transaction-detail/transaction-detail.vue b/pages/plugins/coin/transaction-detail/transaction-detail.vue index 99959d25..0ea9bfdd 100644 --- a/pages/plugins/coin/transaction-detail/transaction-detail.vue +++ b/pages/plugins/coin/transaction-detail/transaction-detail.vue @@ -2,68 +2,128 @@ - - 钱包 - + + 账户 + - - 类型 - + + 操作类型 + + + + 业务类型 + + + + 币类型 + - {{ item.status }} - {{ item.date }} + {{ item.business_type_name }} + {{ item.add_time }} - + - 金额类型: - {{ item.price_type }} + 币类型: + {{ item.coin_type_name }} - 操作金额: - {{ item.price }} + 操作类型: + {{ item.operate_type_name }} - 原始金额: - {{ item.init_price }} + 操作币: + {{ item.operate_coin }} + + + 原始币: + {{ item.original_coin }} + + + 最新币: + {{ item.latest_coin }} - 最新金额: - {{ item.new_price }} + 描述: + {{ item.msg }} + + - - + + - 钱包种类 - - - {{ item.name }} + 账户种类 + + + 全部 + + + {{ item.platform_name }} - + {{ $t('nav-more.nav-more.h9g4b1') }} - - + + 提现类型 - - - {{ item.name }} + + + 全部 + + + {{ item.name }} - + + {{ $t('nav-more.nav-more.h9g4b1') }} + + + + + + + + 提现类型 + + + 全部 + + + {{ item.name }} + + + + {{ $t('nav-more.nav-more.h9g4b1') }} + + + + + + + + 提现类型 + + + 全部 + + + {{ item.name }} + + + {{ $t('nav-more.nav-more.h9g4b1') }} @@ -76,7 +136,8 @@ 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/'; + import componentBottomLine from '@/components/bottom-line/bottom-line'; + var accounts_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 @@ -86,185 +147,46 @@ data() { return { theme_view: app.globalData.get_theme_value_view(), - wallet_static_url: wallet_static_url, + accounts_static_url: accounts_static_url, + data_list_loding_status: 1, + data_list_loding_msg: '', + data_bottom_line_status: false, // 弹窗距离顶部距离 popup_top_height: 0, - // 钱包 - popup_wallet_status: false, - wallet_list_index: 0, - wallet_list: [ - { - name: '全部', - }, - { - name: 'BTC', - }, - { - name: 'ETH', - }, - { - name: 'XRP', - }, - { - name: 'DASH', - }, - ], - // 类型 - popup_type_status: false, - type_list_index: 0, - type_list: [ - { - name: '全部', - }, - { - name: '未打款', - }, - { - name: '已打款', - }, - { - name: '打款失败', - }, - ], + // 账户 + popup_accounts_status: false, + accounts_id: null, + accounts_list_index: null, + accounts_list: [], + // 操作类型 + popup_operate_type_status: false, + operate_type: null, + operate_type_list_index: null, + operate_type_list: [], + // 业务类型 + popup_business_type_status: false, + business_type: null, + business_type_list_index: null, + business_type_list: [], + // 币类型 + popup_coin_type_status: false, + coin_type: null, + coin_type_list_index: null, + coin_type_list: [], - data: [ - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - { - date: '2023-12-12', - status: '消费', - price_type: '有效', - price: '20000', - init_price: '20000', - new_price: '收款后请尽快联系', - }, - ], + data: [], + data_page_total: 0, + data_page: 1, + data_is_loading: 0, }; }, components: { componentNoData, componentPopup, + componentBottomLine, }, props: {}, @@ -285,13 +207,17 @@ // 下拉刷新 onPullDownRefresh() { - this.get_data(); + this.setData({ + data_page: 1, + }); + this.get_data_list(1); }, methods: { init(e) { var user = app.globalData.get_user_info(this, 'init'); if (user != false) { - this.get_data(); + this.init_data(); + this.get_data_list(); var self = this; var timer = setInterval(function () { if (self.popup_top_height == 0) { @@ -303,53 +229,253 @@ } }, + // 初始化数据 + init_data() { + uni.request({ + url: app.globalData.get_request_url('init', 'user', 'coin'), + method: 'POST', + data: {}, + dataType: 'json', + success: (res) => { + uni.stopPullDownRefresh(); + console.log(res.data.data); + if (res.data.code == 0) { + var data = res.data.data; + this.setData({ + accounts_list: data.accounts_list || [], + operate_type_list: data.log_operate_type_list || [], + business_type_list: data.log_business_type_list || [], + coin_type_list: data.log_coin_type_list || [], + }); + } else { + if (app.globalData.is_login_check(res.data, this, 'get_data_list')) { + app.globalData.showToast(res.data.msg); + } + } + }, + fail: () => { + uni.stopPullDownRefresh(); + app.globalData.showToast(this.$t('common.internet_error_tips')); + }, + }); + }, + // 获取数据 - get_data() {}, + get_data_list(is_mandatory) { + // 分页是否还有数据 + if ((is_mandatory || 0) == 0) { + if (this.data_bottom_line_status == true) { + uni.stopPullDownRefresh(); + return false; + } + } + // 是否加载中 + if (this.data_is_loading == 1) { + return false; + } + this.setData({ + data_is_loading: 1, + data_list_loding_status: 1, + }); + // 加载loding + if (this.data_page > 1) { + uni.showLoading({ + title: this.$t('common.loading_in_text'), + }); + } + var new_data = { + accounts_id: this.accounts_id, + business_type: this.business_type, + operate_type: this.operate_type, + coin_type: this.coin_type, + page: this.data_page, + }; + uni.request({ + url: app.globalData.get_request_url('index', 'accountslog', 'coin'), + method: 'POST', + data: new_data, + dataType: 'json', + success: (res) => { + if (this.data_page > 1) { + uni.hideLoading(); + } + console.log(res.data.data); + uni.stopPullDownRefresh(); + if (res.data.code == 0) { + var data = res.data.data; + if (data.data_list.length > 0) { + if (this.data_page <= 1) { + var temp_data_list = data.data_list; + } else { + var temp_data_list = this.data || []; + var temp_data = res.data.data.data; + for (var i in temp_data) { + temp_data_list.push(temp_data[i]); + } + } + this.setData({ + data: temp_data_list, + data_page_total: data.page_total, + data_page: data.page + 1, + data_list_loding_msg: '', + data_list_loding_status: 3, + data_is_loading: 0, + }); - // 钱包打开 - popup_wallet_open_event() { - if (!this.popup_type_status) { + // 是否还有数据 + this.setData({ + data_bottom_line_status: this.data_page > 1 && this.data_page > this.data_page_total, + }); + } else { + if (data.page <= 1) { + this.setData({ + data: data.data_list, + data_page_total: data.page_total, + data_page: data.page + 1, + data_list_loding_msg: '', + data_list_loding_status: 3, + data_is_loading: 0, + }); + } else { + this.setData({ + data_list_loding_status: 0, + data_is_loading: 0, + }); + } + if (app.globalData.is_login_check(res.data, this, 'get_data_list')) { + app.globalData.showToast(res.data.msg); + } + } + } else { + this.setData({ + data_list_loding_status: 2, + data_list_loding_msg: res.data.msg, + }); + if (app.globalData.is_login_check(res.data, this, 'get_data_list')) { + app.globalData.showToast(res.data.msg); + } + } + }, + fail: () => { + if (this.data_page > 1) { + uni.hideLoading(); + } + uni.stopPullDownRefresh(); + this.setData({ + data_list_loding_status: 2, + data_list_loding_msg: this.$t('common.internet_error_tips'), + }); + app.globalData.showToast(this.$t('common.internet_error_tips')); + }, + }); + }, + + // 账户打开 + popup_accounts_open_event() { + if (!this.popup_operate_type_status && !this.popup_business_type_status && !this.popup_coin_type_status) { this.setData({ - popup_wallet_status: !this.popup_wallet_status, + popup_accounts_status: !this.popup_accounts_status, }); } }, - // 钱包关闭 - popup_wallet_close_event() { + // 账户关闭 + popup_accounts_close_event() { this.setData({ - popup_wallet_status: false, + popup_accounts_status: false, }); }, - // 钱包选择 - wallet_event(e) { + // 账户选择 + accounts_list_event(e) { this.setData({ - wallet_list_index: e.currentTarget.dataset.index, + accounts_list_index: e.currentTarget.dataset.index, + accounts_id: e.currentTarget.dataset.value, + popup_accounts_status: false, + data_page: 1, }); + this.get_data_list(1); }, - // 类型打开 - popup_type_open_event() { - if (!this.popup_wallet_status) { + // 操作类型打开 + popup_operate_type_open_event() { + if (!this.popup_accounts_status && !this.popup_business_type_status && !this.popup_coin_type_status) { this.setData({ - popup_type_status: !this.popup_type_status, + popup_operate_type_status: !this.popup_operate_type_status, }); } }, - // 类型关闭 - popup_type_close_event() { + // 操作类型关闭 + popup_operate_type_close_event() { this.setData({ - popup_type_status: false, + popup_operate_type_status: false, }); }, - // 类型选择 - type_event(e) { + // 操作类型选择 + operate_type_list_event(e) { this.setData({ - type_list_index: e.currentTarget.dataset.index, + operate_type_list_index: e.currentTarget.dataset.index, + operate_type: e.currentTarget.dataset.value, + popup_operate_type_status: false, + data_page: 1, }); + this.get_data_list(1); + }, + + // 业务类型打开 + popup_business_type_open_event() { + if (!this.popup_accounts_status && !this.popup_operate_type_status && !this.popup_coin_type_status) { + this.setData({ + popup_business_type_status: !this.popup_business_type_status, + }); + } + }, + + // 业务类型关闭 + popup_business_type_close_event() { + this.setData({ + popup_business_type_status: false, + }); + }, + + // 业务类型选择 + business_type_list_event(e) { + this.setData({ + business_type_list_index: e.currentTarget.dataset.index, + business_type: e.currentTarget.dataset.value, + popup_business_type_status: false, + data_page: 1, + }); + this.get_data_list(1); + }, + + // 币类型打开 + popup_coin_type_open_event() { + if (!this.popup_accounts_status && !this.popup_operate_type_status && !this.popup_business_type_status) { + this.setData({ + popup_coin_type_status: !this.popup_coin_type_status, + }); + } + }, + + // 币类型关闭 + popup_coin_type_close_event() { + this.setData({ + popup_coin_type_status: false, + }); + }, + + // 币类型选择 + coin_type_list_event(e) { + this.setData({ + coin_type_list_index: e.currentTarget.dataset.index, + coin_type: e.currentTarget.dataset.value, + popup_coin_type_status: false, + data_page: 1, + }); + this.get_data_list(1); }, // 计算搜索框的高度 diff --git a/pages/plugins/coin/transfer-accounts-detail/transfer-accounts-detail.vue b/pages/plugins/coin/transfer-accounts-detail/transfer-accounts-detail.vue index 17c10930..c8239c37 100644 --- a/pages/plugins/coin/transfer-accounts-detail/transfer-accounts-detail.vue +++ b/pages/plugins/coin/transfer-accounts-detail/transfer-accounts-detail.vue @@ -2,9 +2,9 @@ - + 账户 - + @@ -81,7 +81,7 @@ // 账户 popup_accounts_status: false, accounts_id: null, - accounts_list_index: 0, + accounts_list_index: null, accounts_list: [], data: [], diff --git a/pages/plugins/coin/withdrawal-detail/withdrawal-detail.vue b/pages/plugins/coin/withdrawal-detail/withdrawal-detail.vue index 76224185..e176e81e 100644 --- a/pages/plugins/coin/withdrawal-detail/withdrawal-detail.vue +++ b/pages/plugins/coin/withdrawal-detail/withdrawal-detail.vue @@ -2,17 +2,17 @@ - + 账户 - + - + 状态 - + - + 网络 - + @@ -123,17 +123,17 @@ // 账户 popup_accounts_status: false, accounts_id: null, - accounts_list_index: 0, + accounts_list_index: null, accounts_list: [], // 类型 popup_recharge_status_status: false, status: null, - recharge_status_list_index: 0, + recharge_status_list_index: null, recharge_status_list: [], // 网络 popup_network_status: false, network_id: null, - network_list_index: 0, + network_list_index: null, network_list: [], data: [],