You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/news1/wallet.vue

768 lines
16 KiB

10 months ago
<template>
10 months ago
<view class="wallet">
<view>
<u-navbar title="我的钱包" :border-bottom="false" :background="background" title-color="#fff"
back-icon-color='#fff'></u-navbar>
10 months ago
</view>
10 months ago
<image :src="$picUrl+'/static/news1/walletBg.png'" class="bgImg" mode="widthFix"></image>
10 months ago
<view class="walletContainer">
<view class="section1">
<view class="yue" @click="introShow=true">余额说明</view>
<view class="accountNum">
<text>账户余额</text>
<view style="margin-left: 5px;" @click="isEye=!isEye">
<u-icon :name="isEye?'eye':'eye-off'" color="#652F17" size="34"></u-icon>
</view>
10 months ago
</view>
10 months ago
<view class="walletHandle">
<text>{{isEye?(infor.balance?Number(infor.balance):infor.balance):'****'}}</text>
10 months ago
<view class="chongzhiBtn" @click="onRecharge">
10 months ago
充值
</view>
10 months ago
</view>
</view>
10 months ago
<view class="section2">
<view class="accountItem">
<view class="itemTop">
<view class="itemTitle">
<text>可提现</text>
<u-icon name="arrow-right" color="#909090" size="22"></u-icon>
</view>
<view class="num">
7 months ago
¥ {{infor.withdrawal_money?Number(infor.withdrawal_money):infor.withdrawal_money}}
10 months ago
</view>
10 months ago
</view>
10 months ago
<view class="handleBtn" @click="cashOut">
立即提现
10 months ago
</view>
</view>
10 months ago
<view class="accountItem">
<view class="itemTop">
<view class="itemTitle">
<text>不可提现</text>
</view>
<view class="num">
7 months ago
¥ {{infor.freeze_money?Number(infor.freeze_money):infor.freeze_money}}
10 months ago
</view>
</view>
<view class="recordBtn" @click="cashOutList">
提现记录
</view>
10 months ago
</view>
</view>
</view>
<view class="getData" :style="{'z-index': OrderType == ''?'1':'3'}">
10 months ago
<view class="order-tab">
10 months ago
<view class="tab" :class="{'action':OrderType==''}" @click="onOrderTab('')">
10 months ago
<text>全部</text>
<text class="line"></text>
</view>
10 months ago
<view class="tab" :class="{'action':OrderType==10}" @click="onOrderTab(10)">
10 months ago
<text>充值</text>
<text class="line"></text>
</view>
10 months ago
<view class="tab" :class="{'action':OrderType==50}" @click="onOrderTab(50)">
10 months ago
<text>提现</text>
<text class="line"></text>
</view>
10 months ago
<view class="tab" :class="{'action':OrderType==60}" @click="onOrderTab(60)">
10 months ago
<text>佣金</text>
<text class="line"></text>
</view>
10 months ago
<view class="tab" :class="{'action':OrderType==40}" @click="onOrderTab(40)">
10 months ago
<text>退款</text>
<text class="line"></text>
</view>
</view>
<u-calendar v-model="timeShow" mode="range" @change="getTime" range-color='#FF6257' range-bg-color='#FFBDBA'
active-bg-color='#FF6257'></u-calendar>
<u-dropdown class="dropdownStyle" ref="dropdown1" height="100" title-size='28' active-color="#464646"
@open="dropOpen" @close="dropClose">
<u-dropdown-item title="筛选" @update:modelValue="open()">
10 months ago
<view class="slot-content">
<view class="slotItem">
<view class="title">时间</view>
<view class="timecontainer">
<view class="selectTime" @click="timeShow = true">
{{start_at?start_at:'开始日期'}}
</view>
<text>-</text>
<view class="selectTime" @click="timeShow = true">
{{end_at?end_at:'结束日期'}}
</view>
10 months ago
</view>
10 months ago
</view>
10 months ago
<view class="slotItem">
<view class="title">分类</view>
<view class="itemBtn">
10 months ago
<view @click="setActive(item.id)" :class="active==item.id?'active btnText':'btnText'"
v-for="(item,index) in btnList" :key="index">{{item.text}}</view>
10 months ago
</view>
</view>
<view class="btnGroup">
<button class="btn resetBtn" @click="onReset()">重置</button>
10 months ago
<button class="btn confirmBtn" @click="onSure" style="margin-left:20rpx;">确定</button>
10 months ago
</view>
</view>
10 months ago
</u-dropdown-item>
</u-dropdown>
</view>
<view class="dataList" style="margin: 0 36rpx;" v-if="list.length>0">
<view class="item" v-for="item in list" :key="i">
10 months ago
<view class="l">
<view class="a">{{item.describe}}</view>
<view class="b">{{item.create_time}}</view>
</view>
<view class="r">
<view class="a">{{item.money?Number(item.money):item.money}}</view>
10 months ago
</view>
</view>
10 months ago
</view>
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty>
10 months ago
<u-popup v-model="introShow" mode="center" border-radius="12">
<view class="introContent">
<view class="introTitle">余额说明</view>
<view class="introtext">1.账户余额=可提现金额+不可提现金额</view>
<view class="introtext">2.不可提现余额=近30天充值金额</view>
<view class="introtext">3.可提现余额=账户余额-不可提现金额</view>
<view class="introBtn" @click="introShow=false">我知道了</view>
</view>
</u-popup>
</view>
10 months ago
</template>
<script>
import * as wallet from '@/api/wallet'
10 months ago
export default {
data() {
return {
background: {
9 months ago
background: 'url(https://www.royaum.com.cn/static/wallet/wallet.png) center top no-repeat',
10 months ago
backgroundSize: '100% auto',
},
isEye: true,
10 months ago
OrderType: 0,
timeShow: false,
timeParams: {
year: true,
month: true,
day: true,
},
10 months ago
btnList: [{
text: '充值',
id: 10
}, {
text: '提现',
id: 50
}, {
text: '退款',
id: 40
}, {
text: '付款',
id: 20
}],
10 months ago
active: -1,
introShow: false,
10 months ago
infor: '',
list: [],
start_at: '',
end_at: '',
isDropShow: true
10 months ago
10 months ago
}
10 months ago
},
10 months ago
onLoad(options) {
this.getUserInfor()
10 months ago
this.getBalance('')
},
onShow() {
uni.$on('updateDataEvent', () => {
this.getUserInfor()
})
10 months ago
},
10 months ago
methods: {
onReset() {
this.start_at = ''
this.end_at = ''
this.active = -1
},
dropOpen() {
this.OrderType = 999
},
dropClose() {
this.OrderType = ''
this.getBalance('')
},
onRecharge() {
10 months ago
uni.navigateTo({
url: '/pages/wallet/recharge/index'
})
},
getBalance(type) {
let that = this;
let obj = {
type: type,
start_at: that.start_at,
end_at: that.end_at,
}
wallet.balancelist(obj)
.then(res => {
that.list = []
that.list = res.data.list.data
})
.finally()
},
getUserInfor() {
let that = this;
wallet.info()
.then(res => {
10 months ago
that.infor = res.data.userInfo
})
.finally()
},
10 months ago
setActive(type) {
this.active = type;
},
onSure() {
this.getBalance(this.active)
this.timeShow = false
},
resetting() {
this.start_at = '';
this.end_at = '';
10 months ago
this.getBalance('');
this.timeShow = false
10 months ago
},
onOrderTab(type) {
this.OrderType = type;
10 months ago
this.getBalance(type)
},
getTime(e) {
this.start_at = e.startDate;
this.end_at = e.endDate;
10 months ago
},
cashOut() {
10 months ago
// 立即提现
uni.navigateTo({
7 months ago
url: '/pages/news/user/withdrawal?balance=' + this.infor.withdrawal_money
10 months ago
})
},
cashOutList() {
10 months ago
// 提现记录
uni.navigateTo({
url: '/pages/news/user/rechargeList'
10 months ago
})
},
}
}
10 months ago
</script>
<style lang="scss" scoped>
10 months ago
page {
min-height: calc(100vh);
// min-height: 100%;
background: #fff !important;
overflow-x: hidden;
overflow-y: scroll;
10 months ago
.wallet {
height: 100%;
10 months ago
position: relative;
background-color: #fff;
10 months ago
.bgImg {
width: 100%;
height: auto;
position: absolute;
top: 0;
left: 0;
10 months ago
}
10 months ago
.navBarContent {
height: 88rpx;
line-height: 88rpx;
text-align: center;
10 months ago
position: relative;
10 months ago
text {
font-size: 32rpx;
10 months ago
font-family: PingFang SC, PingFang SC;
10 months ago
font-weight: 500;
color: #FFFFFF;
10 months ago
}
10 months ago
}
.walletContainer {
margin: 0rpx 26rpx;
padding-top: 40rpx;
position: relative;
z-index: 10;
.section1 {
padding: 32rpx 36rpx 40rpx 60rpx;
10 months ago
background: url(https://www.royaum.com.cn/static/news1/walletBgItem.png);
10 months ago
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
.yue {
font-size: 26rpx;
10 months ago
font-family: PingFang SC, PingFang SC;
font-weight: 400;
10 months ago
color: #9C715E;
position: absolute;
top: 32rpx;
right: 36rpx;
10 months ago
z-index: 9;
10 months ago
}
10 months ago
.accountNum {
display: flex;
align-items: center;
text {
font-size: 26rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #652F17;
}
image {
width: 28rpx;
height: auto;
margin-left: 16rpx;
}
}
.walletHandle {
display: flex;
align-items: center;
margin-top: 16rpx;
text {
font-size: 50rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #652F17;
}
.chongzhiBtn {
width: 120rpx;
height: 60rpx;
background: linear-gradient(180deg, #EE4837 0%, #F2673D 100%);
border-radius: 29px 29px 29px 29px;
opacity: 1;
border: 1px solid #ED3F38;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
text-align: center;
line-height: 55rpx;
margin-left: 20rpx;
}
10 months ago
}
}
10 months ago
.section2 {
10 months ago
display: flex;
10 months ago
justify-content: center;
10 months ago
align-items: center;
10 months ago
background-color: #fff;
padding: 30rpx 0;
box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.12);
opacity: 1;
border-radius: 0 0 6px 6px;
10 months ago
.accountItem {
flex: 1;
10 months ago
text-align: center;
10 months ago
.itemTop {
.itemTitle {
display: flex;
justify-content: center;
align-items: center;
text {
font-size: 26rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #909090;
}
}
.num {
font-size: 32rpx;
10 months ago
font-family: PingFang SC, PingFang SC;
10 months ago
font-weight: 600;
color: #2D2D2D;
margin-top: 16rpx;
margin-bottom: 28rpx;
10 months ago
}
}
10 months ago
.handleBtn {
width: 200rpx;
height: 60rpx;
background: linear-gradient(180deg, #EE4837 0%, #F2673D 100%);
border-radius: 29px 29px 29px 29px;
opacity: 1;
border: 1px solid #ED3F38;
font-size: 26rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 55rpx;
text-align: center;
margin: 0 auto;
}
.recordBtn {
width: 200rpx;
height: 60rpx;
background: #FFFFFF;
border-radius: 29px 29px 29px 29px;
opacity: 1;
border: 1px solid #ED3F38;
font-size: 26rpx;
10 months ago
font-family: PingFang SC, PingFang SC;
10 months ago
font-weight: 400;
color: #FC3E27;
line-height: 55rpx;
text-align: center;
margin: 0 auto;
10 months ago
}
}
}
}
}
10 months ago
.getData {
position: relative;
background-color: #fff;
10 months ago
.dropdownStyle {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
.slot-content {
border: 1px solid transparent;
background-color: #fff;
padding-bottom: 40rpx;
.slotItem {
margin: 36rpx;
::v-deep .u-input--border {
border-radius: 50rpx;
}
.title {
font-size: 24rpx;
margin-bottom: 20rpx;
}
.timecontainer {
display: flex;
justify-content: center;
10 months ago
align-items: center;
}
.itemBtn {
display: flex;
justify-content: space-between;
.btnText {
flex: 1;
margin-right: 20rpx;
10 months ago
background-color: #F3F4F6;
border-radius: 50rpx;
padding: 20rpx 40rpx;
color: #343434;
text-align: center;
}
.active {
background: linear-gradient(180deg, #EE4837 0%, #F2673D 100%);
color: #fff;
}
}
10 months ago
}
10 months ago
.btnGroup {
10 months ago
display: flex;
10 months ago
padding: 0 40rpx;
margin-top: 60rpx;
.btn {
flex: 1;
line-height: 85upx;
10 months ago
text-align: center;
10 months ago
font-size: 26rpx;
// border: none !important;
width: 260rpx;
height: 85upx
10 months ago
}
10 months ago
.resetBtn {
background-color: #fff;
10 months ago
border-radius: 29px 29px 29px 29px;
border: 1px solid #DDDDDD;
10 months ago
color: #222;
}
.confirmBtn {
10 months ago
background: linear-gradient(180deg, #EE4837 0%, #F2673D 100%);
10 months ago
border-radius: 29px 29px 29px 29px;
opacity: 1;
// border: 1px solid #ED3F38;
10 months ago
color: #fff;
}
}
}
10 months ago
}
::v-deep .uni-button:after {
border: none !important;
}
10 months ago
::v-deep .u-dropdown__menu {
height: 100upx !important;
10 months ago
}
::v-deep .u-dropdown__menu__item {
justify-content: flex-end;
padding-right: 30rpx;
align-items: stretch;
}
::v-deep .u-input__right-icon {
display: none !important;
}
::v-deep .u-input {
text-align: center !important;
background-color: #F3F4F6 !important;
border-color: #F3F4F6 !important;
width: 40rpx !important;
padding: 0 70rpx !important;
10 months ago
}
10 months ago
.order-tab {
display: flex;
align-items: center;
// width: 100%;
height: 100rpx;
background-color: #FFFFFF;
// width: calc(100% - 42px);
width: calc(100% - 70px);
position: relative;
z-index: 2;
.tab {
position: relative;
10 months ago
display: flex;
10 months ago
align-items: center;
justify-content: center;
width: 20%;
height: 80%;
text {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #464646;
10 months ago
}
10 months ago
}
.action {
text {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #FE422B;
10 months ago
}
10 months ago
.line {
position: absolute;
left: 50%;
bottom: 0;
width: 60rpx;
height: 6rpx;
background: #FE422B;
border-radius: 25px 25px 25px 25px;
background: #FE422B;
// background: linear-gradient(to right,$base,#f6f6f6);
transform: translate(-50%, 0);
10 months ago
}
}
}
}
10 months ago
.dataList {
position: relative;
z-index: 2;
10 months ago
.empty {
// margin:0 auto;
// text-align: center;
10 months ago
display: flex;
10 months ago
flex-direction: column;
10 months ago
align-items: center;
justify-content: center;
10 months ago
width: 100%;
image {
width: 114rpx;
height: auto;
margin-top: 200rpx;
}
text {
font-size: 28rpx;
10 months ago
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #464646;
10 months ago
margin-top: 44rpx;
10 months ago
}
}
}
10 months ago
.introContent {
background-color: #fff;
padding: 40rpx;
.introTitle {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #000000;
margin-bottom: 54rpx;
text-align: center;
font-weight: bold;
10 months ago
}
10 months ago
.introtext {
font-size: 28rpx;
10 months ago
font-family: PingFang SC, PingFang SC;
font-weight: 400;
10 months ago
color: #727272;
margin-bottom: 34rpx;
}
.introBtn {
height: 72rpx;
line-height: 72rpx;
background: #F55349;
border-radius: 4px 4px 4px 4px;
opacity: 1;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-top: 60rpx;
10 months ago
}
}
}
10 months ago
.item {
padding: 20rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
border-top: 1px solid #F3F3F3;
&:first-child {
border-top-color: #fff;
}
.l {
.a {
padding: 20rpx 0;
font-size: 28rpx;
font-weight: 400;
color: #595959;
margin: 0 6rpx;
10 months ago
}
.b {
font-size: 26rpx;
10 months ago
font-weight: 400;
color: #A3A3A3;
margin: 0 6rpx;
10 months ago
}
}
.r {
flex: 1;
text-align: right;
.a {
font-size: 40rpx;
font-weight: 500;
color: #414141;
margin: 0 6rpx;
10 months ago
}
.b {
font-size: 28rpx;
font-weight: 400;
color: #A3A3A3;
margin: 0 6rpx;
10 months ago
}
}
}
.selectTime {
width: 288rpx;
height: 70rpx;
background: #F3F3F3;
border-radius: 44rpx;
text-align: center;
line-height: 70rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #A1A1A1;
font-style: normal;
text-transform: none;
margin: 0 15rpx;
}
::v-deep .u-btn--primary {
background-color: #FF6257 !important;
border-color: #FF6257;
}
::v-deep .u-dropdown__content__mask {
background: #fff !important;
}
::v-deep .u-empty {
padding: 100rpx 0;
}
</style>