123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <template>
- <view>
- <view class='commission-details'>
- <view class='promoterHeader'>
- <view class='headerCon acea-row row-between-wrapper'>
- <view>
- <view class='name'>可提现余额</view>
- <view class='money'>¥<text class='num'>{{money}}</text></view>
- </view>
- <view class='iconfont icon-jinbi1'></view>
- </view>
- </view>
- <view class='sign-record'>
- <view class='list' v-for="(item,index) in recordList" :key="index">
- <view class='item'>
- <view class='listn'>
- <view class='itemn acea-row row-between-wrapper'>
- <view>
- <view class='name line1'>{{item.title}}</view>
- <view>{{item.time}}</view>
- </view>
- <view class='num font-color'>+{{item.v}}</view>
- </view>
- </view>
- </view>
- </view>
- <view class='loadingicon acea-row row-center-wrapper' v-if="recordList.length>0">
- <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
- </view>
- <view v-if="recordList.length == 0">
- <emptyPage title='暂无佣金记录~'></emptyPage>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapGetters
- } from "vuex";
- import {
- toLogin
- } from '@/libs/login.js';
- import {
- account,
- recordList
- } from '@/api/api.js';
- import emptyPage from '@/components/emptyPage.vue'
- export default {
- components: {
- emptyPage
- },
- data() {
- return {
- money: 0,
- loadTitle: '加载更多',
- loading: false,
- loadend: false,
- page: 1,
- limit: 10,
- type: 'income',
- recordList: []
- };
- },
- computed: mapGetters(['isLogin']),
- onLoad() {
- if (this.isLogin) {
- this.getAccount();
- this.getRecordList();
- } else {
- toLogin();
- }
- },
- methods: {
- getAccount: function() {
- account().then(res => {
- this.money = res.data.tx_money;
- });
- },
- getRecordList: function() {
- let that = this;
- if (that.loadend) return;
- if (that.loading) return;
- that.loading = true;
- that.loadTitle = "";
- let data = {
- page: that.page,
- tabType: that.type
- }
- recordList(data).then(function(res) {
- let list = res.data.list,
- loadend = list.length < that.limit;
- that.recordList = that.$util.SplitArray(list, that.recordList);
- that.loadend = loadend;
- that.loading = false;
- that.loadTitle = loadend ? "哼~我也是有底线的~" : "加载更多";
- that.page = that.page + 1;
- }, function(res) {
- that.loading = false;
- that.loadTitle = '加载更多';
- });
- },
- },
- onReachBottom: function() {
- this.getRecordList();
- }
- }
- </script>
- <style scoped lang="scss">
- .commission-details .promoterHeader{
- background: #ff5c00;
- }
-
- .commission-details .promoterHeader .headerCon .money {
- font-size: 36rpx;
- }
- .commission-details .promoterHeader .headerCon .money .num {
- font-family: 'Guildford Pro';
- }
- .bg-color{
- background-color: #e93323!important;
- }
- .font-color,.font-color-red {
- color: #e93323!important;
- }
- </style>
|