loadmore 7.27
This commit is contained in:
@@ -68,13 +68,13 @@
|
||||
<u-popup v-model="couponStatus" mode="bottom">
|
||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 1">
|
||||
<view class="title">优惠券详情</view>
|
||||
<view class="text">店铺优惠券</view>
|
||||
<view class="text">平台优惠券</view>
|
||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon>
|
||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length"></u-empty>
|
||||
</scroll-view>
|
||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 2">
|
||||
<view class="title">优惠券详情</view>
|
||||
<view class="text">平台优惠券</view>
|
||||
<view class="text">店铺优惠券</view>
|
||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon>
|
||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length"></u-empty>
|
||||
</scroll-view>
|
||||
@@ -121,7 +121,6 @@ export default {
|
||||
choiceCoupon: {}, // 使用的平台优惠券
|
||||
goodsClass: [],
|
||||
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -152,6 +151,8 @@ export default {
|
||||
this.getGoodsClass();
|
||||
},
|
||||
onShow() {
|
||||
this.storeCoupon = {};
|
||||
this.choiceCoupon = {};
|
||||
// 判断是不是从选择地址页面返回
|
||||
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
|
||||
this.$store.commit('updateAddress', this.orderInfo.address_info);
|
||||
@@ -256,6 +257,7 @@ export default {
|
||||
this.$u.api.sendOrder(params).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.$u.route({
|
||||
type: 'redirect',
|
||||
url: '/pageC/cart/cashier',
|
||||
params: {
|
||||
pay_sn: res.data.pay_sn,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
|
||||
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
|
||||
<SpecialGoods v-for="(item, index) in pinTuanList" :key="index" :item="item" type='group'></SpecialGoods>
|
||||
<!-- <loadmore ref="loadmore" @callback="getPinTuanList" bgColor="#FFF"></loadmore> -->
|
||||
<loadmore ref="loadmore" @callback="getPinTuanList" bgColor="#FFF"></loadmore>
|
||||
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@@ -39,8 +39,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
current(index) {
|
||||
// console.log(this.tabList);
|
||||
this.getPinTuanList({id: this.tabList[index].gc_id });
|
||||
this.getPinTuanList({ id: this.tabList[index].gc_id });
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -81,20 +80,20 @@ export default {
|
||||
// scroll-view到底部加载更多
|
||||
onreachBottom() {
|
||||
this.$$refs.loadmore.reachBottom();
|
||||
// if(!this.timer) return false;
|
||||
// this.loadStatus = "loading";
|
||||
// this.page++;
|
||||
// this.getPinTuanList().then(length => {
|
||||
// if(length == 0) {
|
||||
// this.page--;
|
||||
// this.status = 'nomore';
|
||||
// } else {
|
||||
// this.status = 'loading';
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.loadStatus = "nomore";
|
||||
// this.page--;
|
||||
// })
|
||||
if(!this.timer) return false;
|
||||
this.loadStatus = "loading";
|
||||
this.page++;
|
||||
this.getPinTuanList().then(length => {
|
||||
if(length == 0) {
|
||||
this.page--;
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.status = 'loading';
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loadStatus = "nomore";
|
||||
this.page--;
|
||||
})
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
|
||||
Reference in New Issue
Block a user