123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- <template>
- <view class="container index">
- <nav-header>我的账户</nav-header>
- <!-- 我的余额 -->
- <view class="mymoney">
- <view class="">
- 我的余额
- </view>
- <view class="systemColor">
- {{money}} <text>元</text>
- </view>
- <view>付款时将优先使用余额抵扣</view>
- <view class="btn_box">
- <view class="" @click="href('/pages/my/wallet/recharge')">
- <view class="">
- <image src="/static/my/6014@2x.png"/> 充值 <image src="/static/my/5730@2x.png"/>
- </view>
- </view>
- <view class="" @click="href('/pages/my/wallet/whit')">
- <view class="">
- <image src="/static/my/6013@2x.png"/> 提现 <image src="/static/my/5730@2x.png"/>
- </view>
- </view>
- </view>
- </view>
- <!-- 我的余额 结束-->
-
-
- <!-- 明细列表 -->
- <view class="content">
-
- <view class="title">账单明细</view>
- <view class="item" v-for="(item,index) in list" :key="index">
- <view class="">
- <view class="">
- {{item.name}}
- </view>
- <view class="">
- {{item.create_at}}
- </view>
- </view>
- <view class="orange" v-if="item.amount>0">
- {{item.amount}}
- </view>
- <view class="fff" v-else>
- {{item.amount}}
- </view>
- </view>
- </view>
- <!-- 明细列表 结束-->
- </view>
- </template>
- <script>
- import navHeader from "@/components/my/nav_header.vue"
- export default {
- components: {
- navHeader
- },
- data() {
- return {
- money: "",
- page: 0,
- list: []
- }
- },
- onReachBottom() {
- this.get_mx()
- console.log(1)
- },
- onShow() {
- this.api.get_user_info()
- this.money = uni.getStorageSync("user_info").balance
- this.get_mx()
- },
- methods: {
- get_mx() {
- this.api.mx(30, ++this.page).then(res => {
- res.data.data.forEach(ele => {
- this.list.push(ele)
- })
- })
- }
- }
- }
- </script>
- <style scoped>
- .index {
- box-sizing: border-box;
- padding-top: 100rpx;
- }
- .mymoney {
- width: 710rpx;
- height: 382rpx;
- background: #fff;
- margin: 24rpx auto;
- border-radius: 16rpx;
- box-sizing: border-box;
- background: linear-gradient(225deg, #FFBB80 0%, #F1984B 100%);
- border-radius: 40rpx;
- position: relative;
- }
- .mymoney>view:first-child {
- padding-top: 60rpx;
- font-size: 28rpx;
- font-weight: 400;
- text-align: center;
- color: #fff;
- }
- .mymoney>view:nth-child(2) {
- margin-top: 30rpx;
- text-align: center;
- font-size: 44rpx;
- font-weight: 400;
- color: #FFFFFF;
- }
- .mymoney>view:nth-child(2) text{
- font-size: 24rpx;
- }
-
- .mymoney>view:nth-child(3){
- color: #FFFFFF;
- font-size: 24rpx;
- text-align: center;
- margin-top: 20rpx;
- }
- .btn_box {
- position: absolute;
- left: 0;
- bottom: 0;
- font-size: 24rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- box-sizing: border-box;
- width: 100%;
- height: 100rpx;
- background: linear-gradient(48deg, #FFBB80 0%, #F1984B 100%);
- border-radius: 0px 0px 16px 16px;
- }
- .btn_box>view {
- flex: 1;
- text-align: center;
- font-size: 28rpx;
- color: #FFFFFF;
-
- }
- .btn_box image:first-child{
- width: 54rpx;
- height: 54rpx;
- vertical-align: middle;
- margin-right: 10rpx;
- }
-
- .btn_box image:last-child{
- width: 34rpx;
- height: 34rpx;
- vertical-align: middle;
- margin-left: 10rpx;
- }
- .btn_box>view:nth-child(1) {
- position: relative;
- }
- .btn_box>view:nth-child(1)::after {
- content: '';
- position: absolute;
- top: 50%;
- right: 0;
- width: 3rpx;
- height: 40rpx;
- background: #fff;
- display: inline-block;
- transform: translateY(-50%);
- }
- .content {
- width: 710rpx;
- box-sizing: border-box;
- padding: 0 32rpx;
- margin: 0 auto;
- margin-top: 20rpx;
- }
- .content .title{
- font-size: 30rpx;
- font-weight: 400;
- color: #000000;
- padding: 30rpx 0;
- border-bottom: 1rpx solid #cacaca;
- }
-
- .content .item {
- display: flex;
- justify-content: space-between;
- box-sizing: border-box;
- padding-top: 20rpx;
- padding-bottom: 20rpx;
- }
-
- .item:last-of-type {
- border: none;
- }
-
- .item>view:first-child>view:last-child {
- margin-top: 10rpx;
- color: #999;
- font-size: 24rpx;
- }
-
- .item>view:first-child>view:first-child {
- font-size: 28rpx;
-
- }
-
- .item>view:last-child {
- align-self: center;
- font-size: 32rpx;
- color: #FF8000;
- }
-
- </style>
|