新增余额提现,余额充值功能

This commit is contained in:
lemon橪
2021-06-28 18:04:17 +08:00
parent 5612636b29
commit 8239aad928
11 changed files with 555 additions and 225 deletions

View File

@@ -1,14 +1,17 @@
<template>
<view class="wap">
<u-navbar back-text="" title="预存款列表">
</u-navbar>
<view class="wrapper-show-money">
<view class="money-view">
<h3>预存款金额 </h3>
<view class="money">{{walletNum | unitPrice }}</view>
</view>
</view>
<view class="wrapper-tabs">
<swiper class="swiper-box" @change="changeSwiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper class="swiper-box" :current="swiperCurrent">
<swiper-item class="swiper-item" v-for="index in list.length" :key="index">
<scroll-view class="scroll-v view-wrapper" enableBackToTop="true" scroll-with-animation scroll-y @scrolltolower="loadMore">
<view v-if="datas.length!=0" class="view-item" v-for="(logItem, logIndex) in datas" :key="logIndex">
@@ -37,12 +40,11 @@
<script>
import { getUserRecharge, getWalletLog } from "@/api/members";
import storage from "@/utils/storage.js";
import { getUserWallet } from "@/api/members";
export default {
data() {
return {
walletNum:0,
walletNum: 0,
status: "loadmore",
current: 0,
swiperCurrent: 0,
@@ -77,6 +79,7 @@ export default {
this.walletNum = result.data.result.memberWallet;
},
methods: {
/**分页获取预存款充值记录 */
getRecharge() {
this.status = "loading";
@@ -105,10 +108,7 @@ export default {
});
},
// 点击swiper的时候清空数据
changeSwiper() {
this.groupBuy = [];
},
changed(index) {
this.datas = [];
this.swiperCurrent = index;
@@ -121,19 +121,6 @@ export default {
}
},
// swiper-item左右移动通知tabs的滑块跟随移动
transition({ detail: { dx } }) {
this.$refs.tabs.setDx(dx);
},
// 由于swiper的内部机制问题快速切换swiper不会触发dx的连续变化需要在结束时重置状态
// swiper滑动结束分别设置tabs和swiper的状态
animationfinish(e) {
// this.groupBuy = []
let current = e.detail.current;
this.$refs.tabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
loadMore() {
this.params.pageNumber++;
this.getWallet();
@@ -144,93 +131,96 @@ export default {
<style lang="scss" scoped>
.green {
color: $aider-color-green !important;
}
.view-item {
padding: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.view-item-change {
text-align: right;
> .-money {
font-size: 36rpx;
color: $main-color;
color: $aider-color-green !important;
}
.view-item {
padding: 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.view-item-change {
text-align: right;
> .-money {
font-size: 36rpx;
color: $main-color;
font-weight: bold;
}
> .-time {
font-size: 22rpx;
color: #999;
}
}
.view-item-detail {
line-height: 1.75;
> .-title {
font-size: 28rpx;
}
> .-number {
font-size: 22rpx;
color: #999;
}
}
.submit-btn {
line-height: 90rpx;
text-align: center;
color: #fff;
background: $main-color;
margin: 0 auto;
height: 90rpx;
}
.operation {
font-size: 32rpx;
margin-right: 24rpx;
color: rgb(96, 98, 102);
}
.money {
font-size: 40rpx;
font-weight: bold;
}
> .-time {
font-size: 22rpx;
color: #999;
.money-view {
height: 100%;
width: 100%;
padding: 0 32rpx;
display: flex;
align-items: flex-end;
justify-content: center;
flex-direction: column;
color: #fff;
background-image: linear-gradient(
25deg,
$main-color,
$light-color,
$aider-light-color
);
}
}
.view-item-detail {
line-height: 1.75;
> .-title {
font-size: 28rpx;
.swiper-item,
.scroll-v {
height: 100%;
}
> .-number {
font-size: 22rpx;
color: #999;
.swiper-box {
/* #ifndef H5 */
height: calc(100vh - 200rpx);
/* #endif */
/* #ifdef H5 */
height: calc(100vh - 288rpx);
/* #endif */
}
.wap {
width: 100%;
height: calc(100vh - 44px);
}
.wrapper-show-money {
height: 200rpx;
// background-image: url('/static/img/main-bg.jpg');
}
}
.submit-btn {
line-height: 90rpx;
text-align: center;
color: #fff;
background: $main-color;
margin: 0 auto;
height: 90rpx;
}
.wap {
}
.money {
font-size: 40rpx;
font-weight: bold;
}
.money-view {
height: 100%;
width: 100%;
padding: 0 32rpx;
display: flex;
align-items: flex-end;
justify-content: center;
flex-direction: column;
color: #fff;
background-image: linear-gradient(
25deg,
$main-color,
$light-color,
$aider-light-color
);
}
.swiper-item,
.scroll-v {
height: 100%;
}
.swiper-box {
/* #ifndef H5 */
height: calc(100vh - 200rpx);
/* #endif */
/* #ifdef H5 */
height: calc(100vh - 288rpx);
/* #endif */
}
.wap {
width: 100%;
height: calc(100vh - 44px);
}
.wrapper-show-money {
height: 200rpx;
// background-image: url('/static/img/main-bg.jpg');
}
</style>