303-知识库浏览量

This commit is contained in:
gaoyuanwei 2022-06-30 10:30:53 +08:00
parent a4c46b8edf
commit 802a940dc0
3 changed files with 16 additions and 4 deletions

View File

@ -57,7 +57,7 @@
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
const select = ref('algorithm-display') const select = ref('business-presentation')
const list = ref([]) const list = ref([])
const selectNav = (key) => { const selectNav = (key) => {
select.value = key select.value = key

View File

@ -61,7 +61,7 @@
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
const select = ref('algorithm-display') const select = ref('service-presentation')
const list = ref([]) const list = ref([])
const selectNav = (key) => { const selectNav = (key) => {
select.value = key select.value = key
@ -197,8 +197,6 @@
} }
}) })
list.value.push('关联能力') list.value.push('关联能力')
list.value.push('图层信息')
list.value.push('使用方式')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {

View File

@ -51,6 +51,7 @@
<script setup> <script setup>
import { ref, reactive, defineProps } from 'vue' import { ref, reactive, defineProps } from 'vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { updateVisits } from '@/api/home'
const props = defineProps({ const props = defineProps({
resourceList: { type: Array, default: null }, resourceList: { type: Array, default: null },
resourceTotal: { type: String, default: '' }, resourceTotal: { type: String, default: '' },
@ -63,6 +64,19 @@
}) })
const current = ref(1) const current = ref(1)
const openHref = (item) => { const openHref = (item) => {
console.log(item.id, 'wowowo')
console.log(item.visits, 'wowowo')
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.id) === -1) {
arrList.value.push(item.id)
updateVisits({
id: item.id,
visits: item.visits || '0',
}).then(() => {
window.sessionStorage.setItem('visits', JSON.stringify(arrList.value))
})
}
window.open(item.link) window.open(item.link)
// window.open( // window.open(
// window.SITE_CONFIG.previewUrl + // window.SITE_CONFIG.previewUrl +