修复bug
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
import {
|
||||
getMyCarList
|
||||
} from '@/pageSubPack/api/apiSub.js'
|
||||
import {
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
const statusBarHeight = ref(20)
|
||||
const defaultCarImg = "http://47.104.199.163:9090/images/propertyImgs/defaultCarImg.png"
|
||||
const carList = ref([])
|
||||
@@ -61,9 +64,17 @@
|
||||
}
|
||||
|
||||
// 页面加载时请求第一页
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
// 从子页面返回时刷新列表(如新增/编辑/删除车辆后)
|
||||
onShow(() => {
|
||||
pageNum.value = 1
|
||||
noMoreData.value = false
|
||||
loadingMore.value = false
|
||||
carList.value = []
|
||||
getList()
|
||||
})
|
||||
const getList = async () => {
|
||||
// 防重复请求
|
||||
if (loadingMore.value || noMoreData.value) return
|
||||
@@ -268,4 +279,4 @@
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user