首页接口更新

This commit is contained in:
wuhongjian 2022-06-15 14:13:25 +08:00
parent 6481dac6d8
commit 6be6ffae6a
1 changed files with 36 additions and 11 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="navigation2"> <div class="navigation2">
<div class="item"> <div class="item">
<div class="img jc"></div> <div class="img jc"></div>
<div class="name">基础设施</div> <div class="name">基础设施</div>
<div class="sl"> <div class="sl">
@ -43,12 +43,13 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { selectTotal, zywMessage } from '@/api/home' import { selectTotal } from '@/api/home'
import { getVideoList, getRecord } from '@/api/file.js'
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
const yyNum = ref('') const yyNum = ref('')
const zjNum = ref('') const zjNum = ref('')
const jcNum = ref('23万') let jcNum = ref('35282')
const sjNum = ref('10372') let sjNum = ref('11')
const zsNum = ref('14') const zsNum = ref('14')
selectTotal().then((res) => { selectTotal().then((res) => {
console.log('selectTotal===============>', res.data.data) console.log('selectTotal===============>', res.data.data)
@ -64,7 +65,7 @@
jcNum.value = val.count jcNum.value = val.count
break break
case '数据资源': case '数据资源':
sjNum.value = val.count // sjNum.value = val.count
break break
case '知识库': case '知识库':
zsNum.value = val.count zsNum.value = val.count
@ -72,15 +73,39 @@
} }
}) })
}) })
const findZywMessage = () => { const getVideoLists = () => {
zywMessage().then((res) => { const params = {
// console.log('findMessage============>', res) name: '',
const { data } = res.data pageNo: 1,
sjNum.value = data.sxmlcount pageSize: 5,
}
getVideoList(params).then((res) => {
//
if (res.data.data) {
sjNum.value = res.data.data.total || 0
}
})
}
const getRecords = () => {
const obj = {
serviceName: '',
orderField: 'updateTime',
orderType: 'desc',
pageNum: 1,
pageSize: 5,
serviceType: 'data',
// rq=1655196484308.0234
}
getRecord(obj).then((res) => {
if (res.data.data) {
jcNum.value = res.data.data.total || 0
}
}) })
} }
onMounted(() => { onMounted(() => {
findZywMessage() // findZywMessage()
getVideoLists()
getRecords()
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>