|
@@ -149,7 +149,7 @@
|
|
import { ref, computed } from 'vue'
|
|
import { ref, computed } from 'vue'
|
|
import useAppStore from '@/stores/app.js'
|
|
import useAppStore from '@/stores/app.js'
|
|
import { getFillNums } from '@/utils'
|
|
import { getFillNums } from '@/utils'
|
|
-import { hotToolsList, menuList1, menuList2, menuList3 } from './mock'
|
|
|
|
|
|
+import { hotToolsList } from './mock'
|
|
import { listTools } from '@/api/index.js'
|
|
import { listTools } from '@/api/index.js'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
|
@@ -164,7 +164,7 @@ const device = computed(() => {
|
|
})
|
|
})
|
|
// 搜索内容
|
|
// 搜索内容
|
|
const searchValueRef = ref('')
|
|
const searchValueRef = ref('')
|
|
-const totalPage = ref(10)
|
|
|
|
|
|
+const totalPage = ref(20)
|
|
// 热门工具列表
|
|
// 热门工具列表
|
|
const hotToolsRef = ref(hotToolsList)
|
|
const hotToolsRef = ref(hotToolsList)
|
|
|
|
|
|
@@ -191,14 +191,14 @@ const onLoad = (value) => {
|
|
toolsListRef.value = res.rows
|
|
toolsListRef.value = res.rows
|
|
// 加载状态结束
|
|
// 加载状态结束
|
|
loadingRef.value = false
|
|
loadingRef.value = false
|
|
- if (totalPage.value > res.total) {
|
|
|
|
|
|
+ if (totalPage.value >= res.total) {
|
|
finished.value = true
|
|
finished.value = true
|
|
} else {
|
|
} else {
|
|
- totalPage.value += 5
|
|
|
|
|
|
+ totalPage.value += 20
|
|
}
|
|
}
|
|
- setTimeout(() => {
|
|
|
|
- noneCardNum.value = getFillNums('.tool-card-content', toolsListRef.value, 220)
|
|
|
|
- }, 200)
|
|
|
|
|
|
+ getFillNums('.tool-card-content', toolsListRef.value, 220).then(nums=>{
|
|
|
|
+ noneCardNum.value = nums
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
const init = () => {
|
|
const init = () => {
|