123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <template>
- <view class="pages">
- <view class="custom-nav">
- <view class="custom-nav-left" @click="$api.goback"><text class="iconfont icon-jiantou"></text></view>
- <view class="custom-nav-center"></view>
- </view>
- <view class="hold-status-bar">
-
- </view>
- <view class="top-img mall">
- <image :src="$getimg + 'usercenter-bg.png'" class="img" mode="scaleToFill"></image>
- <view class="integral">
- <view class="integral-til">我的积分</view>
- <view class="integral-num">
- <text class="num">9</text>
- <text class="num">9</text>
- <text class="num">9</text>
- <text class="num">9</text>
- </view>
- </view>
- </view>
-
- <view class="integral-content">
- <view class="integral-content-til">积分兑换</view>
- <mescroll-body class="" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
- <view class="product">
- <view v-for="(item,index) in productList" :key="index" class="product-item" @click="goCertDetails(item.fkOrderId)">
-
- </view>
- </view>
- </mescroll-body>
- </view>
- </view>
- </template>
- <script>
-
- import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
-
- import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
- export default {
- mixins: [MescrollMixin],
- components: {
- MescrollBody,
- },
- data() {
- return {
- mescroll: null,
-
- downOption: {
-
- },
-
- upOption: {
- page: {
- size: 10
- },
- noMoreSize: 5,
- empty: {
- tip: '暂无相关数据'
- }
- },
- token:'',
- $getimg:this.$getimg,
- productList:[],
- params:{
-
- }
-
- }
- },
- onShow() {
- this.token = this.$store.state.token;
- },
- onLoad() {
- },
- methods: {
-
- mescrollInit(mescroll) {
- this.mescroll = mescroll;
- },
-
- downCallback(){
-
-
- this.mescroll.resetUpScroll();
- },
-
- upCallback(page) {
- let pageNum = page.num;
- let pageSize = page.size;
- this.params = Object.assign(this.params,{pageNum:pageNum,pageSize:pageSize});
- let thetoken = this.tokenhead + ' ' + this.token;
-
-
- this.$api.http.post(this.config.apiBaseurl + '/carbon-h5/wap/order/searchCredentialList',this.params,{
- header: {
- Accept:'application/json',
- Authorization: 'Bearer '+ this.token,
- },
- }).then(data => {
-
- let curPageData = data.data.retBody;
-
-
- let curPageLen = curPageData.length;
-
-
-
- let totalSize = data.data.retHead.total;
-
-
-
-
-
- if(page.num == 1) this.certificateList = [];
- this.certificateList = this.certificateList.concat(curPageData);
-
- console.log('this.certificateList',JSON.parse(JSON.stringify(this.certificateList)));
-
-
- this.mescroll.endBySize(curPageLen, totalSize);
-
-
-
-
-
- }).catch(err => {
- this.mescroll.endErr()
- console.log(err)
-
- });
-
- }
-
-
-
-
-
- }
- }
- </script>
- <style>
- @import url("./mall.css");
- </style>
|