|
@@ -1,24 +1,29 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
- <view class="integral-log-main">
|
|
|
- <view class="pd16_15 bd-bottom flex alcenter">
|
|
|
- <text class="iconfont iconicon_integral_des ft20 cl-main"></text>
|
|
|
- <text class="ml10 ft16 ftw600 cl-main">消费明细</text>
|
|
|
- </view>
|
|
|
- <view class="pd16_15" v-if="listData.length>0">
|
|
|
- <block v-for="(item,index) in listData" :key="index">
|
|
|
- <view class="pb16 mb16 bd-bottom flex alcenter space">
|
|
|
- <view>
|
|
|
- <view class="ft14 cl-main">{{item.memo}}</view>
|
|
|
- <view class="mt8 ft12 cl-notice">{{item.createtime}}</view>
|
|
|
+ <view class="body pd16_15">
|
|
|
+ <view class="jilu-box" v-show="list.length > 0">
|
|
|
+ <view class="pb10 jilu-item" v-for="(item,key) in list" :key="key">
|
|
|
+ <view class="jilu-item-box">
|
|
|
+ <view class="jilu-items">
|
|
|
+ <view class="lines">
|
|
|
+ <text class="ft14" style="font-weight: bold;">{{item.video_name}}</text>
|
|
|
+ <text class="ft12 jilu-txt">{{item.series_name}}</text>
|
|
|
+ <text class="ft12 jilu-txt">{{item.created_at}}</text>
|
|
|
</view>
|
|
|
- <view class="ft18 ftw600 cl-main">{{item.jzt}}{{item.score}}</view>
|
|
|
</view>
|
|
|
- </block>
|
|
|
- <uni-load-more :status="status" :content-text="contentText" />
|
|
|
+ <view class="lines">
|
|
|
+ <text class="ft14 jilu-txt"
|
|
|
+ style="text-align: right;font-weight: bold;color: #FF9800;">-{{item.charge_coin_cost}}K币</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
-
|
|
|
- <com-empty v-else title="暂无积分记录"></com-empty>
|
|
|
+ </view>
|
|
|
+ <view class="empty-box" v-if="list.length < 1 && show">
|
|
|
+ <image src="/static/img/orders/emty.png" mode=""></image>
|
|
|
+ <p class="ft14 line-1-txt">暂无消费记录</p>
|
|
|
+ <!-- <p class="ft14 line-2-txt mt10">小充一笔,看更多好剧吧</p>
|
|
|
+ <navigator url="/pages/client/pay/pay">
|
|
|
+ <view class="ft16 btn-box mt10"><text class="ft12 btn-cz">去充值</text> </view>
|
|
|
+ </navigator> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -26,134 +31,60 @@
|
|
|
<script>
|
|
|
import {
|
|
|
getUserConsumeRecord
|
|
|
- } from '@/common/apis/my.js'
|
|
|
+ } from "@/common/apis/my.js"
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- userinfo: [],
|
|
|
- listData: [],
|
|
|
- last_id: 0,
|
|
|
- reload: true,
|
|
|
- status: 'more',
|
|
|
- userinfo: [],
|
|
|
- contentText: {
|
|
|
- contentdown: '上拉加载更多',
|
|
|
- contentrefresh: '加载中',
|
|
|
- contentnomore: '没有数据了'
|
|
|
- }
|
|
|
+ page: 1,
|
|
|
+ hasMore: true,
|
|
|
+ list: [],
|
|
|
+ show: false
|
|
|
}
|
|
|
},
|
|
|
- onReachBottom() {
|
|
|
- this.status = 'more';
|
|
|
+ onLoad() {
|
|
|
+
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.page = 1;
|
|
|
+ this.hasMore = true;
|
|
|
this.getList();
|
|
|
+ uni.hideLoading();
|
|
|
},
|
|
|
- onLoad() {
|
|
|
- this.ongrzlTap()
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.page = 1;
|
|
|
+ this.list = [];
|
|
|
+ this.getList();
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (!this.hasMore) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- async ongrzlTap() {
|
|
|
- let data = {};
|
|
|
- data.token = uni.getStorageSync("userinfo").token;
|
|
|
- data.uid = uni.getStorageSync("userinfo").id;
|
|
|
- uni.request({
|
|
|
- url: this.configs.webUrl + '/api/user/index',
|
|
|
- data: data,
|
|
|
- success: res => {
|
|
|
- if (res.data.code == 1) {
|
|
|
- let ionfo = res.data.data
|
|
|
- this.userinfo = ionfo
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.data.msg,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- fail: (data, code) => {
|
|
|
- //console.log('fail' + JSON.stringify(data));
|
|
|
+ async getList() {
|
|
|
+
|
|
|
+ if (this.page <= 1) {
|
|
|
+ this.show = false;
|
|
|
+ }
|
|
|
+ let res = await getUserConsumeRecord(this.page);
|
|
|
+ if (res) {
|
|
|
+ if (this.page >= res.last_page) {
|
|
|
+ this.hasMore = false;
|
|
|
+ } else {
|
|
|
+ this.page++;
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- getList() {
|
|
|
- getUserConsumeRecord().then(res => {
|
|
|
- console.log(res,'getUserConsumeRecordgetUserConsumeRecordgetUserConsumeRecord')
|
|
|
- })
|
|
|
- let data = {
|
|
|
- //column: 'id,post_id,title,author_name,cover,published_at' //需要的字段名
|
|
|
- };
|
|
|
- var limit = 10;
|
|
|
- if (this.last_id > 0) {
|
|
|
- //说明已有数据,目前处于上拉加载
|
|
|
- this.status = 'loading';
|
|
|
- data.offset = this.last_id * limit;
|
|
|
- data._ = new Date().getTime() + '';
|
|
|
+ res.data.forEach((item, index) => {
|
|
|
+ this.list.push(item);
|
|
|
+ })
|
|
|
}
|
|
|
- data.limit = limit
|
|
|
- // data.token = uni.getStorageSync("userinfo").token;
|
|
|
- // uni.request({
|
|
|
- // url: this.configs.webUrl + '/api/user/userscoreinfo',
|
|
|
- // data: data,
|
|
|
- // success: data => {
|
|
|
- // console.log(data.data)
|
|
|
- // if (data.data.total > 0) {
|
|
|
- // let list = data.data.rows;
|
|
|
- // this.listData = this.reload ? list : this.listData.concat(list);
|
|
|
- // this.reload = false;
|
|
|
- // this.last_id = this.last_id + 1;
|
|
|
- // if (data.data.total < this.last_id * limit) {
|
|
|
- // this.status = '';
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.contentText.contentdown = '没有数据'
|
|
|
- // }
|
|
|
- // },
|
|
|
- // fail: (data, code) => {
|
|
|
- // //console.log('fail' + JSON.stringify(data));
|
|
|
- // }
|
|
|
- // });
|
|
|
+ this.show = true;
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
- .integral-log-header {
|
|
|
- position: relative;
|
|
|
- height: 252rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .integral-log-header .bg {
|
|
|
- width: 100%;
|
|
|
- height: 252rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .integral-log-header .main {
|
|
|
- height: 252rpx;
|
|
|
- width: 100%;
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .btn-integral {
|
|
|
- width: 192rpx;
|
|
|
- height: 80rpx;
|
|
|
- background: #FFFFFF;
|
|
|
- box-shadow: 0rpx 8rpx 32rpx 0rpx rgba(0, 0, 0, 0.04);
|
|
|
- border-radius: 40rpx;
|
|
|
- text-align: center;
|
|
|
- line-height: 80rpx;
|
|
|
- color: #6687EF;
|
|
|
- font-size: 28rpx;
|
|
|
- font-weight: 500;
|
|
|
- }
|
|
|
-
|
|
|
- .integral-log-main {
|
|
|
- background: #FFFFFF;
|
|
|
- min-height: 1400rpx;
|
|
|
- position: relative;
|
|
|
- margin-top: -32rpx;
|
|
|
- border-radius: 32rpx 32rpx 0rpx 0rpx;
|
|
|
- }
|
|
|
+<style scoped lang="scss">
|
|
|
+ @import url("style/orders.css");
|
|
|
</style>
|