mirror of
https://gitee.com/zongzhige/shopxo-uniapp.git
synced 2026-07-09 06:50:39 +08:00
Merge branch 'dev' into dev-yxl
This commit is contained in:
@ -248,6 +248,7 @@
|
||||
"plugins-wallet-user-cash-detail": "Withdrawal details",
|
||||
"plugins-wallet-user-transfer-detail": "Transfer details",
|
||||
"plugins-wallet-payment-code": "Wallet payment code",
|
||||
"plugins-wallet-integral-to-balance": "Points to balance",
|
||||
"plugins-wallet-transfer": "Transfer",
|
||||
"plugins-excellentbuyreturntocash-profit": "Details of Yougou cashback",
|
||||
"plugins-excellentbuyreturntocash-profit-detail": "Details of Yougou cashback",
|
||||
|
||||
@ -250,6 +250,7 @@
|
||||
"plugins-wallet-user-cash-detail": "提现详情",
|
||||
"plugins-wallet-user-transfer-detail": "转账详情",
|
||||
"plugins-wallet-payment-code": "钱包付款码",
|
||||
"plugins-wallet-integral-to-balance": "积分兑换余额",
|
||||
"plugins-wallet-transfer": "转账",
|
||||
"plugins-excellentbuyreturntocash-profit": "优购返现明细",
|
||||
"plugins-excellentbuyreturntocash-profit-detail": "优购返现详情",
|
||||
|
||||
@ -1086,6 +1086,13 @@
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "integral-to-balance/integral-to-balance",
|
||||
"style": {
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "payment-code/payment-code",
|
||||
"style": {
|
||||
|
||||
@ -8,15 +8,15 @@
|
||||
<view class="margin-top-xxxl">
|
||||
<view v-if="(user.is_setup_pwd || 0) == 1" class="pr">
|
||||
<input type="text" :placeholder="$t('password.password.4e24j1')" minlength="6" maxlength="18" name="my_pwd" :password="!eyes1" class="form-item margin-bottom-main" />
|
||||
<view class="eyes pa" data-index="1" @tap="eyes_event"><iconfont :name="eyes1 ? 'icon-wodeqianbao-eye' : 'icon-eye-half'" color="#666" size="32rpx"></iconfont></view>
|
||||
<view class="eyes pa" data-index="1" @tap="eyes_event"><iconfont :name="eyes1 ? 'icon-eye-close' : 'icon-eye-half'" color="#666" size="32rpx"></iconfont></view>
|
||||
</view>
|
||||
<view class="pr">
|
||||
<input type="text" :placeholder="$t('password.password.1lwiaz')" minlength="6" maxlength="18" name="new_pwd" :password="!eyes2" class="form-item margin-bottom-main" />
|
||||
<view class="eyes pa" data-index="2" @tap="eyes_event"><iconfont :name="eyes2 ? 'icon-wodeqianbao-eye' : 'icon-eye-half'" color="#666" size="32rpx"></iconfont></view>
|
||||
<view class="eyes pa" data-index="2" @tap="eyes_event"><iconfont :name="eyes2 ? 'icon-eye-close' : 'icon-eye-half'" color="#666" size="32rpx"></iconfont></view>
|
||||
</view>
|
||||
<view class="pr">
|
||||
<input type="text" :placeholder="$t('password.password.338433')" minlength="6" maxlength="18" name="confirm_new_pwd" :password="!eyes3" class="form-item margin-bottom-main" />
|
||||
<view class="eyes pa" data-index="3" @tap="eyes_event"><iconfont :name="eyes3 ? 'icon-wodeqianbao-eye' : 'icon-eye-half'" color="#666" size="32rpx"></iconfont></view>
|
||||
<view class="eyes pa" data-index="3" @tap="eyes_event"><iconfont :name="eyes3 ? 'icon-eye-close' : 'icon-eye-half'" color="#666" size="32rpx"></iconfont></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-top-xxxxl tc">
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view @tap="price_change">
|
||||
<iconfont :name="is_price_show ? 'icon-wodeqianbao-eye' : 'icon-eye-half'" size="44rpx"></iconfont>
|
||||
<iconfont :name="is_price_show ? 'icon-eye-close' : 'icon-eye-half'" size="44rpx"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row jc-sb">
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<view class="text-size-40 fw-b">{{ is_price_show ? accounts_summary : '***' }}</view>
|
||||
</view>
|
||||
<view @tap="price_change">
|
||||
<iconfont :name="is_price_show ? 'icon-wodeqianbao-eye' : 'icon-eye-half'" size="44rpx"></iconfont>
|
||||
<iconfont :name="is_price_show ? 'icon-eye-close' : 'icon-eye-half'" size="44rpx"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row jc-sb padding-bottom-main">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<component-nav-back></component-nav-back>
|
||||
<component-nav-back :propIsOpacity="false"></component-nav-back>
|
||||
<view v-if="(data || null) != null" class="signin-container">
|
||||
<view class="pr oh">
|
||||
<image :src="data.bg_images || signin_static_url + 'signin-bg.png'" mode="widthFix" class="wh-auto"></image>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="85%"></component-no-data>
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="60vh"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="85%"></component-no-data>
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="60vh"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="85%"></component-no-data>
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="60vh"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="85%"></component-no-data>
|
||||
<component-no-data :propStatus="data_list_loding_status" propLoadingLogoTop="60vh"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
|
||||
225
pages/plugins/wallet/integral-to-balance/integral-to-balance.vue
Normal file
225
pages/plugins/wallet/integral-to-balance/integral-to-balance.vue
Normal file
@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="(integral_to_balance || null) != null" class="padding-main">
|
||||
<!-- 功能未开或暂不可兑换 -->
|
||||
<block v-if="(integral_to_balance.is_enable_feature || 0) != 1 || (integral_to_balance.can_exchange || 0) != 1">
|
||||
<component-no-data :propStatus="0" :propMsg="(integral_to_balance.display_message || '') != '' ? integral_to_balance.display_message : integral_to_balance.text_popup_fallback_tip"></component-no-data>
|
||||
</block>
|
||||
<!-- 兑换表单 -->
|
||||
<view v-else class="form-container page-bottom-fixed">
|
||||
<view class="bg-white border-radius-main padding-main">
|
||||
<view class="text-size-sm cr-base margin-bottom-xs">{{ integral_to_balance.text_popup_line_integral }}</view>
|
||||
<view class="text-size-sm cr-base margin-bottom-xs">{{ integral_to_balance.text_popup_line_ratio }}</view>
|
||||
<view class="text-size-sm cr-base">{{ integral_to_balance.text_popup_line_estimate_all }}</view>
|
||||
</view>
|
||||
<view class="bg-white border-radius-main padding-main margin-top-main">
|
||||
<view class="form-gorup">
|
||||
<view class="margin-bottom-xs">{{ integral_to_balance.text_label_exchange_integral }}<text class="form-group-tips-must">*</text></view>
|
||||
<input type="number" :value="integral_input" placeholder-class="cr-grey" class="cr-base bg-grey-f9 padding-horizontal-main border-radius-sm" :placeholder="integral_to_balance.text_placeholder_integral_input" @input="integral_input_event" />
|
||||
<view class="text-size-sm cr-grey margin-top-sm">{{ integral_to_balance.text_preview_convertible_balance }}<text class="cr-base fw-b">{{ integral_to_balance.currency_symbol }}{{ preview_money }}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<button type="default" class="item bg-main br-main cr-white round text-size" hover-class="none" :loading="form_submit_loading" :disabled="form_submit_loading" @tap="submit_event">{{ integral_to_balance.text_btn_submit_exchange }}</button>
|
||||
</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(),
|
||||
bottom_fixed_style: '',
|
||||
integral_to_balance: null,
|
||||
integral_input: '',
|
||||
preview_money: '0.00',
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
form_submit_loading: false,
|
||||
};
|
||||
},
|
||||
|
||||
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();
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
integral_to_balance: null,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('integralbalanceinfo', 'user', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
var row = res.data.data || null;
|
||||
this.setData({
|
||||
integral_to_balance: row,
|
||||
data_list_loding_status: 0,
|
||||
data_list_loding_msg: '',
|
||||
integral_input: '',
|
||||
});
|
||||
this.sync_preview('', row);
|
||||
} 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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 输入事件
|
||||
integral_input_event(e) {
|
||||
var raw = e.detail.value || '';
|
||||
this.sync_preview(raw);
|
||||
},
|
||||
|
||||
// 同步渲染兑换金额
|
||||
sync_preview(raw, row_opt) {
|
||||
var row = row_opt || this.integral_to_balance;
|
||||
if ((row || null) == null) {
|
||||
return;
|
||||
}
|
||||
var maxI = parseInt(row.user_integral_value, 10) || 0;
|
||||
var points = parseInt(row.integral_to_balance_points, 10) || 100;
|
||||
if (points < 1) {
|
||||
points = 100;
|
||||
}
|
||||
var v = parseInt(String(raw).replace(/\D/g, ''), 10);
|
||||
if (isNaN(v) || v < 0) {
|
||||
v = 0;
|
||||
}
|
||||
if (v > maxI) {
|
||||
v = maxI;
|
||||
}
|
||||
var disp = v > 0 ? String(v) : '';
|
||||
var m = v > 0 && points > 0 ? v / points : 0;
|
||||
var pm = (Math.round(m * 100) / 100).toFixed(2);
|
||||
this.setData({
|
||||
integral_input: disp,
|
||||
preview_money: pm,
|
||||
});
|
||||
},
|
||||
|
||||
// 提交兑换余额
|
||||
submit_event() {
|
||||
var row = this.integral_to_balance;
|
||||
if ((row || null) == null || (row.can_exchange || 0) != 1) {
|
||||
return;
|
||||
}
|
||||
var maxI = parseInt(row.user_integral_value, 10) || 0;
|
||||
var amt = parseInt(this.integral_input, 10) || 0;
|
||||
if (amt < 1) {
|
||||
app.globalData.showToast(row.text_validation_integral_input || this.$t('common.params_error_tips'));
|
||||
return;
|
||||
}
|
||||
if (amt > maxI) {
|
||||
app.globalData.showToast(row.text_validation_integral_input || this.$t('common.params_error_tips'));
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
});
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('integralbalanceconvert', 'user', 'wallet'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
integral_amount: amt,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
});
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
app.globalData.wallet_integral_to_balance_refresh = 1;
|
||||
app.globalData.showToast(res.data.msg);
|
||||
setTimeout(function () {
|
||||
uni.navigateBack();
|
||||
}, 300);
|
||||
} else {
|
||||
if (app.globalData.is_login_check(res.data, this, 'submit_event')) {
|
||||
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'));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
@ -10,48 +10,56 @@
|
||||
<image :src="(default_images_data.default_center_head_bg_images_app || wallet_static_url + 'head-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 class="wallet-head padding-horizontal-xxxl margin-top-main">
|
||||
<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="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 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="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 class="flex-row">
|
||||
<view @tap="price_change">
|
||||
<iconfont :name="is_price_show ? 'icon-eye-close' : 'icon-eye-half'" size="44rpx"></iconfont>
|
||||
</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 v-if="(data_base.is_enable_payment_code || 0) == 1" 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 v-if="(data_base.is_enable_payment_code || 0) == 1" 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 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 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 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 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 v-if="(data_base.user_center_notice || null) != null && data_base.user_center_notice.length > 0" class="padding-horizontal-main margin-top-main">
|
||||
<uni-notice-bar class="padding-0" show-icon scrollable :text="data_base.user_center_notice.join('')" background-color="transparent" />
|
||||
</view>
|
||||
<!-- 积分兑换余额 -->
|
||||
<view v-if="(integral_to_balance || null) != null && (integral_to_balance.is_enable_feature || 0) == 1" class="padding-horizontal-main margin-top-main">
|
||||
<view class="flex-row align-c gap-10">
|
||||
<view class="flex-1 flex-width text-size-sm cr-base">
|
||||
<text>{{ integral_to_balance.text_entry_intro_before }}</text><text class="fw-b">{{ integral_to_balance.currency_symbol }}{{ integral_to_balance.integral_to_balance_estimate }}</text><text>{{ integral_to_balance.text_entry_intro_after }}</text>
|
||||
<text v-if="(integral_to_balance.can_exchange || 0) != 1 && (integral_to_balance.display_message || '') != ''" class="text-size-xs cr-grey margin-left-sm">{{ integral_to_balance.display_message }}</text>
|
||||
</view>
|
||||
<button v-if="(integral_to_balance.can_exchange || 0) == 1" type="default" size="mini" class="bg-main br-main cr-white round text-size-xs flex-shrink" hover-class="none" data-value="/pages/plugins/wallet/integral-to-balance/integral-to-balance" @tap="url_event">{{ integral_to_balance.text_btn_exchange }}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-main padding-top-xxxl">
|
||||
<!-- 导航 -->
|
||||
@ -135,7 +143,7 @@
|
||||
bottom_fixed_style: '',
|
||||
data_base: null,
|
||||
user_wallet: null,
|
||||
nav_list: [],
|
||||
nav_list: [],
|
||||
default_images_data: {},
|
||||
submit_disabled_status: false,
|
||||
// 是否显示价格
|
||||
@ -146,6 +154,7 @@
|
||||
propPullDownRefresh: false,
|
||||
scroll_lower_bool: false,
|
||||
payment_page_url: null,
|
||||
integral_to_balance: null,
|
||||
};
|
||||
},
|
||||
|
||||
@ -197,6 +206,14 @@
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
|
||||
// 从积分兑换页返回后刷新钱包数据
|
||||
if (app.globalData.wallet_integral_to_balance_refresh == 1) {
|
||||
app.globalData.wallet_integral_to_balance_refresh = 0;
|
||||
if ((this.data_base || null) != null) {
|
||||
this.get_data();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
@ -228,8 +245,9 @@
|
||||
this.setData({
|
||||
data_base: data.base || null,
|
||||
user_wallet: data.user_wallet || null,
|
||||
nav_list: data.nav_list || [],
|
||||
nav_list: data.nav_list || [],
|
||||
default_images_data: data.default_images_data || {},
|
||||
integral_to_balance: data.integral_to_balance || null,
|
||||
data_list_loding_msg: '',
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
@ -262,7 +280,7 @@
|
||||
});
|
||||
},
|
||||
// 明细导航切换
|
||||
nav_change(e) {
|
||||
nav_change(e) {
|
||||
var value = e.currentTarget.dataset.value || 'wallet';
|
||||
this.setData({
|
||||
current: value,
|
||||
|
||||
@ -1,3 +1,15 @@
|
||||
.integral-header-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.integral-header-divider {
|
||||
width: 2rpx;
|
||||
align-self: stretch;
|
||||
background-color: #eee;
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.points-integral .list {
|
||||
border-bottom: 2rpx solid #eee;
|
||||
padding: 30rpx 0;
|
||||
@ -5,4 +17,8 @@
|
||||
|
||||
.points-integral .list:last-of-type {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.scroll-box {
|
||||
height: calc(100vh - 190rpx);
|
||||
}
|
||||
@ -1,7 +1,44 @@
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="padding-main">
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view v-if="(user_integral_header || null) != null" class="integral-header bg-white border-radius-main">
|
||||
<view class="flex-row align-s">
|
||||
<view class="flex-1 flex-row align-c padding-main">
|
||||
<image :src="user_integral_header.available.icon" mode="aspectFit" class="integral-header-icon" />
|
||||
<view class="flex-1 flex-width margin-left-sm">
|
||||
<view class="text-size-xs">{{ user_integral_header.available.name }}</view>
|
||||
<view class="margin-top-xs">
|
||||
<text class="text-size-lg fw-b">{{ user_integral_header.available.value }}</text>
|
||||
<text class="text-size-xs cr-grey margin-left-sm">{{ user_integral_header.available.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="integral-header-divider"></view>
|
||||
<view class="flex-1 flex-row align-c padding-main">
|
||||
<image :src="user_integral_header.locking.icon" mode="aspectFit" class="integral-header-icon" />
|
||||
<view class="flex-1 flex-width margin-left-sm">
|
||||
<view class="text-size-xs">{{ user_integral_header.locking.name }}</view>
|
||||
<view class="margin-top-xs">
|
||||
<text class="text-size-lg fw-b">{{ user_integral_header.locking.value }}</text>
|
||||
<text class="text-size-xs cr-grey margin-left-sm">{{ user_integral_header.locking.unit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view class="padding-horizontal-main">
|
||||
<!-- 积分兑换余额 -->
|
||||
<view v-if="(integral_to_balance || null) != null && (integral_to_balance.is_enable_feature || 0) == 1" class="bg-white padding-main border-radius-main margin-bottom-main">
|
||||
<view class="flex-row align-c gap-10">
|
||||
<view class="flex-1 flex-width text-size-sm cr-base">
|
||||
<text>{{ integral_to_balance.text_entry_intro_before }}</text><text class="fw-b">{{ integral_to_balance.currency_symbol }}{{ integral_to_balance.integral_to_balance_estimate }}</text><text>{{ integral_to_balance.text_entry_intro_after }}</text>
|
||||
<text v-if="(integral_to_balance.can_exchange || 0) != 1 && (integral_to_balance.display_message || '') != ''" class="text-size-xs cr-grey margin-left-sm">{{ integral_to_balance.display_message }}</text>
|
||||
</view>
|
||||
<button v-if="(integral_to_balance.can_exchange || 0) == 1" type="default" size="mini" class="bg-main br-main cr-white round text-size-xs flex-shrink" hover-class="none" data-value="/pages/plugins/wallet/integral-to-balance/integral-to-balance" @tap="url_event">{{ integral_to_balance.text_btn_exchange }}</button>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="data_list.length > 0" class="padding-horizontal-main points-integral bg-white border-radius-main">
|
||||
<view v-for="(item,index) in data_list" class="list" :key="index">
|
||||
<view class="flex-row jc-sb align-c">
|
||||
@ -12,9 +49,9 @@
|
||||
</view>
|
||||
<view class="flex-row jc-sb align-c margin-top-main">
|
||||
<view>{{item.msg}}</view>
|
||||
<view>
|
||||
<text class="text-size-xs cr-grey va-m margin-right-sm">{{item.integral_type_text}}</text>
|
||||
<text class="text-size fw-b va-m" :class="item.operation_type == 1 ? 'cr-green' : 'cr-red'">{{item.operation_type == 1 ? '+' : '-'}}{{item.operation_integral}}</text>
|
||||
<view>
|
||||
<text class="text-size-xs cr-grey va-m margin-right-sm">{{item.integral_type_text}}</text>
|
||||
<text class="text-size fw-b va-m" :class="item.operation_type == 1 ? 'cr-green' : 'cr-red'">{{item.operation_type == 1 ? '+' : '-'}}{{item.operation_integral}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -25,9 +62,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
@ -47,7 +84,9 @@
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false
|
||||
data_bottom_line_status: false,
|
||||
user_integral_header: null,
|
||||
integral_to_balance: null,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -64,6 +103,16 @@
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 从积分兑换余额页返回后刷新列表与提示区
|
||||
if (app.globalData.wallet_integral_to_balance_refresh == 1) {
|
||||
app.globalData.wallet_integral_to_balance_refresh = 0;
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
}
|
||||
|
||||
// 加载数据
|
||||
this.init();
|
||||
|
||||
@ -130,8 +179,15 @@
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
var patch = {};
|
||||
if (typeof data.user_integral_header !== 'undefined') {
|
||||
patch.user_integral_header = data.user_integral_header;
|
||||
}
|
||||
if (typeof data.integral_to_balance !== 'undefined') {
|
||||
patch.integral_to_balance = data.integral_to_balance;
|
||||
}
|
||||
if (data.data.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data;
|
||||
@ -142,28 +198,29 @@
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
this.setData(Object.assign({
|
||||
data_list: temp_data_list,
|
||||
data_total: data.total,
|
||||
data_page_total: data.page_total,
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0
|
||||
});
|
||||
}, patch));
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: this.data_list.length > 0 && this.data_page > 1 && this.data_page > this.data_page_total,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
if (this.data_page <= 1) {
|
||||
this.setData({
|
||||
data_list: [],
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
var empty_patch = Object.assign({
|
||||
data_list_loding_status: 0,
|
||||
data_is_loading: 0,
|
||||
}, patch);
|
||||
this.setData(empty_patch);
|
||||
if (this.data_page <= 1) {
|
||||
this.setData({
|
||||
data_list: [],
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -192,7 +249,12 @@
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
}
|
||||
},
|
||||
|
||||
// url 跳转(与钱包页一致)
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user