mint-loadmore添加onBottomLoaded()页面卡死
如题;
html:
<div style="overflow: scroll" :class="$style.list">
<mt-loadmore ref="loadMore" :bottom-method="loadBottom" :bottom-all-loaded="!!noPages">
<div @click="toDetail(item.orderId)" :class="$style['item-list']" v-for="(item,index) in list" :key="index">
<p :class="$style.title">{{item.title}}</p>
<div :class="$style.detail" v-for="goods in item.orderGoodsList">
<img :src="goods.goodsImg" alt="">
<ul :class="$style['string']">
<li>{{goods.goodsName}}</li>
<li>
规格分类: {{goods.skuSpec.split("-").join(" ")}}
</li>
</ul>
<ul :class="$style['number']">
<li>{{goods.goodsPrice | currency('¥')}}</li>
<li>{{goods.originalPrice | currency('¥')}}</li>
<li>x{{goods.goodsNum}}</li>
</ul>
</div>
<div :class="$style.payFor">
<p class="payfor-text" :class="$style['payfor-text']">共 {{item.count}} 件商品 合计:<sub>{{item.totalMoney | currency('¥')}} (含运费 <span>{{item.postage_price | currency('¥')}}</span>)</sub></p>
<div>
<span :class="$style['handle']" @click.stop="deleteOrder(item.orderId)" v-if="item.dealStatus === 5">删除订单</span>
<span :class="$style['handle']" @click.stop="payOrder(item.orderId, item.pay_money)" v-if="item.dealStatus===1">付款</span>
<span :class="$style['handle']" @click.stop="cancelOrder(item.orderId)" v-if="item.dealStatus === 1||item.dealStatus === 2">取消订单</span>
<span :class="$style['handle']" @click.stop="refund(item.orderId)" v-if="item.dealStatus === 2||item.dealStatus === 3">退款</span>
<span :class="$style['handle']" @click.stop="confirmGet(item.orderId)" v-if="item.dealStatus === 3">确认收货</span>
<span :class="$style['handle']" @click.stop="remind(item.orderId)" v-if="item.dealStatus === 2">提醒发货</span>
<span :class="[$style.handle,$style.review]" @click.stop="review(item.orderGoodsList,item.orderId)" v-if="item.dealStatus===4">评价</span>
</div>
</div>
</div>
</mt-loadmore>
</div>
js:
loadBottom(){
this.$refs.loadMore.onBottomLoaded();
this.currentPage += 1;
let params = {
pageSize: this.pageSize,
currentPage: this.currentPage,
};
if(this.realStatus){
params['realStatus'] = this.realStatus
}
this.$http.get('/order/findOrderPage', {params}).then(res => {
console.log(res)
this.$refs.loading.show()
if( res.data.code === "2000") {
this.list = this.list.concat(res.data.rows);
if(!res.data.pager.totalPages){
this.noPages = true
}else{
this.noPages = res.data.pager.currentPage === res.data.pager.totalPages;
}
this.$refs.loading.hide()
}
}).catch( err=> {
console.log(err)
});
},
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论