源文件
This commit is contained in:
8
pages/plugins/wallet/cash-auth/cash-auth.css
Normal file
8
pages/plugins/wallet/cash-auth/cash-auth.css
Normal file
@@ -0,0 +1,8 @@
|
||||
.verify-sub {
|
||||
width: 35%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx !important;
|
||||
top: 62rpx;
|
||||
right: 20rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
311
pages/plugins/wallet/cash-auth/cash-auth.vue
Normal file
311
pages/plugins/wallet/cash-auth/cash-auth.vue
Normal file
@@ -0,0 +1,311 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="data_base != null" class="padding-main">
|
||||
<view v-if="is_can_cash == 1">
|
||||
<form v-if="check_account_list.length > 0" @submit="form_submit" class="form-container oh">
|
||||
<view class="bg-white border-radius-main">
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">{{$t('cash-auth.cash-auth.b39a25')}}<text class="form-group-tips-must">*</text></view>
|
||||
<view class="section">
|
||||
<picker name="account_type" @change="select_check_account_event" :value="check_account_value" :range="check_account_list" range-key="msg">
|
||||
<view :class="'picker name ' + (check_account_value == null ? 'cr-grey' : 'cr-base')">
|
||||
<view v-if="check_account_value == null">{{$t('cash-auth.cash-auth.582q6x')}}</view>
|
||||
<view v-else>{{ check_account_list[check_account_value]['msg'] }}</view>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup pr">
|
||||
<view class="form-gorup-title">{{$t('cash-auth.cash-auth.d318op')}}<text class="form-group-tips-must">*</text></view>
|
||||
<input type="number" name="verify" placeholder-class="cr-grey" class="cr-base" :placeholder="$t('cash-auth.cash-auth.2hc312')" maxlength="4" />
|
||||
<button :class="'bg-grey br-grey cr-base pa round text-size-sm verify-sub ' + (verify_disabled ? 'sub-disabled' : '')" type="default" hover-class="none" size="mini" :loading="verify_loading" :disabled="verify_disabled" @tap="verify_send_event">
|
||||
{{ verify_submit_text }}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup form-gorup-submit margin-top-main">
|
||||
<button class="bg-main cr-white br-main round text-size" type="default" form-type="submit" hover-class="none" :disabled="form_submit_disabled_status">{{$t('form.form.4yd066')}}</button>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
<view class="margin-top-lg cr-base">
|
||||
<view class="fw-b text-size">{{$t('cash-auth.cash-auth.0j8388')}}</view>
|
||||
<view class="text-size-xs">
|
||||
<view>{{$t('cash-auth.cash-auth.59iipw')}}<text class="cr-red" data-value="/pages/login/login?opt_type=bind_email&opt_form=bind_email" @tap="url_event">{{$t('cash-auth.cash-auth.8qcte7')}}</text>{{$t('cash-auth.cash-auth.t8y3r7')}}<text class="cr-red" data-value="/pages/login/login?opt_form=bind_verify" @tap="url_event">{{$t('login.login.np9177')}}</text>{{$t('cash-auth.cash-auth.5wbuuy')}}</view>
|
||||
<view>{{$t('cash-auth.cash-auth.r569wz')}}</view>
|
||||
<view>{{$t('cash-auth.cash-auth.35837l')}}</view>
|
||||
<view>{{$t('cash-auth.cash-auth.q2a553')}}</view>
|
||||
<view>{{$t('cash-auth.cash-auth.lh6bjr')}}</view>
|
||||
<view>{{$t('cash-auth.cash-auth.ob4gn0')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="check_account_list.length == 0" class="margin-top-xxxl">
|
||||
<button data-value="/pages/login/login?opt_form=bind_verify" @tap="url_event" class="bg-main br-main cr-white text-size round" type="default">{{$t('cash-auth.cash-auth.d2ng16')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="margin-top-lg">
|
||||
<view>
|
||||
<text>{{$t('cash-auth.cash-auth.l2i4s8')}}</text>
|
||||
<text class="cr-green fw-b margin-left-sm margin-right-sm">{{ user_wallet.normal_money }}</text>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text>{{$t('cash-auth.cash-auth.27b4w5')}}</text>
|
||||
<text class="cr-red fw-b margin-left-sm margin-right-sm">{{ data_base.cash_minimum_amount }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_base: null,
|
||||
user_wallet: null,
|
||||
check_account_list: [],
|
||||
verify_submit_text: this.$t('login.login.s665h5'),
|
||||
verify_loading: false,
|
||||
verify_disabled: false,
|
||||
form_submit_loading: false,
|
||||
verify_time_total: 60,
|
||||
temp_clear_time: null,
|
||||
check_account_value: null,
|
||||
form_submit_disabled_status: false,
|
||||
is_can_cash: 0,
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('auth', 'cash', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
});
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var upd_data = {
|
||||
data_base: data.base || null,
|
||||
user_wallet: data.user_wallet || null,
|
||||
check_account_list: data.check_account_list || [],
|
||||
};
|
||||
if ((upd_data.data_base != null && upd_data.user_wallet != null && (upd_data.data_base.cash_minimum_amount || 0) <= 0) || parseFloat(upd_data.user_wallet.normal_money) >= parseFloat(upd_data.data_base.cash_minimum_amount)) {
|
||||
upd_data['is_can_cash'] = 1;
|
||||
}
|
||||
this.setData(upd_data);
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 身份认证方式事件
|
||||
select_check_account_event(e) {
|
||||
this.setData({
|
||||
check_account_value: e.detail.value || 0,
|
||||
});
|
||||
},
|
||||
|
||||
// 发送验证码
|
||||
verify_send_event() {
|
||||
// 数据验证
|
||||
var self = this;
|
||||
if (self.check_account_value == null) {
|
||||
app.globalData.showToast(this.$t('cash-auth.cash-auth.5dcsbd'));
|
||||
return false;
|
||||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: this.$t('common.sending_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
verify_submit_text: this.$t('common.sending'),
|
||||
verify_loading: true,
|
||||
verify_disabled: true,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('verifysend', 'cash', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
account_type: self.check_account_list[self.check_account_value]['field'],
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
this.setData({
|
||||
verify_loading: false,
|
||||
});
|
||||
var temp_time = this.verify_time_total;
|
||||
this.temp_clear_time = setInterval(function () {
|
||||
if (temp_time <= 1) {
|
||||
clearInterval(self.temp_clear_time);
|
||||
self.setData({
|
||||
verify_submit_text: self.$t('login.login.s665h5'),
|
||||
verify_disabled: false,
|
||||
});
|
||||
} else {
|
||||
temp_time--;
|
||||
self.setData({
|
||||
verify_submit_text: self.$t('login.login.n24i5u') + temp_time + self.$t('login.login.4306xr'),
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
this.setData({
|
||||
verify_submit_text: this.$t('login.login.s665h5'),
|
||||
verify_loading: false,
|
||||
verify_disabled: false,
|
||||
});
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
verify_submit_text: this.$t('login.login.s665h5'),
|
||||
verify_loading: false,
|
||||
verify_disabled: false,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
// 表单数据
|
||||
var form_data = e.detail.value;
|
||||
|
||||
// 数据校验
|
||||
var validation = [
|
||||
{ fields: 'account_type', msg: this.$t('cash-auth.cash-auth.5dcsbd'), is_can_zero: 1 },
|
||||
{ fields: 'verify', msg: this.$t('login.login.cesl5d') },
|
||||
];
|
||||
|
||||
// 验证提交表单
|
||||
if (app.globalData.fields_check(form_data, validation)) {
|
||||
form_data['account_type'] = this.check_account_list[this.check_account_value]['field'];
|
||||
this.setData({
|
||||
form_submit_disabled_status: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('verifycheck', 'cash', 'wallet'),
|
||||
method: 'POST',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
if (res.data.code == 0) {
|
||||
app.globalData.url_open('/pages/plugins/wallet/cash-create/cash-create', true);
|
||||
} 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: () => {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './cash-auth.css';
|
||||
</style>
|
||||
6
pages/plugins/wallet/cash-create/cash-create.css
Normal file
6
pages/plugins/wallet/cash-create/cash-create.css
Normal file
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
* 验证过期
|
||||
*/
|
||||
.overdue {
|
||||
padding-top: 30%;
|
||||
}
|
||||
332
pages/plugins/wallet/cash-create/cash-create.vue
Normal file
332
pages/plugins/wallet/cash-create/cash-create.vue
Normal file
@@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="page-bottom-fixed">
|
||||
<form v-if="check_status == 1" @submit="form_submit" class="form-container">
|
||||
<view class="padding-main oh">
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">{{$t('cash-create.cash-create.qg404q')}}<text class="form-group-tips-must">*</text></view>
|
||||
<input type="digit" name="money" :value="default_data.money || ''" placeholder-class="cr-grey" class="cr-base" :placeholder="$t('cash-create.cash-create.cymbdz') + ((data_base.cash_minimum_amount || 0) <= 0 ? 0.01 : data_base.cash_minimum_amount) + $t('cash-create.cash-create.27ky42') + can_cash_max_money" @input="cash_money_event" />
|
||||
<view class="text-size-xs">
|
||||
<view v-if="(data_base || null) != null && data_base.cash_minimum_amount > 0">
|
||||
<text>{{$t('cash-auth.cash-auth.27b4w5')}}</text>
|
||||
<text class="cr-red fw-b margin-left-sm">{{ data_base.cash_minimum_amount }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{$t('cash-create.cash-create.iaw845')}}</text>
|
||||
<text class="cr-main fw-b margin-left-sm">{{ can_cash_max_money }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{$t('cash-create.cash-create.1dbkw2')}}</text>
|
||||
<text class="cr-green fw-b margin-left-sm">{{ user_wallet.normal_money }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{$t('cash-create.cash-create.162f7o')}}</text>
|
||||
<text class="cr-base fw-b margin-left-sm">{{ user_wallet.give_money }}</text>
|
||||
<text v-if="(data_base || null) == null || data_base.is_cash_retain_give != 0" class="cr-red margin-left-lg">{{$t('cash-create.cash-create.5o1q52')}}</text>
|
||||
</view>
|
||||
<view v-if="(data_base || null) == null || data_base.cash_commission_rate != 0" class="margin-top-sm cr-red">
|
||||
<text>{{$t('cash-create.cash-create.678iu2')}}</text>
|
||||
<text class="fw-b margin-left-sm">{{cash_commission_value}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">{{$t('cash-create.cash-create.yu2raf')}}<text class="form-group-tips-must">*</text></view>
|
||||
<radio-group name="cash_type" @change="cash_type_event">
|
||||
<block v-for="(item, index) in user_cash_type_list" :key="index">
|
||||
<label class="margin-right">
|
||||
<radio :value="item.value" :color="theme_color" :checked="default_data.cash_type == item.value" style="transform: scale(0.7)" /> {{item.name}}
|
||||
</label>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
|
||||
<view v-if="cash_type_0_status" class="form-gorup">
|
||||
<view class="form-gorup-title">{{$t('cash-create.cash-create.5mmir5')}}<text class="form-group-tips-must">*</text></view>
|
||||
<input type="text" name="bank_name" :value="default_data.bank_name || ''" placeholder-class="cr-grey" class="cr-base" maxlength="60" :placeholder="$t('cash-create.cash-create.u2rnlw')" />
|
||||
<view class="cr-grey-c text-size-xs">{{$t('cash-create.cash-create.14n20v')}}</view>
|
||||
</view>
|
||||
|
||||
<view v-if="cash_type_0_status || cash_type_2_status" class="form-gorup">
|
||||
<view class="form-gorup-title">{{$t('cash-create.cash-create.36756z')}}<text class="form-group-tips-must">*</text></view>
|
||||
<input type="text" name="bank_accounts" :value="default_data.bank_accounts || ''" placeholder-class="cr-grey" class="cr-base" maxlength="60" :placeholder="$t('cash-create.cash-create.s72t44')" />
|
||||
<view class="cr-grey-c text-size-xs">{{$t('cash-create.cash-create.748r3i')}}</view>
|
||||
</view>
|
||||
|
||||
<view class="form-gorup">
|
||||
<view class="form-gorup-title">{{$t('cash-create.cash-create.1xtff6')}}<text class="form-group-tips-must">*</text></view>
|
||||
<input type="text" name="bank_username" :value="default_data.bank_username || ''" placeholder-class="cr-grey" class="cr-base" maxlength="30" :placeholder="$t('cash-create.cash-create.f4605e')" />
|
||||
<view class="cr-grey-c text-size-xs">{{$t('cash-create.cash-create.445m7n')}}</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<button class="item bg-main br-main cr-white round text-size" type="default" form-type="submit" hover-class="none" :loading="form_submit_loading" :disabled="form_submit_loading">{{$t('form.form.4yd066')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
<!-- 已过期 -->
|
||||
<view v-else-if="check_status === 0" class="overdue tc">
|
||||
<view class="padding-main">
|
||||
<view class="cr-red margin-top-xxxl">{{$t('cash-create.cash-create.858o54')}}</view>
|
||||
<button class="round bg-main cr-white cr-white text-size margin-top-xl" size="mini" type="default" hover-class="none" data-value="/pages/plugins/wallet/cash-auth/cash-auth" data-redirect="1" @tap="url_event">{{$t('cash-create.cash-create.ke15x5')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
theme_color: app.globalData.get_theme_color(),
|
||||
params: null,
|
||||
form_submit_loading: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
bottom_fixed_style: '',
|
||||
data_base: null,
|
||||
user_wallet: {},
|
||||
default_data: {},
|
||||
check_status: null,
|
||||
can_cash_max_money: 0.00,
|
||||
cash_commission_value: 0.00,
|
||||
user_cash_type_list: [],
|
||||
cash_type_0_status: false,
|
||||
cash_type_2_status: false
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('extraction-apply.extraction-apply.m3xdif'),
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('createinit', 'cash', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data || null;
|
||||
this.setData({
|
||||
data_list_loding_status: 3,
|
||||
data_base: data.base || null,
|
||||
check_status: data.check_status || 0,
|
||||
default_data: data.default_data || {},
|
||||
user_wallet: data.user_wallet || {},
|
||||
can_cash_max_money: parseFloat(data.can_cash_max_money) || 0.0,
|
||||
user_cash_type_list: data.user_cash_type_list || []
|
||||
});
|
||||
// 默认选中处理
|
||||
if(this.default_data.cash_type !== undefined) {
|
||||
this.cash_type_event(this.default_data.cash_type);
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 提现金额事件
|
||||
cash_money_event(e) {
|
||||
if((this.data_base || null) != null && (this.data_base.cash_commission_rate || 0) != 0) {
|
||||
var value = parseFloat(e.detail.value || 0);
|
||||
this.setData({
|
||||
cash_commission_value: app.globalData.price_two_decimal(value*parseFloat(this.data_base.cash_commission_rate)),
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 提现方式事件
|
||||
cash_type_event(e) {
|
||||
var status_0 = false;
|
||||
var status_2 = false;
|
||||
var value = parseInt(typeof(e) == 'object' ? e.detail.value : e);
|
||||
switch(value)
|
||||
{
|
||||
// 其他方式
|
||||
case 0 :
|
||||
status_2 = false;
|
||||
status_0 = true;
|
||||
break;
|
||||
// 微信
|
||||
case 1 :
|
||||
status_0 = false;
|
||||
status_2 = false;
|
||||
break;
|
||||
// 支付宝
|
||||
case 2 :
|
||||
status_0 = false;
|
||||
status_2 = true;
|
||||
break;
|
||||
}
|
||||
this.setData({
|
||||
cash_type_0_status: status_0,
|
||||
cash_type_2_status: status_2
|
||||
});
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit(e) {
|
||||
// 表单数据
|
||||
var form_data = e.detail.value;
|
||||
|
||||
// 数据校验
|
||||
var validation = [
|
||||
{ fields: 'money', msg: this.$t('cash-create.cash-create.6t7x9u') },
|
||||
{ fields: 'cash_type', msg: this.$t('cash-create.cash-create.thjid2'), is_can_zero: 1 }
|
||||
];
|
||||
var cash_type = parseInt(form_data.cash_type);
|
||||
if(cash_type == 0) {
|
||||
validation.push({ fields: 'bank_name', msg: this.$t('cash-create.cash-create.vbr59h') });
|
||||
}
|
||||
if(cash_type == 0 || cash_type == 2) {
|
||||
validation.push({ fields: 'bank_accounts', msg: this.$t('cash-create.cash-create.0mn186') });
|
||||
}
|
||||
validation.push({ fields: 'bank_username', msg: this.$t('cash-create.cash-create.c7h4mu') });
|
||||
|
||||
// 验证提交表单
|
||||
if (app.globalData.fields_check(form_data, validation)) {
|
||||
// 提现金额不能小于最低金额、不能大于最大可提现金额
|
||||
if (parseFloat(this.data_base.cash_minimum_amount || 0) > 0 && parseFloat(form_data.money) < parseFloat(this.data_base.cash_minimum_amount)) {
|
||||
app.globalData.showToast(this.$t('cash-create.cash-create.724kn8') + this.data_base.cash_minimum_amount);
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(form_data.money) > this.can_cash_max_money) {
|
||||
app.globalData.showToast(this.$t('cash-create.cash-create.duo0ts') + this.can_cash_max_money);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 远程请求
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('create', 'cash', 'wallet'),
|
||||
method: 'POST',
|
||||
data: form_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/wallet/user/user?type=2', 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'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './cash-create';
|
||||
</style>
|
||||
222
pages/plugins/wallet/components/transfer/transfer.vue
Normal file
222
pages/plugins/wallet/components/transfer/transfer.vue
Normal file
@@ -0,0 +1,222 @@
|
||||
<!-- 转账 -->
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<!-- 列表 -->
|
||||
<view v-if="data_list.length > 0" class="data-list">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b-dashed padding-bottom-main flex-row jc-sb align-c">
|
||||
<text class="cr-grey-9">{{ item.add_time }}</text>
|
||||
<text v-if="(item.receive_user || null) != null">{{item.receive_user.user_name_view}}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/wallet/user-transfer-detail/user-transfer-detail?id=' + item.id" @tap="url_event" class="content margin-top cp">
|
||||
<view v-for="(fv, fi) in content_list" :key="fi">
|
||||
<view class="single-text margin-top-sm transfer-item">
|
||||
<text class="name cr-grey-9 margin-right-main dis-inline-block">{{ fv.name }}:</text>
|
||||
<text class="fw-b">{{ item[fv.field] }}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="fw-b">{{ fv.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
propPullDownRefresh: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
propScrollLower: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: null,
|
||||
content_list: [
|
||||
{ name: this.$t('transfer.transfer.678uyg'), field: 'transfer_no' },
|
||||
{ name: this.$t('transfer.transfer.2q274j'), field: 'money' },
|
||||
{ name: this.$t('transfer.transfer.t36tk2'), field: 'note' },
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
mounted() {
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
watch: {
|
||||
propPullDownRefresh(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list(1);
|
||||
}
|
||||
},
|
||||
propScrollLower(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.get_data_list();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data_list();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
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', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
page: this.data_page,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
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_list: [],
|
||||
data_bottom_line_status: false,
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.nav-child .item {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
min-width: 84rpx;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.transfer-item .name {
|
||||
min-width: 112rpx;
|
||||
}
|
||||
</style>
|
||||
248
pages/plugins/wallet/components/user-cash/user-cash.vue
Normal file
248
pages/plugins/wallet/components/user-cash/user-cash.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<!-- 导航 -->
|
||||
<view class="nav-child flex-row align-c margin-bottom-lg">
|
||||
<view v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view class="item dis-inline-block round margin-right-main tc" :class="nav_status_index == index ? 'cr-main bg-main-light' : 'cr-grey bg-grey-e'" :data-index="index" @tap="nav_event">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<view v-if="data_list.length > 0" class="data-list">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b-dashed padding-bottom-main flex-row jc-sb align-c">
|
||||
<text class="cr-grey-9">{{ item.add_time }}</text>
|
||||
<text :class="item.status === 0 ? 'cr-black' : item.status === 1 ? 'cr-grey-c' : 'cr-red'">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/wallet/user-cash-detail/user-cash-detail?id=' + item.id" @tap="url_event" class="content margin-top cp">
|
||||
<view v-for="(fv, fi) in content_list" :key="fi">
|
||||
<view class="single-text margin-top-sm cash">
|
||||
<text class="name cr-grey-9 margin-right-main">{{ fv.name }}:</text>
|
||||
<text class="fw-b">{{ item[fv.field] }}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="fw-b">{{ fv.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
propPullDownRefresh: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
propScrollLower: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: null,
|
||||
nav_status_list: [
|
||||
{ name: this.$t('common.all'), value: '-1' },
|
||||
{ name: this.$t('user-cash.user-cash.3v1gzc'), value: '0' },
|
||||
{ name: this.$t('user-cash.user-cash.t7gtu0'), value: '1' },
|
||||
{ name: this.$t('user-cash.user-cash.x47iu3'), value: '2' },
|
||||
],
|
||||
nav_status_index: 0,
|
||||
content_list: [
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.e8a3e8'), field: 'cash_no' },
|
||||
{ name: this.$t('cash-create.cash-create.qg404q'), field: 'money' },
|
||||
{ name: this.$t('cash-create.cash-create.9ugssd'), field: 'commission' },
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
mounted() {
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
watch: {
|
||||
propPullDownRefresh(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list(1);
|
||||
}
|
||||
},
|
||||
propScrollLower(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.get_data_list();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data_list();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
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 status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'cash', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
page: this.data_page,
|
||||
status: status,
|
||||
is_more: 1,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
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_list: [],
|
||||
data_bottom_line_status: false,
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1,
|
||||
data_list: [],
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.nav-child .item {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
min-width: 84rpx;
|
||||
}
|
||||
.cash-item .name {
|
||||
min-width: 112rpx;
|
||||
}
|
||||
</style>
|
||||
428
pages/plugins/wallet/components/user-recharge/user-recharge.vue
Normal file
428
pages/plugins/wallet/components/user-recharge/user-recharge.vue
Normal file
@@ -0,0 +1,428 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<!-- 导航 -->
|
||||
<view class="nav-child flex-row align-c margin-bottom-lg">
|
||||
<view v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view class="item dis-inline-block round margin-right-main tc" :class="nav_status_index == index ? 'cr-main bg-main-light' : 'cr-grey bg-grey-e'" :data-index="index" @tap="nav_event">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<view v-if="data_list.length > 0" class="data-list">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b-dashed padding-bottom-main flex-row jc-sb align-c">
|
||||
<text class="cr-grey-9">{{ item.add_time }}</text>
|
||||
<text :class="item.status == 0 ? 'cr-main' : 'cr-grey-c'">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/wallet/user-recharge-detail/user-recharge-detail?id=' + item.id" @tap="url_event" class="content margin-top cp">
|
||||
<view v-for="(fv, fi) in content_list" :key="fi">
|
||||
<view class="single-text margin-top-sm recharge-item">
|
||||
<text class="name cr-grey-9 margin-right-main">{{ fv.name }}:</text>
|
||||
<text class="fw-b">{{ item[fv.field] }}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="fw-b">{{ fv.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.status == 0" class="item-operation tr margin-top-main">
|
||||
<button class="round bg-white br-grey-9 text-size-md" type="default" size="mini" @tap="delete_event" :data-value="item.id" :data-index="index" hover-class="none">{{$t('common.del')}}</button>
|
||||
<button class="round bg-white cr-main br-main text-size-md" type="default" size="mini" @tap="pay_event" :data-price="item.money" :data-value="item.id" :data-index="index" :data-payment="item.payment_id" hover-class="none">{{$t('user-recharge.user-recharge.8y9dki')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
|
||||
<!-- 支付弹窗 -->
|
||||
<component-payment
|
||||
ref="payment"
|
||||
:propPayUrl="pay_url"
|
||||
:propQrcodeUrl="qrcode_url"
|
||||
propPayDataKey="recharge_id"
|
||||
:propPaymentList="payment_list"
|
||||
:propTempPayValue="temp_pay_value"
|
||||
:propTempPayIndex="temp_pay_index"
|
||||
:propPayPrice="pay_price"
|
||||
:propPaymentId="payment_id"
|
||||
:propToAppointPage="to_appoint_page"
|
||||
:propDefaultPaymentId="default_payment_id"
|
||||
:propIsShowPayment="is_show_payment_popup"
|
||||
@close-payment-popup="payment_popup_event_close"
|
||||
@pay-success="order_item_pay_success_handle"
|
||||
></component-payment>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentPopup from '@/components/popup/popup';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
|
||||
import componentPayment from '@/components/payment/payment';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
propPullDownRefresh: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
propScrollLower: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
propCurrent: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: null,
|
||||
nav_status_list: [
|
||||
{ name: this.$t('common.all'), value: '-1' },
|
||||
{ name: this.$t('order.order.pjb15r'), value: '0' },
|
||||
{ name: this.$t('order.order.s8g966'), value: '1' },
|
||||
],
|
||||
nav_status_index: 0,
|
||||
content_list: [
|
||||
{ name: this.$t('user-recharge-detail.user-recharge-detail.ch84a8'), field: 'recharge_no' },
|
||||
{ name: this.$t('user-recharge-detail.user-recharge-detail.7272ia'), field: 'money' },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.516tlr'), field: 'pay_money' },
|
||||
],
|
||||
|
||||
// 支付弹窗参数
|
||||
pay_url: '',
|
||||
qrcode_url: '',
|
||||
payment_list: [],
|
||||
temp_pay_value: '',
|
||||
temp_pay_index: 0,
|
||||
payment_id: 0,
|
||||
default_payment_id: 0,
|
||||
is_show_payment_popup: false,
|
||||
pay_price: 0,
|
||||
to_appoint_page: '/pages/plugins/wallet/user/user?type=1',
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentPopup,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentPayment,
|
||||
},
|
||||
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
watch: {
|
||||
propPullDownRefresh(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list(1);
|
||||
}
|
||||
},
|
||||
propScrollLower(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.get_data_list();
|
||||
}
|
||||
},
|
||||
propCurrent(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.setData({
|
||||
nav_status_index: newVal,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.setData({
|
||||
pay_url: app.globalData.get_request_url('pay', 'recharge', 'wallet'),
|
||||
qrcode_url: app.globalData.get_request_url('paycheck', 'recharge', 'wallet'),
|
||||
});
|
||||
// 获取数据
|
||||
this.get_data_list();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
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 order_status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'recharge', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
page: this.data_page,
|
||||
status: order_status,
|
||||
is_more: 1,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
this.setData({
|
||||
payment_list: res.data.data.payment_list || [],
|
||||
default_payment_id: res.data.data.default_payment_id || 0,
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: this.data_page > 1 && this.data_page > this.data_page_total,
|
||||
});
|
||||
|
||||
// 下订单支付处理
|
||||
var key = app.globalData.data.cache_page_pay_key;
|
||||
var pay_data = uni.getStorageSync(key) || null;
|
||||
if (pay_data != null && (pay_data.order_ids || null) != null && (pay_data.payment_id || null) != null) {
|
||||
uni.removeStorageSync(key);
|
||||
this.setData({
|
||||
temp_pay_value: pay_data.order_ids,
|
||||
payment_id: pay_data.payment_id,
|
||||
});
|
||||
if ((this.$refs.payment || null) != null) {
|
||||
this.$refs.payment.pay_handle(pay_data.order_ids, pay_data.payment_id, this.payment_list);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list: [],
|
||||
data_bottom_line_status: false,
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 支付
|
||||
pay_event(e) {
|
||||
this.setData({
|
||||
is_show_payment_popup: true,
|
||||
temp_pay_value: e.currentTarget.dataset.value,
|
||||
temp_pay_index: e.currentTarget.dataset.index,
|
||||
pay_price: e.currentTarget.dataset.price,
|
||||
payment_id: e.currentTarget.dataset.payment || 0,
|
||||
});
|
||||
},
|
||||
|
||||
// 支付弹窗关闭
|
||||
payment_popup_event_close(e) {
|
||||
this.setData({
|
||||
is_show_payment_popup: false,
|
||||
});
|
||||
},
|
||||
// 支付成功数据设置
|
||||
order_item_pay_success_handle(data) {
|
||||
var order_ids_arr = data.order_id.toString().split(',');
|
||||
var temp_data_list = this.data_list;
|
||||
for (var i in temp_data_list) {
|
||||
if (order_ids_arr.indexOf(temp_data_list[i]['id'].toString()) != -1) {
|
||||
temp_data_list[i]['pay_money'] = temp_data_list[i]['money'];
|
||||
temp_data_list[i]['status'] = 1;
|
||||
temp_data_list[i]['status_name'] = this.$t('order.order.s8g966');
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
});
|
||||
|
||||
// 成功回调事件
|
||||
this.$emit('pay-success');
|
||||
},
|
||||
|
||||
// 删除
|
||||
delete_event(e) {
|
||||
var self = this;
|
||||
uni.showModal({
|
||||
title: self.$t('common.warm_tips'),
|
||||
content: self.$t('recommend-list.recommend-list.54d418'),
|
||||
confirmText: self.$t('common.confirm'),
|
||||
cancelText: self.$t('recommend-list.recommend-list.w9460o'),
|
||||
success: (result) => {
|
||||
if (result.confirm) {
|
||||
// 参数
|
||||
var id = e.currentTarget.dataset.value;
|
||||
var index = e.currentTarget.dataset.index;
|
||||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: self.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('delete', 'recharge', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
id: id,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var temp_data_list = self.data_list;
|
||||
temp_data_list.splice(index, 1);
|
||||
self.setData({
|
||||
data_list: temp_data_list,
|
||||
});
|
||||
if (temp_data_list.length == 0) {
|
||||
self.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
} else {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(self.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1,
|
||||
data_list: [],
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// 页面卸载
|
||||
onUnload(e) {
|
||||
clearInterval(this.popup_view_pay_timer);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.nav-child .item {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
min-width: 84rpx;
|
||||
}
|
||||
.payment-list .item {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.payment-list .item-content {
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
|
||||
.payment-list .item-content image {
|
||||
width: 50rpx;
|
||||
height: 50rpx !important;
|
||||
}
|
||||
.recharge-item .name {
|
||||
min-width: 112rpx;
|
||||
}
|
||||
</style>
|
||||
248
pages/plugins/wallet/components/wallet-log/wallet-log.vue
Normal file
248
pages/plugins/wallet/components/wallet-log/wallet-log.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<!-- 导航 -->
|
||||
<view class="nav-child flex-row align-c margin-bottom-lg">
|
||||
<view v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view class="item dis-inline-block round margin-right-main tc" :class="nav_status_index == index ? 'cr-main bg-main-light' : 'cr-grey bg-grey-e'" :data-index="index" @tap="nav_event">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<view v-if="data_list.length > 0" class="data-list">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b-dashed padding-bottom-main flex-row jc-sb align-c">
|
||||
<text class="cr-grey-9">{{ item.add_time }}</text>
|
||||
</view>
|
||||
<view :data-value="'/pages/plugins/wallet/wallet-log-detail/wallet-log-detail?id=' + item.id" @tap="url_event" class="content margin-top-main cp">
|
||||
<view v-for="(fv, fi) in content_list" :key="fi">
|
||||
<view class="single-text margin-top-sm log-item">
|
||||
<text class="name cr-grey-9 margin-right-main">{{ fv.name }}:</text>
|
||||
<text class="fw-b">{{ item[fv.field] }}</text>
|
||||
<text v-if="(fv.unit || null) != null" class="fw-b">{{ fv.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
propPullDownRefresh: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
propScrollLower: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: null,
|
||||
nav_status_index: 0,
|
||||
nav_status_list: [
|
||||
{ name: this.$t('common.all'), value: '-1' },
|
||||
{ name: this.$t('wallet-log.wallet-log.9p865e'), value: '0' },
|
||||
{ name: this.$t('wallet-log.wallet-log.1nm6c2'), value: '1' },
|
||||
],
|
||||
content_list: [
|
||||
{ name: this.$t('invoice.invoice.l3832z'), field: 'business_type_name' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.744os7'), field: 'money_type_name' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.ruq60b'), field: 'operation_money' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.4q7pfq'), field: 'original_money' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.r814ne'), field: 'latest_money' },
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
mounted() {
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
watch: {
|
||||
propPullDownRefresh(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list(1);
|
||||
}
|
||||
},
|
||||
propScrollLower(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.get_data_list();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data_list();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
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 status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'walletlog', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
page: this.data_page,
|
||||
operation_type: status,
|
||||
is_more: 1,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = res.data.data.data;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = res.data.data.data;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: res.data.data.total,
|
||||
data_page_total: res.data.data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
|
||||
// 是否还有数据
|
||||
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_list: [],
|
||||
data_bottom_line_status: false,
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1,
|
||||
data_list: [],
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.nav-child .item {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
min-width: 84rpx;
|
||||
}
|
||||
.log-item .name {
|
||||
min-width: 112rpx;
|
||||
}
|
||||
</style>
|
||||
12
pages/plugins/wallet/payment-code/payment-code.css
Normal file
12
pages/plugins/wallet/payment-code/payment-code.css
Normal file
@@ -0,0 +1,12 @@
|
||||
.brcode {
|
||||
width: 660rpx;
|
||||
padding-top: 60rpx;
|
||||
}
|
||||
.qrcode {
|
||||
width: 450rpx;
|
||||
margin-top: 60rpx;
|
||||
padding: 50rpx;
|
||||
}
|
||||
.bottom-fixed .btn {
|
||||
width: 50%;
|
||||
}
|
||||
230
pages/plugins/wallet/payment-code/payment-code.vue
Normal file
230
pages/plugins/wallet/payment-code/payment-code.vue
Normal file
@@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="scroll-box bg-white">
|
||||
<!-- 主体内容 -->
|
||||
<block v-if="data_list_loding_status == 3">
|
||||
<!-- 条码 -->
|
||||
<view class="brcode auto">
|
||||
<w-barcode :options="barcode"></w-barcode>
|
||||
<view class="fw-b tc margin-top text-size-lg">{{ payment_code }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 二维码 -->
|
||||
<view class="qrcode auto br radius">
|
||||
<w-qrcode :options="qrcode"></w-qrcode>
|
||||
</view>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<view class="cr-grey tc margin-top-xxxl">{{$t('member-code.member-code.oc4x18')}}</view>
|
||||
|
||||
<!-- 倒计时 -->
|
||||
<view class="margin-top-xxxl cr-yellow tc">({{ scheduled_value }}{{$t('payment-code.payment-code.b74qxe')}}</view>
|
||||
|
||||
<!-- 导航 -->
|
||||
<view v-if="(plugins_membershiplevelvip || null) != null" class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<view class="bg-white br-grey-d round oh">
|
||||
<button type="default" class="btn bg-white round text-size fl br-0" size="mini" :data-value="'/pages/plugins/membershiplevelvip/member-code/member-code?screen_brightness_value=' + screen_brightness_value" data-redirect="1" @tap="url_event">{{$t('member-code.member-code.26bu38')}}</button>
|
||||
<button type="default" class="btn bg-main cr-white round text-size fr br-0" size="mini">{{$t('member-code.member-code.x58gqu')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 错误提示 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
<view v-if="is_to_login == 1" class="margin-top-lg tc">
|
||||
<button type="default" class="bg-main br-main cr-white" size="mini" data-value="/pages/login/login" @tap="url_event">{{$t('member-code.member-code.yj6g3a')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
bottom_fixed_style: '',
|
||||
is_to_login: 0,
|
||||
screen_brightness_value: 0,
|
||||
plugins_membershiplevelvip: null,
|
||||
scheduled_timer: null,
|
||||
scheduled_value: 0,
|
||||
payment_code: '',
|
||||
barcode: {
|
||||
width: 660,
|
||||
height: 120,
|
||||
code: '',
|
||||
},
|
||||
qrcode: {
|
||||
code: '',
|
||||
size: 450,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
// 页面加载初始化
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 获取屏幕亮度
|
||||
// #ifndef H5
|
||||
var self = this;
|
||||
if ((params || null) != null && (params.screen_brightness_value || null) == null) {
|
||||
uni.getScreenBrightness({
|
||||
success: function (res) {
|
||||
self.setData({
|
||||
screen_brightness_value: res.value,
|
||||
});
|
||||
},
|
||||
});
|
||||
} else {
|
||||
self.setData({
|
||||
screen_brightness_value: params.screen_brightness_value,
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
|
||||
// 初始化配置
|
||||
this.init_config();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 初始化配置
|
||||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
this.setData({
|
||||
plugins_membershiplevelvip: app.globalData.get_config('plugins_base.membershiplevelvip', null),
|
||||
});
|
||||
} else {
|
||||
app.globalData.is_config(this, 'init_config');
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
// 获取付款码
|
||||
this.get_data();
|
||||
|
||||
// #ifndef H5
|
||||
// 设置屏幕亮度
|
||||
uni.setScreenBrightness({
|
||||
value: 1,
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: this.$t('setup.setup.nwt4o1'),
|
||||
is_to_login: 1,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取付款码
|
||||
get_data() {
|
||||
clearInterval(this.scheduled_timer);
|
||||
var self = this;
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('paymentcode', 'user', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
var time = parseInt(res.data.data.time || 30);
|
||||
var timer = setInterval(function () {
|
||||
if (time <= 1) {
|
||||
self.get_data();
|
||||
} else {
|
||||
time--;
|
||||
self.setData({ scheduled_value: time });
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// 付款码数据
|
||||
var barcode = this.barcode;
|
||||
var qrcode = this.qrcode;
|
||||
barcode['code'] = res.data.data.code;
|
||||
qrcode['code'] = res.data.data.code;
|
||||
this.setData({
|
||||
data_list_loding_status: 3,
|
||||
is_to_login: 0,
|
||||
barcode: barcode,
|
||||
qrcode: qrcode,
|
||||
payment_code: res.data.data.code,
|
||||
scheduled_timer: timer,
|
||||
scheduled_value: time,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
is_to_login: 0,
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
is_to_login: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
},
|
||||
|
||||
// 页面销毁时执行
|
||||
onUnload: function () {
|
||||
clearInterval(this.scheduled_timer);
|
||||
// #ifndef H5
|
||||
// 恢复屏幕原始亮度
|
||||
if (this.screen_brightness_value > 0) {
|
||||
uni.setScreenBrightness({
|
||||
value: this.screen_brightness_value,
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './payment-code.css';
|
||||
</style>
|
||||
69
pages/plugins/wallet/recharge/recharge.css
Normal file
69
pages/plugins/wallet/recharge/recharge.css
Normal file
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* 充值头部
|
||||
*/
|
||||
.wallet-price {
|
||||
padding: 104rpx 40rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.wallet-price .unit {
|
||||
font-size: 42rpx;
|
||||
}
|
||||
|
||||
.wallet-price .price {
|
||||
font-size: 80rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值内容
|
||||
*/
|
||||
.recharge-content {
|
||||
border-radius: 32rpx 32rpx 0 0;
|
||||
padding: 48rpx 28rpx;
|
||||
}
|
||||
|
||||
.recharge-price-list {
|
||||
width: calc(100% / 3 - 24rpx);
|
||||
height: 140rpx;
|
||||
line-height: 140rpx;
|
||||
padding: 18rpx 12rpx;
|
||||
}
|
||||
|
||||
.recharge-price-content {
|
||||
background: #F5F7F9;
|
||||
border: 1px solid #F5F7F9;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.recharge-price-content.active {
|
||||
background: rgba(226, 44, 8, 0.06);
|
||||
color: #E22C08;
|
||||
border: 1px solid #E22C08;
|
||||
}
|
||||
|
||||
.recharge-price-content .tips {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 20rpx;
|
||||
background: #D8D8D8 linear-gradient(107deg, #FC6F31 0%, #E22C08 100%);
|
||||
border-radius: 16rpx 0 16rpx 0;
|
||||
top: -16rpx;
|
||||
}
|
||||
|
||||
.form-container .custom-price {
|
||||
background: #F5F7F9 !important;
|
||||
}
|
||||
|
||||
.form-container input {
|
||||
height: 80rpx !important;
|
||||
line-height: 80rpx !important;
|
||||
}
|
||||
|
||||
.circle-poiont {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.recharge-desc-title,
|
||||
.recharge-desc-content {
|
||||
padding-bottom: 16rpx;
|
||||
}
|
||||
291
pages/plugins/wallet/recharge/recharge.vue
Normal file
291
pages/plugins/wallet/recharge/recharge.vue
Normal file
@@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<component-nav-back :propName="$t('recharge.recharge.otwkjn')"></component-nav-back>
|
||||
<view v-if="data_list_loding_status == 3" class="weixin-nav-padding-top">
|
||||
<view class="padding-top-xxxl">
|
||||
<!-- 头部背景 -->
|
||||
<image :src="wallet_static_url + 'rechage-bg.png'" mode="widthFix" class="pa top-0 bg-img wh-auto" />
|
||||
<view class="pr padding-top-main">
|
||||
<view class="wallet-price cr-white">
|
||||
<view class="text-size-lg fw-b">{{$t('recharge.recharge.3shyx4')}}</view>
|
||||
<view class="margin-top-sm">
|
||||
<text class="unit">{{ currency_symbol }}</text>
|
||||
<text class="price fw-b">{{ user_wallet.normal_money }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="recharge-content bg-white spacing-mt">
|
||||
<block v-if="preset_data.length > 0">
|
||||
<view class="padding-horizontal-sm spacing-mb">{{$t('recharge.recharge.60k2v3')}}</view>
|
||||
<view class="flex-row flex-wrap tc spacing-mb">
|
||||
<view v-for="(item, index) in preset_data" :key="index" class="recharge-price-list" :data-index="index" :data-value="item.value" @tap="change_price_event">
|
||||
<view class="recharge-price-content border-radius-main pr" :class="select_index === index ? 'active' : ''">
|
||||
<view v-if="item.tips" class="tips cr-white dis-inline-block pa left-0 text-size-xss">{{ item.tips }}</view>
|
||||
<view class="single-text">
|
||||
<text class="text-size-md">{{ currency_symbol }}</text>
|
||||
<text class="text-size-xl">{{ item.value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="form-container padding-top-sm padding-horizontal-sm">
|
||||
<view class="form-gorup border-radius-main custom-price flex-row align-c">
|
||||
<view class="margin-right-xxl">{{preset_data.length > 0 ? $t('recharge.recharge.23zwpz') : $t('recharge.recharge.otwkjn')}}{{$t('recharge.recharge.qbw1x2')}}</view>
|
||||
<input type="digit" name="money" v-model="recharge_money_value" placeholder-class="cr-grey-9" class="cr-base text-size-md flex-1 flex-width" :placeholder="$t('recharge.recharge.73f4v9')" @input="recharge_money_value_input_event" maxlength="6" />
|
||||
</view>
|
||||
<view class="form-gorup form-gorup-submit spacing-mt">
|
||||
<button class="round cr-white bg-main br-main text-size" type="default" hover-class="none" :disabled="form_submit_disabled_status" @tap="form_submit_event">{{$t('recharge.recharge.x27b25')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="((recharge_desc || null) != null && recharge_desc.length > 0)" class="recharge-desc padding-top-xxl padding-horizontal-sm">
|
||||
<view class="recharge-desc-title padding-bottom-sm">{{$t('recharge.recharge.4fm61g')}}</view>
|
||||
<view v-for="(item, index) in recharge_desc" :key="index" class="recharge-desc-content cr-grey-9 flex-row align-c">
|
||||
<text class="dis-inline-block circle bg-main circle-poiont margin-right-sm"></text>
|
||||
<text class="text-size-xs">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
<!-- 支付弹窗 -->
|
||||
<component-payment
|
||||
:propCurrencySymbol="currency_symbol"
|
||||
:propPayUrl="pay_url"
|
||||
:propQrcodeUrl="qrcode_url"
|
||||
propPayDataKey="recharge_id"
|
||||
:propPaymentList="payment_list"
|
||||
:propTempPayValue="temp_pay_value"
|
||||
:propPayPrice="pay_price"
|
||||
:propPaymentId="payment_id"
|
||||
:propIsRedirectTo="true"
|
||||
:propToFailPage="to_fail_page"
|
||||
:propToAppointPage="to_appoint_page"
|
||||
:propIsShowPayment="is_show_payment_popup"
|
||||
@close-payment-popup="payment_popup_event_close"
|
||||
></component-payment>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNavBack from '@/components/nav-back/nav-back';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentPayment from '@/components/payment/payment';
|
||||
var wallet_static_url = app.globalData.get_static_url('wallet', true) + 'app/';
|
||||
|
||||
var currency_symbol = (app.globalData.data.is_wallet_use_fixed_currency_symbol == 1) ? app.globalData.data.currency_symbol : app.globalData.currency_symbol();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
wallet_static_url: wallet_static_url,
|
||||
currency_symbol: currency_symbol,
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
recharge_money_value: '',
|
||||
form_submit_disabled_status: false,
|
||||
preset_data: [],
|
||||
recharge_desc: '',
|
||||
user_wallet: null,
|
||||
select_index: null,
|
||||
|
||||
// 支付弹窗参数
|
||||
pay_url: '',
|
||||
qrcode_url: '',
|
||||
payment_list: [],
|
||||
temp_pay_value: '',
|
||||
is_show_payment_popup: false,
|
||||
pay_price: 0,
|
||||
payment_id: 0,
|
||||
// 支付失败跳转的页面
|
||||
to_fail_page: '/pages/plugins/wallet/user/user',
|
||||
to_appoint_page: '/pages/plugins/wallet/user/user?type=3',
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNavBack,
|
||||
componentPayment,
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
recharge_money_value: params.money || '',
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.setData({
|
||||
pay_url: app.globalData.get_request_url('pay', 'recharge', 'wallet'),
|
||||
qrcode_url: app.globalData.get_request_url('paycheck', 'recharge', 'wallet'),
|
||||
});
|
||||
this.get_data();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: this.$t('extraction-apply.extraction-apply.m3xdif'),
|
||||
});
|
||||
}
|
||||
},
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('rechargeconfigdata', 'recharge', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
preset_data: data.preset_data || [],
|
||||
recharge_desc: data.recharge_desc || '',
|
||||
user_wallet: data.user_wallet || null,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 3,
|
||||
});
|
||||
} 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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 选择充值金额
|
||||
change_price_event(e) {
|
||||
this.setData({
|
||||
select_index: e.currentTarget.dataset.index,
|
||||
recharge_money_value: e.currentTarget.dataset.value,
|
||||
});
|
||||
},
|
||||
|
||||
// 充值金额输入事件
|
||||
recharge_money_value_input_event(e) {
|
||||
this.setData({
|
||||
recharge_money_value: e.detail.value || '',
|
||||
select_index: null,
|
||||
});
|
||||
},
|
||||
|
||||
// 数据提交
|
||||
form_submit_event(e) {
|
||||
// 参数
|
||||
if ((this.recharge_money_value || null) == null) {
|
||||
app.globalData.showToast(this.$t('recharge.recharge.73f4v9'));
|
||||
return false;
|
||||
}
|
||||
|
||||
this.setData({
|
||||
form_submit_disabled_status: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('create', 'recharge', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
money: this.recharge_money_value,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
uni.setStorageSync(app.globalData.data.cache_page_pay_key, { type: 1 });
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
pay_price: data.money,
|
||||
temp_pay_value: data.recharge_id,
|
||||
payment_id: data.default_payment_id || 0,
|
||||
payment_list: data.payment_list,
|
||||
is_show_payment_popup: true,
|
||||
});
|
||||
} 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: () => {
|
||||
this.setData({
|
||||
form_submit_disabled_status: false,
|
||||
});
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
payment_popup_event_close() {
|
||||
this.setData({
|
||||
is_show_payment_popup: false,
|
||||
});
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
onPageScroll(e) {
|
||||
var top = e.scrollTop > 47 ? 1 : e.scrollTop / 47;
|
||||
this.setData({
|
||||
opacity: top,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './recharge.css';
|
||||
</style>
|
||||
15
pages/plugins/wallet/transfer/transfer.css
Normal file
15
pages/plugins/wallet/transfer/transfer.css
Normal file
@@ -0,0 +1,15 @@
|
||||
.img {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
.buy-submit {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.error-msg {
|
||||
color: #FF6C6C;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
232
pages/plugins/wallet/transfer/transfer.vue
Normal file
232
pages/plugins/wallet/transfer/transfer.vue
Normal file
@@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="padding-main">
|
||||
<block v-if="(data || null) != null">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="border-radius-main bg-white padding-vertical-main padding-left-main flex-row" :class="is_error_msg ? '' : 'spacing-mb'">
|
||||
<view class="title fw-b text-size margin-right-main">{{$t('cash-create.cash-create.36756z')}}</view>
|
||||
<view class="flex-1 flex-width padding-right-main">
|
||||
<view class="flex-row jc-sb align-c">
|
||||
<!-- #ifndef H5 -->
|
||||
<view class="margin-right-sm pr top-xs" @tap="scan_event">
|
||||
<iconfont name="icon-scan" size="28rpx" color="#999" propClass="lh-il"></iconfont>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<input name="keywords" :value="input_clear_value" class="text-size-md pr top-sm flex-1 flex-width" :placeholder="$t('transfer.transfer.t53ary')" placeholder-class="cr-grey-c" @input="input_account_event" />
|
||||
<text class="cr-main pr top-xs margin-left-sm" @tap="search_account_event">{{$t('common.confirm')}}</text>
|
||||
</view>
|
||||
<view v-if="(receive_user || null) != null && input_clear_value" class="br-t-e padding-top-main margin-top-main flex-row align-c">
|
||||
<image :src="receive_user.avatar" mode="widthFix" class="img margin-right-xs circle" />
|
||||
<text class="text-size-xs">{{ receive_user.user_name_view }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="is_error_msg" class="error-msg text-size-xs padding-vertical">{{ error_msg }}</view>
|
||||
<view class="border-radius-main bg-white padding-main spacing-mb">
|
||||
<view class="title fw-b text-size margin-bottom-xxxl padding-bottom-xl">{{$t('transfer.transfer.2q274j')}}</view>
|
||||
<input name="money" type="number" class="text-size-xl tc cr-red" :placeholder="$t('transfer.transfer.g22y5v')" placeholder-class="cr-grey-c" />
|
||||
<view class="tc spacing-mt-10 margin-bottom-xxxl padding-bottom-main">
|
||||
<text class="cr-grey-9">{{$t('transfer.transfer.9xe2bl')}}</text>
|
||||
<text class="fw-b">{{ data.normal_money }}</text>
|
||||
</view>
|
||||
<input name="note" class="text-size-md bg-grey-f9 padding-main border-radius-sm" :placeholder="$t('transfer.transfer.2bwh7h')" placeholder-class="cr-grey-c" />
|
||||
</view>
|
||||
<view class="padding-main">
|
||||
<button type="default" form-type="submit" hover-class="none" size="mini" class="br-main bg-main cr-white round buy-submit text-size dis-block">{{$t('common.confirm')}}</button>
|
||||
</view>
|
||||
</form>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data: null,
|
||||
receive_user: null,
|
||||
is_error_msg: false,
|
||||
error_msg: '',
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
input_clear_value: '',
|
||||
};
|
||||
},
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.setData({
|
||||
is_user_login: true,
|
||||
});
|
||||
this.get_data();
|
||||
}
|
||||
},
|
||||
// 获取数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'user', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
data: data.user_wallet || null,
|
||||
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: () => {
|
||||
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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
// 账户输入事件
|
||||
input_account_event(e) {
|
||||
this.setData({
|
||||
input_clear_value: e.detail.value,
|
||||
});
|
||||
},
|
||||
// 用户查询
|
||||
search_account_event() {
|
||||
if (this.is_user_login) {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('userquery', 'transfer', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
keywords: this.input_clear_value,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.setData({
|
||||
receive_user: res.data.data || null,
|
||||
is_error_msg: false,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
receive_user: null,
|
||||
is_error_msg: true,
|
||||
error_msg: res.data.msg,
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
this.setData({
|
||||
receive_user: null,
|
||||
is_error_msg: true,
|
||||
error_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 扫码
|
||||
scan_event(e) {
|
||||
var self = this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
self.setData({
|
||||
input_clear_value: res.result
|
||||
});
|
||||
self.search_account_event();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 转账表单提交
|
||||
form_submit(e) {
|
||||
if (this.is_user_login) {
|
||||
var new_data = {
|
||||
...e.detail.value,
|
||||
receive_user_id: (this.receive_user || null) === null ? '' : this.receive_user.id,
|
||||
};
|
||||
var validation = [
|
||||
{ fields: 'keywords', msg: this.$t('transfer.transfer.1aijp1') },
|
||||
{ fields: 'receive_user_id', msg: this.$t('transfer.transfer.x4mzo9') },
|
||||
{ fields: 'money', msg: this.$t('transfer.transfer.g22y5v') },
|
||||
];
|
||||
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('save', 'transfer', 'wallet'),
|
||||
method: 'POST',
|
||||
data: new_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
app.globalData.url_open('/pages/plugins/wallet/user/user?type=3', true);
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'form_submit', e)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
@import './transfer.css';
|
||||
</style>
|
||||
143
pages/plugins/wallet/user-cash-detail/user-cash-detail.vue
Normal file
143
pages/plugins/wallet/user-cash-detail/user-cash-detail.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<block v-if="detail != null">
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<view v-if="detail_list.length > 0" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in detail_list" :key="index" class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">{{ item.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
data_bottom_line_status: false,
|
||||
detail: null,
|
||||
detail_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("detail", "cash", "wallet"),
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.params.id,
|
||||
},
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
detail: data.data,
|
||||
detail_list: [
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.e8a3e8'), value: data.data.cash_no || "" },
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.wyad6w'), value: data.data.status_name || "" },
|
||||
{ name: this.$t('cash-create.cash-create.qg404q'), value: data.data.money || "" },
|
||||
{ name: this.$t('cash-create.cash-create.9ugssd'), value: data.data.commission || "" },
|
||||
{ name: this.$t('cash-create.cash-create.yu2raf'), value: data.data.cash_type_name || "" },
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.j5s3u6'), value: data.data.bank_name || "" },
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.53k647'), value: data.data.bank_username || "" },
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.m556tl'), value: data.data.bank_accounts || "" },
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.i308o1'), value: data.data.pay_money <= 0 ? "" : data.data.pay_money || "" },
|
||||
{ name: this.$t('user-cash-detail.user-cash-detail.451xxt'), value: data.data.pay_time || "" },
|
||||
{ name: this.$t('common.note'), value: data.data.msg || "" },
|
||||
{ name: this.$t('common.apply_time'), value: data.data.add_time || "" },
|
||||
{ name: this.$t('common.upd_time'), value: data.data.upd_time || "" },
|
||||
],
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: "",
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, "init")) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<block v-if="detail != null">
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<view v-if="detail_list.length > 0" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in detail_list" :key="index" class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">{{ item.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
data_bottom_line_status: false,
|
||||
detail: null,
|
||||
detail_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("detail", "recharge", "wallet"),
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.params.id,
|
||||
},
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
detail: data.data,
|
||||
detail_list: [
|
||||
{ name: this.$t('user-recharge-detail.user-recharge-detail.ch84a8'), value: data.data.recharge_no || "" },
|
||||
{ name: this.$t('user-recharge-detail.user-recharge-detail.dq5v2u'), value: data.data.status_name || "" },
|
||||
{ name: this.$t('user-recharge-detail.user-recharge-detail.7272ia'), value: data.data.money || "" },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.516tlr'), value: data.data.pay_money <= 0 ? "" : data.data.pay_money || "" },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.0e1sfs'), value: data.data.payment_name || "" },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.h2c78h'), value: data.data.add_time || "" },
|
||||
{ name: this.$t('user-order-detail.user-order-detail.wn83rn'), value: data.data.pay_time || "" },
|
||||
],
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: "",
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, "init")) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<block v-if="detail != null">
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<view v-if="detail_list.length > 0" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in detail_list" :key="index" class="item br-b-dashed oh padding-vertical-main">
|
||||
<view class="title fl padding-right-main cr-grey">{{ item.name }}</view>
|
||||
<view class="content fl br-l padding-left-main">{{ item.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: "",
|
||||
data_bottom_line_status: false,
|
||||
detail: null,
|
||||
detail_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url("detail", "transfer", "wallet"),
|
||||
method: "POST",
|
||||
data: {
|
||||
id: this.params.id,
|
||||
},
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var receive_user = data.data.receive_user || {};
|
||||
this.setData({
|
||||
detail: data.data,
|
||||
detail_list: [
|
||||
{ name: this.$t('transfer.transfer.678uyg'), value: data.data.transfer_no || "" },
|
||||
{ name: this.$t('transfer.transfer.2q274j'), value: data.data.money || "" },
|
||||
{ name: this.$t('transfer.transfer.4g21cu'), value: receive_user.user_name_view || "" },
|
||||
{ name: this.$t('common.note'), value: data.data.note || "" },
|
||||
{ name: this.$t('user-transfer-detail.user-transfer-detail.x17599'), value: data.data.add_time || "" },
|
||||
],
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: "",
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, "init")) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
87
pages/plugins/wallet/user/user.css
Normal file
87
pages/plugins/wallet/user/user.css
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 基础
|
||||
*/
|
||||
.wallet-bg {
|
||||
/* #ifdef H5 || APP */
|
||||
top: -80rpx !important;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.wallet-head .content {
|
||||
border-radius: 24rpx;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.transfer-accounts {
|
||||
border: 2rpx solid #fff;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
padding: 0 28rpx;
|
||||
}
|
||||
|
||||
.transfer-icon {
|
||||
position: relative;
|
||||
top: 6rpx;
|
||||
}
|
||||
|
||||
.content-padding-1 {
|
||||
padding: 2rpx;
|
||||
left: -4rpx;
|
||||
right: -4rpx;
|
||||
top: -4rpx;
|
||||
}
|
||||
|
||||
.filter-blur {
|
||||
backdrop-filter: blur(40rpx);
|
||||
}
|
||||
|
||||
.filter-blur-child {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
filter: blur(0rpx);
|
||||
}
|
||||
|
||||
.effective {
|
||||
font-size: 72rpx;
|
||||
}
|
||||
|
||||
.freeze,
|
||||
.give {
|
||||
font-size: 42rpx;
|
||||
text-shadow: 0px 1px 4px rgba(234, 44, 44, 0.46);
|
||||
}
|
||||
|
||||
/*
|
||||
* 导航
|
||||
*/
|
||||
.nav .active {
|
||||
width: 64px;
|
||||
height: 4px;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 媒体查询
|
||||
*/
|
||||
@media only screen and (min-width:960px) {
|
||||
.wallet-bg {
|
||||
/* #ifdef H5 */
|
||||
top: -540rpx !important;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.filter-blur-child {
|
||||
/* #ifdef H5 */
|
||||
left: -30rpx;
|
||||
top: -30px;
|
||||
right: -30px;
|
||||
bottom: -30px;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.wallet-child-bg {
|
||||
/* #ifdef H5 */
|
||||
height: 100% !important;
|
||||
/* #endif */
|
||||
}
|
||||
}
|
||||
296
pages/plugins/wallet/user/user.vue
Normal file
296
pages/plugins/wallet/user/user.vue
Normal file
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<component-nav-back :propIsShowBack="true" :propName="$t('pages.plugins-wallet-user')"></component-nav-back>
|
||||
<block v-if="(data_base || null) != null">
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60" @scroll="scroll_event">
|
||||
<view class="page-bottom-fixed">
|
||||
<view class="weixin-nav-padding-top">
|
||||
<view class="padding-top-xxxl">
|
||||
<!-- 头部背景 -->
|
||||
<image :src="wallet_static_url + 'title-bg.png'" mode="widthFix" class="pa bg-img wh-auto" :class="status_bar_height > 0 ? 'top-0' : 'wallet-bg'" />
|
||||
<view class="pr padding-top-main">
|
||||
<!-- 钱包信息 -->
|
||||
<view class="padding-top-xxxl oh margin-top-main">
|
||||
<view class="wallet-head padding-horizontal-xxxl">
|
||||
<!-- 用户中心公告 -->
|
||||
<view v-if="(data_base.user_center_notice || null) != null && data_base.user_center_notice.length > 0">
|
||||
<uni-notice-bar class="padding-0" show-icon scrollable :text="data_base.user_center_notice.join('')" background-color="transparent" color="#fff" />
|
||||
</view>
|
||||
<view class="content oh cr-white pr filter-blur">
|
||||
<view class="pa content-padding-1 oh filter-blur-child">
|
||||
<image :src="wallet_static_url + 'wallet-bg.png'" mode="widthFix" class="wh-auto wallet-child-bg" />
|
||||
</view>
|
||||
<view class="pr z-i flex-row jc-c align-s">
|
||||
<view class="flex-1 flex-width">
|
||||
<view>{{$t('frequencycard-list.frequencycard-list.954ewh')}}</view>
|
||||
<text class="fw-b effective">{{ is_price_show ? user_wallet.normal_money || '0.00' : '***' }}</text>
|
||||
</view>
|
||||
<view class="flex-row">
|
||||
<view @tap="price_change">
|
||||
<iconfont :name="is_price_show ? 'icon-wodeqianbao-eye' : 'icon-eye-half'" size="44rpx"></iconfont>
|
||||
</view>
|
||||
<view class="margin-left-xxxl" data-value="/pages/plugins/wallet/payment-code/payment-code" @tap="url_event">
|
||||
<iconfont name="icon-qrcode" size="44rpx"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pr z-i flex-row jc-c align-c">
|
||||
<view class="flex-1 flex-width flex-row jc-sb align-c margin-top-main">
|
||||
<view class="flex-1">
|
||||
<view class="tetx-size-xs">{{$t('user.user.mgx9x4')}}</view>
|
||||
<text class="freeze">{{ is_price_show ? user_wallet.frozen_money || '0.00' : '***' }}</text>
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<view class="tetx-size-xs">{{$t('user.user.424v6n')}}</view>
|
||||
<text class="give">{{ is_price_show ? user_wallet.give_money || '0.00' : '***' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="(data_base || null) != null && (data_base.is_enable_transfer || 0) == 1" class="transfer-accounts cr-white va-m round flex-row align-c" data-value="/pages/plugins/wallet/transfer/transfer" @tap="url_event">
|
||||
<iconfont name="icon-transfer" size="28rpx" propClass="transfer-icon"></iconfont>
|
||||
<text class="margin-left-xs">{{$t('user.user.29f6n5')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-main padding-top-xxxl">
|
||||
<!-- 导航 -->
|
||||
<view v-if="nav_list.length > 0" class="nav oh margin-bottom-xl">
|
||||
<view class="flex-row jc-sb align-c">
|
||||
<block v-for="(item, index) in nav_list" :key="index">
|
||||
<view class="text-size fw-b" :data-index="index" @tap="nav_change">
|
||||
<view class="pr dis-inline-block">
|
||||
{{ item.title }}
|
||||
<view v-if="current === index" class="pa active" :style="'background: linear-gradient(90deg, ' + theme_color + ' 0%, rgba(255, 255, 255, 0.27) 100%)'"></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 明细 -->
|
||||
<view class="nav-detail margin-bottom-lg">
|
||||
<view v-if="current === 0">
|
||||
<component-wallet-log :propPullDownRefresh="propPullDownRefresh" :propScrollLower="scroll_lower_bool"></component-wallet-log>
|
||||
</view>
|
||||
<view v-if="current === 1">
|
||||
<component-user-recharge :propPullDownRefresh="propPullDownRefresh" :propScrollLower="scroll_lower_bool" @pay-success="pay_success_event"></component-user-recharge>
|
||||
</view>
|
||||
<view v-if="current === 2">
|
||||
<component-user-cash :propPullDownRefresh="propPullDownRefresh" :propScrollLower="scroll_lower_bool"></component-user-cash>
|
||||
</view>
|
||||
<view v-if="current === 3">
|
||||
<component-transfer :propPullDownRefresh="propPullDownRefresh" :propScrollLower="scroll_lower_bool"></component-transfer>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<view class="flex-row jc-sb align-c gap-10">
|
||||
<button v-if="(data_base || null) != null && (data_base.is_enable_recharge || 0) == 1" class="item round cr-white bg-main br-main text-size wh-auto" type="default" hover-class="none" data-value="/pages/plugins/wallet/recharge/recharge" @tap="url_event">{{$t('recharge.recharge.otwkjn')}}</button>
|
||||
<button v-if="(data_base || null) != null && (data_base.is_enable_cash || 0) == 1" class="item round cr-main bg-white br-main text-size wh-auto" type="default" hover-class="none" data-value="/pages/plugins/wallet/cash-auth/cash-auth" @tap="url_event">{{$t('user.user.8752a4')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNavBack from '@/components/nav-back/nav-back';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
import componentWalletLog from '../components/wallet-log/wallet-log';
|
||||
import componentUserRecharge from '../components/user-recharge/user-recharge';
|
||||
import componentUserCash from '../components/user-cash/user-cash';
|
||||
import componentTransfer from '../components/transfer/transfer';
|
||||
var wallet_static_url = app.globalData.get_static_url('wallet', 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,
|
||||
theme_color: app.globalData.get_theme_color(),
|
||||
status_bar_height: bar_height,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
bottom_fixed_style: '',
|
||||
data_base: null,
|
||||
user_wallet: null,
|
||||
nav_list: [],
|
||||
submit_disabled_status: false,
|
||||
// 是否显示价格
|
||||
is_price_show: false,
|
||||
// 账户明细
|
||||
params: null,
|
||||
current: 0,
|
||||
propPullDownRefresh: false,
|
||||
scroll_lower_bool: false,
|
||||
payment_page_url: null,
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNavBack,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
componentWalletLog,
|
||||
componentUserRecharge,
|
||||
componentUserCash,
|
||||
componentTransfer,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 是否指定状态
|
||||
if ((params.type || null) != null) {
|
||||
this.setData({
|
||||
params: params,
|
||||
current: Number(params.type),
|
||||
});
|
||||
}
|
||||
|
||||
var ck = app.globalData.data.cache_page_pay_key;
|
||||
var pay_data = uni.getStorageSync(ck) || null;
|
||||
if (pay_data !== null) {
|
||||
uni.removeStorageSync(ck);
|
||||
this.setData({
|
||||
current: pay_data.type || 0,
|
||||
});
|
||||
setTimeout(() => {
|
||||
app.globalData.update_query_string_parameter([{ key: 'type', value: pay_data.type }]);
|
||||
}, 200);
|
||||
}
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.get_data();
|
||||
this.setData({
|
||||
propPullDownRefresh: !this.propPullDownRefresh,
|
||||
});
|
||||
},
|
||||
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('index', 'user', 'wallet'),
|
||||
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,
|
||||
user_wallet: data.user_wallet || null,
|
||||
nav_list: data.nav_list || [],
|
||||
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() {
|
||||
this.setData({
|
||||
is_price_show: !this.is_price_show,
|
||||
});
|
||||
},
|
||||
// 明细导航切换
|
||||
nav_change(e) {
|
||||
this.setData({
|
||||
current: e.currentTarget.dataset.index || 0,
|
||||
});
|
||||
app.globalData.update_query_string_parameter([{ key: 'type', value: e.currentTarget.dataset.index }]);
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.setData({
|
||||
scroll_lower_bool: !this.scroll_lower_bool,
|
||||
});
|
||||
},
|
||||
|
||||
// 支付成功回调
|
||||
pay_success_event() {
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
// 页面滚动监听
|
||||
scroll_event(e) {
|
||||
uni.$emit('onPageScroll', e.detail);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './user.css';
|
||||
</style>
|
||||
138
pages/plugins/wallet/wallet-log-detail/wallet-log-detail.vue
Normal file
138
pages/plugins/wallet/wallet-log-detail/wallet-log-detail.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<block v-if="detail != null">
|
||||
<view class="padding-horizontal-main padding-top-main">
|
||||
<view v-if="detail_list.length > 0" class="panel-item padding-main border-radius-main bg-white spacing-mb">
|
||||
<view class="panel-content oh">
|
||||
<view v-for="(item, index) in detail_list" :key="index" class="item br-b-dashed oh padding-vertical-main flex-row align-c">
|
||||
<view class="padding-right-main cr-grey divider-r-f5">{{ item.name }}</view>
|
||||
<view class="padding-left-main">{{ item.value }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
detail: null,
|
||||
detail_list: [],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('detail', 'walletlog', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
id: this.params.id,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
detail: data.data,
|
||||
detail_list: [
|
||||
{ name: this.$t('invoice.invoice.l3832z'), value: data.data.business_type_name || '' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.tdf3wo'), value: data.data.operation_type_name || '' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.744os7'), value: data.data.money_type_name || '' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.ruq60b'), value: data.data.operation_money || '' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.4q7pfq'), value: data.data.original_money || '' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.r814ne'), value: data.data.latest_money || '' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.0ghn6g'), value: data.data.msg || '' },
|
||||
{ name: this.$t('wallet-log-detail.wallet-log-detail.i2kze7'), value: data.data.add_time || '' },
|
||||
],
|
||||
data_list_loding_status: 3,
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_msg: '',
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'init')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_msg: this.$t('common.internet_error_tips'),
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
Reference in New Issue
Block a user