1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <template>
- <view class="">
- <hua-page-head :pageTitle="pageTitle"></hua-page-head>
- <mescroll-body ref="mescrollRef" :up="{
- noMoreSize: 10,
- empty: {
- icon: '/static/images/order_null.png',
- tip: '暂无券明细~',
- fixed: false
- }
- }" @init="mescrollInit" @down="downCallback" @up="upCallback">
- <hua-record-list :data='integralList'></hua-record-list>
- </mescroll-body>
- </view>
- </template>
- <script>
- import {
- getAccountLog
- } from "@/api/user";
- import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin], // 使用mixin
- data() {
- return {
- pageTitle: "券明细",
- integralList: []
- }
- },
- methods: {
- // 上拉加载更多
- upCallback({
- num,
- size
- }) {
- getAccountLog({
- page_no: num,
- page_size: size,
- source: 2, //券明细
- }).then(({
- data,
- code
- }) => {
- if (code != 1) return this.mescroll.endErr()
- if (num === 1) this.integralList = []
- this.integralList = [...this.integralList, ...data.list]
- this.mescroll.endSuccess(data.list.length, !!data.more)
- }).catch(err => {
- this.mescroll.endErr()
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .noData {
- position: relative;
- height: calc(100vh - var(--status-bar-height));
- .wrap {
- text-align: center;
- // position: absolute;
- // top: 50%;
- // left: 50%;
- // transform: translate(-50%,-50%);
- margin-top: 100rpx;
- image {
- width: 330rpx;
- height: 330rpx;
- margin: 20rpx auto;
- }
- .tit {
- color: #AAAAAA;
- }
- }
- }
- </style>
|