首页接口更新

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

@ -43,12 +43,13 @@
</div>
</template>
<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'
const yyNum = ref('')
const zjNum = ref('')
const jcNum = ref('23万')
const sjNum = ref('10372')
let jcNum = ref('35282')
let sjNum = ref('11')
const zsNum = ref('14')
selectTotal().then((res) => {
console.log('selectTotal===============>', res.data.data)
@ -64,7 +65,7 @@
jcNum.value = val.count
break
case '数据资源':
sjNum.value = val.count
// sjNum.value = val.count
break
case '知识库':
zsNum.value = val.count
@ -72,15 +73,39 @@
}
})
})
const findZywMessage = () => {
zywMessage().then((res) => {
// console.log('findMessage============>', res)
const { data } = res.data
sjNum.value = data.sxmlcount
const getVideoLists = () => {
const params = {
name: '',
pageNo: 1,
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(() => {
findZywMessage()
// findZywMessage()
getVideoLists()
getRecords()
})
</script>
<style lang="less" scoped>