fix:修复部分机型不兼容下拉刷新
This commit is contained in:
parent
bb29a0132a
commit
4c1d1b28d4
|
@ -25,9 +25,9 @@
|
||||||
<img class="backPresTy" @click="backHandler"
|
<img class="backPresTy" @click="backHandler"
|
||||||
src=" https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
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)"
|
<div id="refresh" @touchstart="touchStart($event)" @touchmove="touchMove($event)"
|
||||||
style="height:100%;">
|
@touchcancel="touchEnd($event)" style="height:100%;">
|
||||||
<img v-show='loadShowHeight' class='img-lodging'
|
<img v-show='!!loadShowHeight' class='img-lodging'
|
||||||
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/img-logding.png" alt="">
|
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/img-logding.png" alt="">
|
||||||
<div class="content" slot="content">
|
<div class="content" slot="content">
|
||||||
<div class="content-item" v-for="item in orderList" :key="item.order_number">
|
<div class="content-item" v-for="item in orderList" :key="item.order_number">
|
||||||
|
@ -152,9 +152,6 @@
|
||||||
touchEnd () {
|
touchEnd () {
|
||||||
if (this.loadShowHeight >= 60) {
|
if (this.loadShowHeight >= 60) {
|
||||||
this.getOrderList()
|
this.getOrderList()
|
||||||
setTimeout(() => {
|
|
||||||
this.loadShowHeight = 0;
|
|
||||||
}, 2000);
|
|
||||||
} else {
|
} else {
|
||||||
this.loadShowHeight = 0
|
this.loadShowHeight = 0
|
||||||
}
|
}
|
||||||
|
@ -245,13 +242,20 @@
|
||||||
|
|
||||||
/* 请求订单数据 */
|
/* 请求订单数据 */
|
||||||
getOrderList () {
|
getOrderList () {
|
||||||
|
this.orderList = []
|
||||||
|
this.loadShowHeight = true
|
||||||
const token = localStorage.getItem('token')
|
const token = localStorage.getItem('token')
|
||||||
req.axiosGet(`/key/order/${token}`, { page: this.page, limit: this.limit }).then(({ data, code, message }) => {
|
req.axiosGet(`/key/order/${token}`, { page: this.page, limit: this.limit }).then(({ data, code, message }) => {
|
||||||
if (code === -1) {
|
if (code === -1) {
|
||||||
this.popFunction({ title: '温馨提示', text: message, status: 2, b_text: '我知道了', show: true })
|
this.popFunction({ title: '温馨提示', text: message, status: 2, b_text: '我知道了', show: true })
|
||||||
return this.redirect = true
|
return this.redirect = true
|
||||||
}
|
}
|
||||||
if (code === 200) this.orderList = data
|
if (code === 200) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.loadShowHeight = 0;
|
||||||
|
this.orderList = data
|
||||||
|
}, 1 * 1000)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue