parent
f00a181dbd
commit
66958f57ec
4
App.vue
4
App.vue
|
|
@ -7,11 +7,11 @@
|
|||
data: {
|
||||
// 基础配置
|
||||
// 数据接口请求地址
|
||||
request_url: 'https://d1.shopxo.vip/',
|
||||
request_url: 'http://shopxo.com/',
|
||||
// request_url: 'https://new.shopxo.vip/',
|
||||
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
|
||||
static_url: 'https://d1.shopxo.vip/',
|
||||
static_url: 'http://shopxo.com/',
|
||||
// static_url: 'https://new.shopxo.vip/',
|
||||
|
||||
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
|
||||
|
|
|
|||
|
|
@ -1,23 +1,25 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view>
|
||||
<view v-if="coin_list.length > 0">
|
||||
<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>
|
||||
<view class="flex-row align-c pr coin-dropdown" @tap="popup_coin_status_event(1)">
|
||||
<image :src="coin_list[coin_index_old]['img']" mode="widthFix" class="coin-content-list-img round" />
|
||||
<text class="margin-left-sm fw-b single-text">{{ coin_list[coin_index_old]['name'] }}</text>
|
||||
<image :src="coin_list[send_accounts_id_index]['platform_icon']" mode="widthFix" class="coin-content-list-img round" />
|
||||
<text class="margin-left-sm fw-b single-text">{{ coin_list[send_accounts_id_index]['platform_name'] }}</text>
|
||||
<view class="coin-dropdown-icon pa padding-left-xxl">
|
||||
<iconfont name="icon-arrow-bottom" size="24rpx" color="#666"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<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="margin-top-main text-size-xs flex-row align-c">
|
||||
<text class="margin-right-sm">余额:</text><text class="cr-blue">{{ coin_list[send_accounts_id_index]['platform_symbol'] }}{{ coin_list[send_accounts_id_index]['normal_coin'] }}</text>
|
||||
</view>
|
||||
</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>
|
||||
<input type="digit" name="coin" :value="default_value" class="num input-br text-size" placeholder-class="text-size-sm cr-grey-9" placeholder="金额" @input="default_value_change" />
|
||||
<view class="margin-top-main tr text-size-xs">{{ coin_list[send_accounts_id_index]['platform_symbol'] }}{{ coin_list[send_accounts_id_index]['default_coin'] }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coin-center-convert pa flex-row jc-c align-c" @tap="coin_center_convert_event(2)">
|
||||
|
|
@ -26,17 +28,19 @@
|
|||
<view class="br-f5 margin-bottom-main radius-md padding-lg flex-row jc-sb">
|
||||
<view>
|
||||
<view class="flex-row align-c pr coin-dropdown" @tap="popup_coin_status_event">
|
||||
<image :src="coin_list[coin_index_new]['img']" mode="widthFix" class="coin-content-list-img round" />
|
||||
<text class="margin-left-sm fw-b single-text">{{ coin_list[coin_index_new]['name'] }}</text>
|
||||
<image :src="coin_list[receive_accounts_id_index]['platform_icon']" mode="widthFix" class="coin-content-list-img round" />
|
||||
<text class="margin-left-sm fw-b single-text">{{ coin_list[receive_accounts_id_index]['platform_name'] }}</text>
|
||||
<view class="coin-dropdown-icon pa padding-left-xxl">
|
||||
<iconfont name="icon-arrow-bottom" size="24rpx" color="#666"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<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="margin-top-main text-size-xs flex-row align-c">
|
||||
<text class="margin-right-sm">余额:</text><text class="cr-blue">{{ coin_list[receive_accounts_id_index]['platform_symbol'] }}{{ coin_list[receive_accounts_id_index]['normal_coin'] }}</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>
|
||||
<input type="digit" :value="convert_value" class="num text-size" placeholder-class="text-size-sm cr-grey-9" disabled placeholder="金额" />
|
||||
<view class="margin-top-main tr text-size-xs">{{ coin_list[receive_accounts_id_index]['platform_symbol'] }}{{ coin_list[receive_accounts_id_index]['default_coin'] }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row align-c">
|
||||
|
|
@ -46,7 +50,7 @@
|
|||
</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="请输入支付密码" />
|
||||
<input type="number" :value="pay_pwd" 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="convert_submit">立即转换</button>
|
||||
|
|
@ -63,10 +67,10 @@
|
|||
</view>
|
||||
<view class="popup_coin_status_container padding-vertical-main flex-col text-size">
|
||||
<view class="scroll-y">
|
||||
<view v-for="(item, index) in coin_list" :key="index" class="flex-row jc-sb align-c padding-vertical-main" :class="coin_list.length == index + 1 ? '' : 'br-b-f9'" :data-value="item" :data-index="index" @tap="coin_checked_event">
|
||||
<view v-for="(item, index) in coin_list" :key="index" class="flex-row jc-sb align-c padding-vertical-main" :class="coin_list.length == index + 1 ? '' : 'br-b-f9'" :data-value="item.id" :data-index="index" @tap="coin_checked_event">
|
||||
<view class="flex-row align-c">
|
||||
<image :src="item.img" mode="widthFix" class="coin-list-img round" />
|
||||
<view class="margin-left-sm text-size-md single-text">{{ item.name }}</view>
|
||||
<image :src="item.platform_icon" mode="widthFix" class="coin-list-img round" />
|
||||
<view class="margin-left-sm text-size-md single-text">{{ item.platform_name }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<iconfont :name="coin_index === index ? 'icon-zhifu-yixuan cr-red' : 'icon-zhifu-weixuan'" size="36rpx"></iconfont>
|
||||
|
|
@ -98,21 +102,31 @@
|
|||
// 虚拟币状态
|
||||
coin_type: 1,
|
||||
coin_index: 0,
|
||||
coin_index_old: 0,
|
||||
coin_index_new: 0,
|
||||
// 下标
|
||||
send_accounts_id_index: 0,
|
||||
receive_accounts_id_index: 0,
|
||||
// id
|
||||
send_accounts_id: 0,
|
||||
receive_accounts_id: 0,
|
||||
popup_coin_status: false,
|
||||
coin_list: [
|
||||
{
|
||||
name: 'BTC',
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
},
|
||||
// {
|
||||
// name: 'BTC',
|
||||
// img: wallet_static_url + 'user-head-bg.png',
|
||||
// },
|
||||
// {
|
||||
// name: 'USDT-polygon',
|
||||
// img: wallet_static_url + 'user-head-bg.png',
|
||||
// },
|
||||
],
|
||||
// 是否转换
|
||||
convert_bool: false,
|
||||
// 输入默认金额
|
||||
default_value: '',
|
||||
// 转换金额
|
||||
convert_value: '0.00',
|
||||
// 支付密码
|
||||
pay_pwd: '',
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -149,24 +163,64 @@
|
|||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {},
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('createinfo', 'convert', 'coin'),
|
||||
method: 'POST',
|
||||
data: { send_accounts_id: this.send_accounts_id, receive_accounts_id: this.receive_accounts_id },
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
coin_list: data.accounts_list || [],
|
||||
convert_value: data.convert_value || '0',
|
||||
send_accounts_id: data.send_accounts.id,
|
||||
receive_accounts_id: data.receive_accounts.id,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
});
|
||||
} 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')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
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_coin_status_event(type) {
|
||||
this.setData({
|
||||
coin_type: type,
|
||||
coin_index: type == 1 ? this.coin_index_old : this.coin_index_new,
|
||||
coin_index: type == 1 ? this.send_accounts_id_index : this.receive_accounts_id_index,
|
||||
popup_coin_status: true,
|
||||
});
|
||||
},
|
||||
coin_checked_event(e) {
|
||||
if (this.coin_type == 1) {
|
||||
this.setData({
|
||||
coin_index_old: parseInt(e.currentTarget.dataset.index || 0),
|
||||
send_accounts_id_index: parseInt(e.currentTarget.dataset.index || 0),
|
||||
send_accounts_id: e.currentTarget.dataset.value,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
coin_index_new: parseInt(e.currentTarget.dataset.index || 0),
|
||||
receive_accounts_id_index: parseInt(e.currentTarget.dataset.index || 0),
|
||||
receive_accounts_id: e.currentTarget.dataset.value,
|
||||
});
|
||||
}
|
||||
this.setData({
|
||||
|
|
@ -182,17 +236,77 @@
|
|||
|
||||
// 虚拟货币调换
|
||||
coin_center_convert_event() {
|
||||
var old_index = this.coin_index_old;
|
||||
var new_index = this.coin_index_new;
|
||||
var send_index = this.send_accounts_id_index;
|
||||
var receive_index = this.receive_accounts_id_index;
|
||||
var send_id = this.send_accounts_id;
|
||||
var receive_id = this.receive_accounts_id;
|
||||
this.setData({
|
||||
coin_index_new: old_index,
|
||||
coin_index_old: new_index,
|
||||
receive_accounts_id_index: send_index,
|
||||
send_accounts_id_index: receive_index,
|
||||
receive_accounts_id: send_id,
|
||||
send_accounts_id: receive_id,
|
||||
convert_bool: !this.convert_bool,
|
||||
});
|
||||
},
|
||||
default_value_change(e) {
|
||||
this.setData({
|
||||
default_value: e.detail.value,
|
||||
});
|
||||
},
|
||||
|
||||
// 立即转换
|
||||
convert_submit() {},
|
||||
convert_submit() {
|
||||
var new_data = {
|
||||
send_accounts_id: this.send_accounts_id,
|
||||
receive_accounts_id: this.receive_accounts_id,
|
||||
coin: this.default_value,
|
||||
};
|
||||
|
||||
// 数据校验
|
||||
var validation = [{ fields: 'coin', msg: '请输入转换金额' }];
|
||||
|
||||
// 验证提交表单
|
||||
if (app.globalData.fields_check(new_data, validation)) {
|
||||
// 远程请求
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('create', 'convert', 'coin'),
|
||||
method: 'POST',
|
||||
data: new_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
setTimeout(function () {
|
||||
app.globalData.url_open('/pages/plugins/coin/convert-detail/convert-detail', true);
|
||||
}, 1000);
|
||||
} else {
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
scroll_event(e) {
|
||||
|
|
|
|||
|
|
@ -4,17 +4,17 @@
|
|||
<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 v-if="accounts_list.length > 0" 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" />
|
||||
<image :src="accounts_list[accounts_list_index]['platform_icon']" mode="widthFix" class="coin-content-list-img round" />
|
||||
<view class="padding-left-main">
|
||||
<view class="coin-dropdown text-size-md pr margin-bottom-xs flex-row" @tap="popup_coin_status_open_event">
|
||||
<text class="cr-666">{{ coin_list[coin_index]['name'] }}</text>
|
||||
<text class="cr-666">{{ accounts_list[accounts_list_index]['platform_name'] }}</text>
|
||||
<view class="padding-left-sm">
|
||||
<iconfont name="icon-arrow-bottom" size="24rpx" color="#666"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fw-b text-size">{{ is_price_show ? '5410.00' : '***' }}</view>
|
||||
<view class="fw-b text-size">{{ is_price_show ? accounts_list[accounts_list_index]['normal_coin'] : '***' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="price_change">
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="coin-content padding-lg">
|
||||
<view v-for="(item, index) in data" :key="index" class="bg-white radius-md padding-main margin-bottom-main">
|
||||
<view v-for="(item, index) in log_list" :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>{{ item.type }}</view>
|
||||
<view class="cr-grey-9">{{ item.date }}</view>
|
||||
|
|
@ -59,55 +59,55 @@
|
|||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 虚拟币下拉框 -->
|
||||
<component-popup :propShow="popup_coin_status" propPosition="bottom" @onclose="popup_coin_status_close_event">
|
||||
<view class="padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="oh">
|
||||
<view class="fr" @tap.stop="popup_coin_status_close_event">
|
||||
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 虚拟币下拉框 -->
|
||||
<component-popup :propShow="popup_coin_status" propPosition="bottom" @onclose="popup_coin_status_close_event">
|
||||
<view class="padding-horizontal-main padding-top-main bg-white">
|
||||
<view class="oh">
|
||||
<view class="fr" @tap.stop="popup_coin_status_close_event">
|
||||
<iconfont name="icon-close-o" size="28rpx" color="#999"></iconfont>
|
||||
</view>
|
||||
<view class="popup_coin_status_container padding-vertical-main flex-col text-size">
|
||||
<view class="scroll-y">
|
||||
<view v-for="(item, index) in coin_list" :key="index" class="flex-row jc-sb align-c padding-vertical-main" :class="coin_list.length == index + 1 ? '' : 'br-b-f9'" :data-value="item" :data-index="index" @tap="coin_checked_event">
|
||||
<view class="flex-row align-c">
|
||||
<image :src="item.img" mode="widthFix" class="coin-list-img round" />
|
||||
<view class="margin-left-sm text-size-md single-text">{{ item.name }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<iconfont :name="coin_index === index ? 'icon-zhifu-yixuan cr-red' : 'icon-zhifu-weixuan'" size="36rpx"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup_coin_status_container padding-vertical-main flex-col text-size">
|
||||
<view class="scroll-y">
|
||||
<view v-for="(item, index) in accounts_list" :key="index" class="flex-row jc-sb align-c padding-vertical-main" :class="accounts_list.length == index + 1 ? '' : 'br-b-f9'" :data-value="item" :data-index="index" @tap="coin_checked_event">
|
||||
<view class="flex-row align-c">
|
||||
<image :src="item.platform_icon" mode="widthFix" class="coin-list-img round" />
|
||||
<view class="margin-left-sm text-size-md single-text">{{ item.platform_name }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<iconfont :name="accounts_list_index === index ? 'icon-zhifu-yixuan cr-red' : 'icon-zhifu-weixuan'" size="36rpx"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</component-popup>
|
||||
<!-- 明细 -->
|
||||
<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>
|
||||
</component-popup>
|
||||
<!-- 明细 -->
|
||||
<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>
|
||||
</component-popup>
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -127,74 +127,14 @@
|
|||
theme_view: app.globalData.get_theme_value_view(),
|
||||
wallet_static_url: wallet_static_url,
|
||||
status_bar_height: bar_height,
|
||||
params: null,
|
||||
|
||||
// 虚拟币下拉框探弹窗状态
|
||||
popup_coin_status: false,
|
||||
// 虚拟币下标
|
||||
coin_index: 0,
|
||||
accounts_list_index: 0,
|
||||
// 虚拟币下拉框list
|
||||
coin_list: [
|
||||
{
|
||||
name: 'BTC',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
],
|
||||
accounts_list: [],
|
||||
|
||||
// 是否显示虚拟币
|
||||
is_price_show: false,
|
||||
|
|
@ -221,112 +161,7 @@
|
|||
// 明细弹窗
|
||||
popup_user_detail_status: false,
|
||||
|
||||
data: [
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
type: '消费',
|
||||
price: '-20000',
|
||||
price_type: '有效',
|
||||
init_price: '22198.00',
|
||||
new_price: '200000.00',
|
||||
},
|
||||
],
|
||||
log_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -340,6 +175,10 @@
|
|||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
|
|
@ -364,7 +203,45 @@
|
|||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {},
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('detail', 'accounts', 'coin'),
|
||||
method: 'POST',
|
||||
data: { id: this.params.id },
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
console.log(res);
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
accounts_list: data.accounts_list || [],
|
||||
log_list: data.log_list || [],
|
||||
accounts_summary: data.accounts_summary || 0,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
});
|
||||
} 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')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 显示隐藏虚拟币
|
||||
price_change() {
|
||||
|
|
@ -381,7 +258,7 @@
|
|||
// 虚拟币切换
|
||||
coin_checked_event(e) {
|
||||
this.setData({
|
||||
coin_index: parseInt(e.currentTarget.dataset.index || 0),
|
||||
accounts_list_index: parseInt(e.currentTarget.dataset.index || 0),
|
||||
popup_coin_status: false,
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@
|
|||
text-align: center;
|
||||
padding: 30rpx 38rpx;
|
||||
}
|
||||
.recharge-qrcode .img {
|
||||
width: 160rpx !important;
|
||||
height: 160rpx !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* 内容
|
||||
|
|
@ -106,6 +110,7 @@
|
|||
.popup_coin_status_container .scroll-y {
|
||||
height: 40vh;
|
||||
overflow-y: auto;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.coin-list-img {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,12 @@
|
|||
<view class="text-size-40 fw-b">38000</view>
|
||||
</view>
|
||||
<view class="recharge-qrcode">
|
||||
<iconfont name="icon-qrcode" size="160rpx"></iconfont>
|
||||
<block v-if="recharge_qrcode">
|
||||
<image :src="recharge_qrcode" mode="widthFix" class="img margin-right-xs circle" />
|
||||
</block>
|
||||
<block v-else>
|
||||
<iconfont name="icon-qrcode" size="160rpx" color="#f6f6f6"></iconfont>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -112,7 +117,12 @@
|
|||
theme_view: app.globalData.get_theme_value_view(),
|
||||
wallet_static_url: wallet_static_url,
|
||||
status_bar_height: bar_height,
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
|
||||
// 付款码
|
||||
recharge_qrcode: '',
|
||||
// 虚拟币下拉框探弹窗状态
|
||||
popup_coin_status: false,
|
||||
// 虚拟币下标
|
||||
|
|
@ -123,62 +133,6 @@
|
|||
name: 'BTC',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
{
|
||||
name: 'USDT-polygon',
|
||||
img: wallet_static_url + 'recharge-price.png',
|
||||
},
|
||||
],
|
||||
// 充币网络
|
||||
recharge_web_index: 0,
|
||||
|
|
@ -226,6 +180,11 @@
|
|||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
|
|
@ -245,12 +204,89 @@
|
|||
init(e) {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.init_data();
|
||||
this.get_data();
|
||||
}
|
||||
},
|
||||
init_data(){
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('createinfo', 'recharge', 'coin'),
|
||||
method: 'POST',
|
||||
data: { accounts_id: this.params.id },
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
console.log('1');
|
||||
console.log(res);
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
accounts_list: data.accounts_list || [],
|
||||
accounts_summary: data.accounts_summary || 0,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
});
|
||||
} 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')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {},
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'recharge', 'coin'),
|
||||
method: 'POST',
|
||||
data: { accounts_id: this.params.id },
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
console.log(res);
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
accounts_list: data.accounts_list || [],
|
||||
accounts_summary: data.accounts_summary || 0,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
});
|
||||
} 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')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 显示隐藏虚拟币
|
||||
price_change() {
|
||||
|
|
|
|||
|
|
@ -6,12 +6,8 @@
|
|||
<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">
|
||||
<scroll-view :scroll-y="true" class="scroll-box" lower-threshold="60" @scroll="scroll_event" @scrolltolower="scroll_lower">
|
||||
<view class="padding-main">
|
||||
<view v-for="(item, index) in data" :key="index" class="padding-main bg-white radius-md margin-bottom-main">
|
||||
<view class="br-b-dashed padding-bottom-main margin-bottom-main flex-row jc-sb align-c">
|
||||
|
|
@ -21,18 +17,20 @@
|
|||
<view>
|
||||
<view class="margin-bottom-sm flex-row">
|
||||
<text class="cr-grey-9">收款人:</text>
|
||||
<text class="fw-b">{{item.payee}}</text>
|
||||
<text class="fw-b">{{ item.payee }}</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm flex-row">
|
||||
<text class="cr-grey-9">转账金额:</text>
|
||||
<text class="fw-b">{{item.transfer_amount}}</text>
|
||||
<text class="fw-b">{{ item.transfer_amount }}</text>
|
||||
</view>
|
||||
<view class="flex-row">
|
||||
<text class="cr-grey-9">转账备注:</text>
|
||||
<text class="fw-b">{{item.transfer_note}}</text>
|
||||
<text class="fw-b">{{ item.transfer_note }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 钱包 -->
|
||||
|
|
@ -40,8 +38,8 @@
|
|||
<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" :key="index">
|
||||
<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 v-for="(item, index) in accounts_list" class="flex-width-half-half" :key="index">
|
||||
<view class="item margin-sm padding-vertical-sm" :class="accounts_list_index === index ? 'cr-main bg-main-light' : ''" :data-index="index" :data-id="item.id" @tap="wallet_event">{{ item.platform_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tc padding-top-lg br-t" @tap="popup_wallet_close_event">
|
||||
|
|
@ -50,21 +48,6 @@
|
|||
</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" :key="index">
|
||||
<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>
|
||||
|
|
@ -72,6 +55,7 @@
|
|||
const app = getApp();
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
var wallet_static_url = app.globalData.get_static_url('coin', true) + 'app/';
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
|
||||
|
|
@ -83,193 +67,29 @@
|
|||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
wallet_static_url: wallet_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: '打款失败',
|
||||
},
|
||||
],
|
||||
data: [
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
{
|
||||
date: '2023-12-12',
|
||||
payee: '张三',
|
||||
transfer_amount: '20000',
|
||||
transfer_note: '收款后请尽快联系',
|
||||
},
|
||||
],
|
||||
accounts_list_index: 0,
|
||||
accounts_list: [],
|
||||
transfer_id: null,
|
||||
data: [],
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_is_loading: 0,
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentPopup,
|
||||
componentBottomLine,
|
||||
},
|
||||
props: {},
|
||||
|
||||
|
|
@ -290,13 +110,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) {
|
||||
|
|
@ -307,9 +131,122 @@
|
|||
}, 500);
|
||||
}
|
||||
},
|
||||
// 初始化数据
|
||||
init_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('init', 'user', 'coin'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
accounts_list: data.accounts_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'),
|
||||
});
|
||||
}
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'transfer', 'coin'),
|
||||
method: 'POST',
|
||||
data: { send_accounts_id: this.transfer_id, page: this.data_page },
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
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: this.page + 1,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 3,
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: this.data_page > 1 && this.data_page > this.data_page_total,
|
||||
});
|
||||
} 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_wallet_open_event() {
|
||||
|
|
@ -330,31 +267,11 @@
|
|||
// 钱包选择
|
||||
wallet_event(e) {
|
||||
this.setData({
|
||||
wallet_list_index: e.currentTarget.dataset.index,
|
||||
});
|
||||
},
|
||||
|
||||
// 类型打开
|
||||
popup_type_open_event() {
|
||||
if (!this.popup_wallet_status) {
|
||||
this.setData({
|
||||
popup_type_status: !this.popup_type_status,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 类型关闭
|
||||
popup_type_close_event() {
|
||||
this.setData({
|
||||
popup_type_status: false,
|
||||
});
|
||||
},
|
||||
|
||||
// 类型选择
|
||||
type_event(e) {
|
||||
this.setData({
|
||||
type_list_index: e.currentTarget.dataset.index,
|
||||
accounts_list_index: e.currentTarget.dataset.index,
|
||||
transfer_id: e.currentTarget.dataset.id,
|
||||
popup_wallet_status: false,
|
||||
});
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 计算搜索框的高度
|
||||
|
|
@ -374,8 +291,11 @@
|
|||
},
|
||||
|
||||
// 页面滚动监听
|
||||
scroll_event(e) {
|
||||
uni.$emit('onPageScroll', e.detail);
|
||||
scroll_event(e) {},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
border-bottom-right-radius: 60rpx;
|
||||
}
|
||||
|
||||
.coin-oprate-list {
|
||||
.coin-operate-list {
|
||||
--size: 96rpx;
|
||||
width: var(--size);
|
||||
height: var(--size);
|
||||
|
|
|
|||
|
|
@ -1,40 +1,60 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<component-nav-back></component-nav-back>
|
||||
<view>
|
||||
<view v-if="(data_base || null) != null">
|
||||
<scroll-view :scroll-y="true" class="scroll-box" lower-threshold="60" @scroll="scroll_event">
|
||||
<view class="coin-title flex-col padding-lg" :style="'background-image:url(' + wallet_static_url + 'user-head-bg.png)'">
|
||||
<view class="margin-bottom-main flex-row jc-sb align-c margin-top-xl">
|
||||
<view>
|
||||
<view class="cr-base text-size-md">总数量</view>
|
||||
<view class="text-size-40 fw-b">{{ is_price_show ? '5410.00' : '***' }}</view>
|
||||
<view class="text-size-40 fw-b">{{ is_price_show ? accounts_summary : '***' }}</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 padding-bottom-main">
|
||||
<view v-for="(item, index) in coin_oprate_list" class="tc text-size-xs" :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 margin-bottom-main">
|
||||
<iconfont :name="item.icon" size="44rpx" color="#635BFF"></iconfont>
|
||||
<view v-if="data_base.is_enable_recharge == '1'" class="tc text-size-xs" data-value="/pages/plugins/coin/recharge/recharge" @tap="url_event">
|
||||
<view class="coin-operate-list bg-white flex-row align-c jc-c margin-bottom-main">
|
||||
<iconfont name="icon-recharge" size="44rpx" color="#635BFF"></iconfont>
|
||||
</view>
|
||||
<view>{{ item.name }}</view>
|
||||
<view>充值</view>
|
||||
</view>
|
||||
<view v-if="data_base.is_enable_convert == '1'" class="tc text-size-xs" data-value="/pages/plugins/coin/convert/convert" @tap="url_event">
|
||||
<view class="coin-operate-list bg-white flex-row align-c jc-c margin-bottom-main">
|
||||
<iconfont name="icon-convert" size="44rpx" color="#635BFF"></iconfont>
|
||||
</view>
|
||||
<view>转换</view>
|
||||
</view>
|
||||
<view v-if="data_base.is_enable_cash == '1'" class="tc text-size-xs" data-value="/pages/plugins/coin/withdrawal/withdrawal" @tap="url_event">
|
||||
<view class="coin-operate-list bg-white flex-row align-c jc-c margin-bottom-main">
|
||||
<iconfont name="icon-withdrawal" size="44rpx" color="#635BFF"></iconfont>
|
||||
</view>
|
||||
<view>提现</view>
|
||||
</view>
|
||||
<view class="tc text-size-xs" data-value="/pages/plugins/coin/detail/detail" data-method="true" @tap="url_event">
|
||||
<view class="coin-operate-list bg-white flex-row align-c jc-c margin-bottom-main">
|
||||
<iconfont name="icon-detail" size="44rpx" color="#635BFF"></iconfont>
|
||||
</view>
|
||||
<view>明细</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coin-content padding-lg">
|
||||
<view v-if="accounts_list.length > 0" 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'" :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>
|
||||
<view v-for="(item, index) in accounts_list" :key="index" class="flex-row jc-sb align-c" :class="accounts_list.length == index + 1 ? '' : 'br-b-f5 margin-bottom-lg padding-bottom-lg'" :data-value="'/pages/plugins/coin/detail/detail?id=' + item.id" @tap="url_event">
|
||||
<view class="flex-1 flex-width flex-row align-c padding-right-main">
|
||||
<image :src="item.platform_icon" mode="widthFix" class="coin-content-list-img round" />
|
||||
<text class="fw-b single-text margin-left-main">{{ item.platform_name }}</text>
|
||||
</view>
|
||||
<view class="flex-col align-e">
|
||||
<view class="margin-bottom-xss text-size">{{ item.num }}</view>
|
||||
<view class="cr-grey-9">{{ item.price }}</view>
|
||||
<view class="margin-bottom-xss text-size">{{ item.default_coin }}</view>
|
||||
<view class="cr-grey-9">{{ item.platform_symbol }}{{ item.normal_coin }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -65,6 +85,10 @@
|
|||
</view>
|
||||
</component-popup>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -72,6 +96,7 @@
|
|||
import componentNavBack from '@/components/nav-back/nav-back';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
var wallet_static_url = app.globalData.get_static_url('coin', true) + 'app/';
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
|
||||
|
|
@ -84,226 +109,16 @@
|
|||
theme_view: app.globalData.get_theme_value_view(),
|
||||
wallet_static_url: wallet_static_url,
|
||||
status_bar_height: bar_height,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
|
||||
// 是否显示虚拟币
|
||||
is_price_show: false,
|
||||
// 虚拟币操作列表
|
||||
coin_oprate_list: [
|
||||
{
|
||||
name: '充值',
|
||||
icon: 'icon-recharge',
|
||||
url: '/pages/plugins/coin/recharge/recharge',
|
||||
},
|
||||
{
|
||||
name: '转换',
|
||||
icon: 'icon-convert',
|
||||
url: '/pages/plugins/coin/convert/convert',
|
||||
},
|
||||
{
|
||||
name: '提现',
|
||||
icon: 'icon-withdrawal',
|
||||
url: '/pages/plugins/coin/withdrawal/withdrawal',
|
||||
},
|
||||
{
|
||||
name: '明细',
|
||||
icon: 'icon-detail',
|
||||
method: true,
|
||||
},
|
||||
],
|
||||
coin_data: [
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
img: wallet_static_url + 'user-head-bg.png',
|
||||
name: 'BTC',
|
||||
price: '¥20000',
|
||||
num: '200000',
|
||||
url: '/pages/plugins/coin/detail/detail',
|
||||
},
|
||||
],
|
||||
data_base: null,
|
||||
// 虚拟币数量
|
||||
accounts_summary: 0,
|
||||
accounts_list: [],
|
||||
// 明细弹窗
|
||||
popup_user_detail_status: false,
|
||||
};
|
||||
|
|
@ -313,6 +128,7 @@
|
|||
componentNavBack,
|
||||
componentNoData,
|
||||
componentPopup,
|
||||
componentBottomLine,
|
||||
},
|
||||
props: {},
|
||||
|
||||
|
|
@ -343,7 +159,46 @@
|
|||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {},
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'user', 'coin'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
accounts_list: data.accounts_list || [],
|
||||
accounts_summary: data.accounts_summary || 0,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 显示隐藏虚拟币
|
||||
price_change() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue