fix:修复部分机型不兼容下拉刷新

This commit is contained in:
wangsongsole 2022-10-13 09:51:50 +08:00
parent bb29a0132a
commit 4c1d1b28d4
1 changed files with 11 additions and 7 deletions

View File

@ -25,9 +25,9 @@
<img class="backPresTy" @click="backHandler"
src=" https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
<div id="refresh" @touchstart="touchStart($event)" @touchmove="touchMove($event)" @touchend="touchEnd($event)"
style="height:100%;">
<img v-show='loadShowHeight' class='img-lodging'
<div id="refresh" @touchstart="touchStart($event)" @touchmove="touchMove($event)"
@touchcancel="touchEnd($event)" style="height:100%;">
<img v-show='!!loadShowHeight' class='img-lodging'
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/img-logding.png" alt="">
<div class="content" slot="content">
<div class="content-item" v-for="item in orderList" :key="item.order_number">
@ -152,9 +152,6 @@
touchEnd () {
if (this.loadShowHeight >= 60) {
this.getOrderList()
setTimeout(() => {
this.loadShowHeight = 0;
}, 2000);
} else {
this.loadShowHeight = 0
}
@ -245,13 +242,20 @@
/* 请求订单数据 */
getOrderList () {
this.orderList = []
this.loadShowHeight = true
const token = localStorage.getItem('token')
req.axiosGet(`/key/order/${token}`, { page: this.page, limit: this.limit }).then(({ data, code, message }) => {
if (code === -1) {
this.popFunction({ title: '温馨提示', text: message, status: 2, b_text: '我知道了', show: true })
return this.redirect = true
}
if (code === 200) this.orderList = data
if (code === 200) {
setTimeout(() => {
this.loadShowHeight = 0;
this.orderList = data
}, 1 * 1000)
}
})
},