123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <template>
- <view>
- <navbar :config="config" backColor="#999999">
- <template v-slot:right>
- <view class="" @click.stop="lookExplain()" style="font-size: 28rpx;margin-right: 30rpx;color: #fff;">
- <text class="iconfont3"></text>
- <text style="margin-left: 6rpx;">收益说明</text>
- </view>
- </template>
- </navbar>
- <view class="consume-top">
- <view class="consume-content">
- <text class="consume-nuns">{{ $addDecimals(commission_able , 2) }}</text>
- <text class="consume-text">贡献值</text>
- <text class="consume-text">累计贡献值:{{ $addDecimals(commission_settled , 2) }}</text>
- </view>
- <view class="look-integral" @click.stop="goIntegrateBalance">
- 查看积分
- </view>
- </view>
- <consume-list title="贡献值明细" :status="status" :list="pointsList" :keys="{title: 'remark',
- time: 'format_create_time_millis',
- val: 'entry_value',
- type: 'bill_type'}"></consume-list>
- </view>
- </template>
- <script>
- import {
- userbillInfo
- } from "@/api/personal-center.js"
- import {
- getAccountInfo
- } from "@/api/login.js"
- export default {
- data() {
- return {
- commission_able: 0,
- commission_settled: 0,
- config: {
- back: true, //false是tolbar页面 是则不写
- title: '贡献值明细',
- color: '#1A1A1A',
- // autoBack:true,
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, "#fff"],
- statusBarFontColor: '#1A1A1A',
- rightSlot: true,
- },
- params: {
- page: 1,
- limit: 10
- },
- pointsList: [],
- status: 'loading', //more|loading|noMore
- };
- },
- onShow() {
- this.getUserInfo()
- this.params.page = 1;
- this.pointsList = [];
- this.getList();
- },
- onReachBottom() {
- if (this.status !== 'loading' && this.status !== 'noMore') {
- this.params.page++
- this.getList()
- }
- },
- onPullDownRefresh() {
- this.params.page = 1
- this.pointsList = []
- this.getList()
- },
- methods: {
- lookExplain(){
- uni.navigateTo({
- url: '/pages/protocol/index?code=income_statement'
- })
- },
- getList() {
- this.status = 'loading';
- this.$http.get(userbillInfo, this.params).then((res) => {
- if (res && res.code == 200) {
- uni.stopPullDownRefresh()
- this.pointsList = this.pointsList.concat(res.page.list);
- if (res.page.totalPage <= res.page.currPage) {
- this.status = 'noMore'
- } else {
- this.status = 'more'
- }
- }
- });
- },
- //获取个人信息
- getUserInfo() {
- this.$http.get(getAccountInfo).then(res => {
- if (res && res.code == 200) {
- this.commission_able = res.data.commission_able;
- this.commission_settled = res.data.commission_settled;
- uni.setStorageSync("personal", res.data)
- }
- })
- },
- // 积分余额
- goIntegrateBalance() {
- uni.navigateTo({
- url: "/pages/user/integrateBalance"
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .consume-top {
- width: 100%;
- min-height: 365rpx;
- background-color: #FA6138;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 50rpx 60rpx 173rpx;
- .consume-content {
- width: 1px;
- flex: 1;
- display: flex;
- flex-direction: column;
- .consume-nuns {
- font-size: 50rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #ffffff;
- padding-bottom: 15rpx;
- }
- .consume-text {
- font-size: 28rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #ffffff;
- }
- }
- .look-integral {
- flex-shrink: 0;
- width: 200rpx;
- height: 60rpx;
- background: #ffffff;
- border-radius: 30rpx;
- text-align: center;
- line-height: 60rpx;
- font-size: 26rpx;
- font-family: PingFang SC, PingFang SC-Regular;
- font-weight: 400;
- color: #FA6138;
- }
- }
- </style>
|