1.虚拟币接口连调

2024.3.28 sws
master
sws 2024-03-29 10:57:49 +08:00
parent 59ca0a09be
commit 2e1ad04ed6
4 changed files with 52 additions and 19 deletions

View File

@ -1,7 +1,4 @@
.collection .img {
--size: 280rpx;
width: var(--size) !important;
height: var(--size) !important;
.collection .qrcode {
margin-bottom: 80rpx;
margin-top: 52rpx;
}

View File

@ -3,14 +3,16 @@
<view class="collection">
<view class="padding-main pr">
<view class="padding-lg bg-white radius-md margin-bottom-main tc">
<image :src="wallet_static_url + 'user-head-bg.png'" mode="widthFix" class="img" />
<view class="flex-row jc-c qrcode">
<w-qrcode :options="qrcode"></w-qrcode>
</view>
<view class="code br-c radius flex-row">
<view class="num flex-1 flex-width flex-row align-c text-size-md">{{ code }}</view>
<view class="copy br-l-c text-size fw-b" :data-value="code" @tap.stop="text_copy_event">复制</view>
<view class="num flex-1 flex-width flex-row align-c text-size-md">{{ accounts_key }}</view>
<view class="copy br-l-c text-size fw-b" :data-value="accounts_key" @tap.stop="text_copy_event">复制</view>
</view>
</view>
<view class="cr-grey-9 margin-top-xxl flex-row">
<view class="pr top-xs">
<view class="pr">
<iconfont name="icon-sigh-o" size="32rpx"></iconfont>
</view>
<text class="margin-left-sm text-size-xs">说出来的是你想的做出来的是你说的交出来的是你做的</text>
@ -32,9 +34,12 @@
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
wallet_static_url: wallet_static_url,
code: '3453sdfsdf3254233453sdfsdf325423',
params: null,
qrcode: {
code: '',
size: 280,
},
accounts_key: '3453sdfsdf3254233453sdfsdf325423',
};
},
@ -46,6 +51,10 @@
onLoad(params) {
//
app.globalData.page_event_onload_handle(params);
//
this.setData({
params: params,
});
this.init();
},
@ -70,7 +79,34 @@
},
//
get_data() {},
get_data() {
uni.request({
url: app.globalData.get_request_url('detail', 'accounts', 'coin'),
method: 'POST',
data: this.params,
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();
console.log(res.data.data);
if (res.data.code == 0) {
var data = res.data.data;
this.setData({
accounts_key: data.accounts.accounts_key || '',
});
var qrcode = this.qrcode;
qrcode['code'] = data.accounts.accounts_key;
} 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'));
},
});
},
//
text_copy_event(e) {

View File

@ -10,26 +10,25 @@
<scroll-view :scroll-y="true" class="scroll-box" lower-threshold="60" @scroll="scroll_event">
<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">
<view>{{ item.status }}</view>
<view class="br-b-dashed padding-bottom-main margin-bottom-main flex-row jc-e align-c">
<view class="cr-grey-9">{{ item.add_time }}</view>
</view>
<view class="convert-group-row">
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9 title">转换单号</text>
<text class="fw-b">{{ item.transfer_no }}</text>
<text class="fw-b">{{ item.convert_no }}</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9 title">转出余额</text>
<text class="fw-b">{{ item.tob }}</text>
<text class="fw-b">{{ item.convert_value }}</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9 title">转出账户</text>
<text class="fw-b">{{ item.send_user.username }}</text>
<text class="fw-b">{{ item.send_accounts_id }}</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9 title">转入账户</text>
<text class="fw-b">{{ item.receive_user.username }}</text>
<text class="fw-b">{{ item.receive_accounts_id }}</text>
</view>
<view class="margin-bottom-sm flex-row">
<text class="cr-grey-9 title">最新币</text>

View File

@ -182,6 +182,7 @@
this.setData({
params: params,
});
this.coin_oprate_list[1].url = this.coin_oprate_list[1].url + '?id=' + params.id;
this.init();
},
@ -210,7 +211,7 @@
uni.request({
url: app.globalData.get_request_url('detail', 'accounts', 'coin'),
method: 'POST',
data: { id: this.params.id },
data: this.params.id,
dataType: 'json',
success: (res) => {
uni.stopPullDownRefresh();