parent
585101c636
commit
eacd1f8d1d
|
|
@ -191,6 +191,7 @@
|
|||
"plugins-coin-convert": "转换",
|
||||
"plugins-coin-cash": "提现",
|
||||
"plugins-coin-detail": "明细",
|
||||
"plugins-coin-transfer": "转账",
|
||||
"plugins-coin-transfer-list": "转账明细",
|
||||
"plugins-coin-transaction-list": "交易明细",
|
||||
"plugins-coin-cash-list": "提现明细",
|
||||
|
|
|
|||
|
|
@ -1502,6 +1502,13 @@
|
|||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "transfer/transfer",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "transfer-list/transfer-list",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
code: '',
|
||||
size: 280,
|
||||
},
|
||||
accounts_key: '3453sdfsdf3254233453sdfsdf325423',
|
||||
accounts_key: '',
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -151,9 +151,9 @@
|
|||
// 虚拟币操作列表
|
||||
coin_oprate_list: [
|
||||
{
|
||||
name: '充值',
|
||||
name: '转账',
|
||||
icon: 'icon-transfer-count',
|
||||
url: '/pages/plugins/coin/recharge/recharge',
|
||||
url: '/pages/plugins/coin/transfer/transfer',
|
||||
},
|
||||
{
|
||||
name: '收款',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
.note {
|
||||
background-color: #fafafc;
|
||||
}
|
||||
|
||||
.transfer-btn {
|
||||
background: linear-gradient(107deg, #31B4FC 0%, #0842E2 100%);
|
||||
}
|
||||
|
||||
.transfer-btn:active {
|
||||
background: linear-gradient(107deg, #168ACA 0%, #022A97 100%);
|
||||
}
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="transfer">
|
||||
<view class="padding-main">
|
||||
<view class="bg-white padding-main radius-md margin-bottom-main">
|
||||
<view class="padding-vertical-sm flex-row align-c">
|
||||
<text class="text-size fw-b">收款账号</text>
|
||||
<view class="padding-left-lg flex-row jc-sb align-c flex-1 flex-width">
|
||||
<view class="flex-1 padding-right-main">
|
||||
<input type="digit" name="receive_accounts_key" :value="receive_accounts_key" placeholder-class="text-size-md cr-grey-9" placeholder="请输入收款账号" @input="receive_accounts_key_change" />
|
||||
</view>
|
||||
<iconfont name="icon-scan" size="40rpx" @tap="scancode_event"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-white padding-main radius-md margin-bottom-main">
|
||||
<view class="padding-vertical-sm">
|
||||
<text class="text-size fw-b">转账币</text>
|
||||
<view class="margin-top-xxxxl">
|
||||
<input type="digit" name="coin" :value="coin" class="text-size-xl tc" placeholder-class="cr-grey-9" placeholder="请输入转账币" @input="coin_change" />
|
||||
<view class="cr-grey-9 tc margin-top-main">
|
||||
我的余额:
|
||||
<span class="cr-black fw-b">{{ accounts.platform_symbol }}{{ accounts.default_coin }}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="note padding-main radius margin-top-xxxl">
|
||||
<input type="text" name="note" :value="note" placeholder-class="text-size-md cr-grey-9" placeholder="请输入转账备注信息" @input="note_change" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="padding-main bg-white radius-md">
|
||||
<view class="padding-vertical-sm border-radius-sm flex-row align-c">
|
||||
<text class="text-size fw-b">转账密码</text>
|
||||
<view class="padding-left-lg">
|
||||
<input type="password" name="pay_pwd" :value="pay_pwd" placeholder-class="text-size-md cr-grey-9" placeholder="请输入支付密码" @input="pwd_num_change" />
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="padding-xxxl margin-top-sm">
|
||||
<button type="default" class="transfer-btn cr-white round" @tap="transfer_event">立即转账</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
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
|
||||
bar_height = 0;
|
||||
// #endif
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
accounts_static_url: accounts_static_url,
|
||||
|
||||
accounts_id: null,
|
||||
accounts_key: null,
|
||||
receive_accounts_id: null,
|
||||
accounts: {},
|
||||
receive_accounts: {},
|
||||
receive_accounts_key: null,
|
||||
coin: null,
|
||||
note: '',
|
||||
// pay_pwd: '',
|
||||
};
|
||||
},
|
||||
props: {},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
|
||||
this.init();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.get_data();
|
||||
},
|
||||
methods: {
|
||||
init(e) {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data();
|
||||
}
|
||||
},
|
||||
// 初始化数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('createinfo', 'transfer', 'coin'),
|
||||
method: 'POST',
|
||||
data: { accounts_id: this.accounts_id, accounts_key: this.accounts_key },
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
console.log(res.data.data);
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
accounts: data.accounts || {},
|
||||
receive_accounts: data.receive_accounts || {},
|
||||
});
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
scancode_event() {
|
||||
// 调用扫码
|
||||
var self = this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
self.setData({
|
||||
receive_accounts_key: res.result,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// 收款账号
|
||||
receive_accounts_key_change(e) {
|
||||
this.setData({
|
||||
receive_accounts_key: e.detail.value,
|
||||
});
|
||||
this.get_data();
|
||||
},
|
||||
// 转账币
|
||||
coin_change(e) {
|
||||
this.setData({
|
||||
coin: e.detail.value,
|
||||
});
|
||||
},
|
||||
// 备注
|
||||
note_change(e) {
|
||||
this.setData({
|
||||
note: e.detail.value,
|
||||
});
|
||||
},
|
||||
// 转账密码
|
||||
pwd_num_change(e) {
|
||||
this.setData({
|
||||
pwd_num: e.detail.value,
|
||||
});
|
||||
},
|
||||
// 立即转账
|
||||
transfer_event(e) {
|
||||
var new_data = {
|
||||
receive_accounts_key: this.receive_accounts_key,
|
||||
receive_accounts_id: this.receive_accounts_id,
|
||||
coin: this.coin,
|
||||
note: this.note,
|
||||
// pwd_num: this.pwd_num,
|
||||
};
|
||||
// 数据校验
|
||||
var validation = [
|
||||
{ fields: 'receive_accounts_key', msg: '请输入收款账号' },
|
||||
{ fields: 'coin', msg: '请输入转账币' },
|
||||
];
|
||||
// 验证提交表单
|
||||
if (app.globalData.fields_check(new_data, validation)) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('create', 'transfer', '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/transfer-list/transfer-list', true);
|
||||
}, 1000);
|
||||
} else {
|
||||
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: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './transfer.css';
|
||||
</style>
|
||||
Loading…
Reference in New Issue