8 Commits

7 changed files with 59 additions and 25 deletions

View File

@@ -2,8 +2,8 @@
<view class="c-coupon"> <view class="c-coupon">
<view class="coupon-usable"> <view class="coupon-usable">
<view class="info-type" :style="{ backgroundImage: 'url(' + '/static/image/mine/30.png' + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }"> <view class="info-type" :style="{ backgroundImage: 'url(' + '/static/image/mine/30.png' + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
<div class="wrap_left_top"></div> <div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }} <div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
</view> </view>
<view class="coupon-info"> <view class="coupon-info">
<view class="info-usable"> <view class="info-usable">

View File

@@ -2,8 +2,8 @@
<view class="c-coupon" v-if="goodsClass.length"> <view class="c-coupon" v-if="goodsClass.length">
<view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'"> <view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'">
<view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }"> <view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
<div class="wrap_left_top"></div> <div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }} <div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
</view> </view>
<view class="coupon-info"> <view class="coupon-info">
<view class="info-usable"> <view class="info-usable">

View File

@@ -50,7 +50,7 @@
data() { data() {
return { return {
remaining: 7, remaining: 7,
type: true, type: false,
banner: false, banner: false,
protocol: false, protocol: false,
heightOut: '', heightOut: '',
@@ -121,13 +121,13 @@
if (this.remaining <= 0) { if (this.remaining <= 0) {
clearInterval(this.timer); clearInterval(this.timer);
console.log("完了") console.log("完了")
this.type = !this.type; // this.type = !this.type;
this.banner = !this.banner; this.banner = !this.banner;
} }
}, 1000); }, 1000);
}, },
leap_over() { leap_over() {
this.type = !this.type // this.type = !this.type
this.banner = !this.banner; this.banner = !this.banner;
clearInterval(this.timer) clearInterval(this.timer)
// 获取屏幕高度 // 获取屏幕高度

View File

@@ -71,12 +71,11 @@
</view> </view>
<text class="child_content">{{ child.content }}</text> <text class="child_content">{{ child.content }}</text>
</view> </view>
<view> <!-- <view> -->
<text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count"> <text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count">
{{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }} {{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }}
</text> </text>
<text></text> <!-- </view> -->
</view>
</view> </view>
</view> </view>
<view class="send-box" @click="openKeyInput"> <view class="send-box" @click="openKeyInput">
@@ -678,14 +677,17 @@
} }
.child_content { .child_content {
padding: 4rpx 0; width: 550rpx;
padding-top: 6rpx;
margin-left: 40rpx; margin-left: 40rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.more-comment { .more-comment {
margin: 10rpx 0; width: 150rpx;
height: 40rpx;
font-size: 22rpx; font-size: 22rpx;
line-height: 4;
color: #999; color: #999;
} }

View File

@@ -15,6 +15,7 @@
</view> </view>
</view> </view>
</block> </block>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
</view> </view>
</template> </template>
@@ -23,9 +24,8 @@
data() { data() {
return { return {
height:'600', height:'600',
actives: [ actives: [],
loadStatus: 'loadmore'
]
}; };
}, },
onLoad(){ onLoad(){
@@ -45,7 +45,9 @@
messageactivityList(){ messageactivityList(){
this.$u.api.messageactivityList({}).then((res)=>{ this.$u.api.messageactivityList({}).then((res)=>{
if (res.errCode == 0) { if (res.errCode == 0) {
this.actives = res.data; this.actives = res.data;
// 目前没有分页,只无数据提示用,他们建议这样做
if(!this.actives.length) this.loadStatus = 'nomore';
} }
}) })
} }

View File

@@ -18,6 +18,7 @@
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" @loadmore="loadmore" />
</view> </view>
</template> </template>
@@ -26,20 +27,45 @@
data() { data() {
return { return {
actives: [], actives: [],
page: 1 page: 1,
timer: true,
loadStatus: 'loadmore'
}; };
}, },
onLoad() { onLoad() {
this.getCartList(); this.getCartList();
}, },
onReachBottom() {
this.loadmore();
},
methods: { methods: {
getCartList() { loadmore() {
this.$u.post("message/orderDeliveryList",{page: this.page}).then(res => { if(!this.timer) return false;
console.log(res.data.data) this.loadStatus = "loading";
if (res.errCode == 0) { this.page++;
this.actives = res.data.data; this.getCartList({ load: 'loadmore' }).then(length => {
} if(length == 0) {
}) this.page--;
this.loadStatus = 'nomore';
} else {
this.loadStatus = 'loading';
}
}).catch(() => {
this.loadStatus = "nomore";
this.page--;
})
},
async getCartList({ load = 'reload' } = {}) {
const res = await this.$u.post("message/orderDeliveryList",{ page: this.page })
this.timer = true;
if (res.errCode == 0) {
if(load == 'reload') {
this.actives = res.data.data;
if(res.data.data.length < 12) this.loadStatus = "nomore";
}
else if(load == 'loadmore') this.actives.push(...res.data.data);
}
return res.data.data.length;
}, },
viewLogistics(item) { viewLogistics(item) {
let url; let url;

View File

@@ -2,6 +2,7 @@
<view id="viewes" :style="{height : height + 'px'}"> <view id="viewes" :style="{height : height + 'px'}">
<!-- 公告咨询 --> <!-- 公告咨询 -->
<notice :list="list"></notice> <notice :list="list"></notice>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
</view> </view>
</template> </template>
@@ -11,6 +12,7 @@
data() { data() {
return { return {
list: [], list: [],
loadStatus: 'loadmore'
}; };
}, },
onLoad() { onLoad() {
@@ -29,6 +31,8 @@
this.$u.api.informationList({}).then((res) => { this.$u.api.informationList({}).then((res) => {
if (res.errCode == 0) { if (res.errCode == 0) {
this.list = res.data; this.list = res.data;
// 目前没有分页,只无数据提示用
if(!this.list.length) this.loadStatus = 'nomore';
} }
}) })
} }