123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <template>
- <view>
- <mescroll-uni :up="upOption" :down="downOption" ref="mescrollRef" @up="upCallback" @down="downCallback"
- height="1060">
- <view v-for='(item,index) in list' class="item flex">
- </view>
- </mescroll-uni>
- </view>
- </template>
- <script>
- var that;
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default {
- mixins: [MescrollMixin],
- data() {
- return {
- downOption: {
- auto: false,
- textColor: '#bbb'
- },
- upOption: {
- page: {
- size: 10 // 每页数据的数量,默认10
- },
- auto: false,
- noMoreSize: 1,
- textNoMore: '没有更多了~',
- textColor: '#bbb'
- },
- userInfo: {
- head: '',
- nickname: '',
- phone: '',
- },
- list: [{
- name: '1'
- },
- {
- name: '2'
- },
- {
- name: '3'
- }, {
- name: '4'
- }, {
- name: '5'
- }, {
- name: '6'
- }, {
- name: '7'
- }, {
- name: '8'
- }, {
- name: '9'
- }, {
- name: '10'
- }, {
- name: '11'
- }
- ]
- };
- },
- onLoad() {
- that = this
- },
- onShow() {
- this.$nextTick(() => {
- this.mescroll.resetUpScroll()
- })
- },
- methods: {
- downCallback() {
- this.mescroll.resetUpScroll()
- },
- upCallback(page) {
- that.mescroll.endBySize(0, 0)
- // this.$request.baseRequest('admin.unimall.cardHolderInfo', 'list', {
- // page: page.num,
- // limit: page.size,
- // }, failres => {
- // uni.hideLoading()
- // console.log('res+++++', failres.errmsg)
- // uni.showToast({
- // icon: "none",
- // title: failres.errmsg,
- // duration: 3000
- // });
- // }).then(res => {
- // console.log(res)
- // if (page.num == 1) this.list = [];
- // let curPageLen = res.data.items.length;
- // let totalPage = res.data.total;
- // this.list = res.data.items
- // this.$nextTick(() => {
- // that.mescroll.endBySize(curPageLen, totalPage)
- // });
- // uni.hideLoading()
- // })
- },
- }
- }
- </script>
- <style lang="scss">
- </style>
|