应用广场点击跳转

This commit is contained in:
a0049873 2022-08-09 16:54:02 +08:00
parent 33243a5e00
commit b91625bae2
1 changed files with 13 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-08-09 09:31:25 * @Date: 2022-08-09 09:31:25
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-08-09 16:48:36 * @LastEditTime: 2022-08-09 16:53:01
* @Description: 应用资源 * @Description: 应用资源
--> -->
<template> <template>
@ -29,7 +29,7 @@
:src="item.pic" :src="item.pic"
:fallback="item.pic2" :fallback="item.pic2"
/> />
<div class="bottom"> <div class="bottom" @click="goToView(item.id)">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="dept">{{ item.deptName || '--' }}</div> <div class="dept">{{ item.deptName || '--' }}</div>
</div> </div>
@ -40,6 +40,8 @@
<script setup> <script setup>
import { onMounted, reactive, onBeforeUnmount, ref, nextTick } from 'vue' import { onMounted, reactive, onBeforeUnmount, ref, nextTick } from 'vue'
import { selectAppList } from '@/api/home' import { selectAppList } from '@/api/home'
import { useRouter } from 'vue-router'
const router = useRouter()
const pageNum = ref(1) const pageNum = ref(1)
const flag = ref(true) const flag = ref(true)
const type = ref(null) const type = ref(null)
@ -47,6 +49,14 @@
const data = reactive({ list: [] }) const data = reactive({ list: [] })
const selectFlag = ref(false) const selectFlag = ref(false)
let dom = null let dom = null
const goToView = (id) => {
router.push({
path: '/details',
query: {
id: id,
},
})
}
const getList = (str) => { const getList = (str) => {
if (str) { if (str) {
dom.scrollTop = 0 dom.scrollTop = 0
@ -207,6 +217,7 @@
object-fit: contain; object-fit: contain;
} }
.bottom { .bottom {
cursor: pointer;
width: 100%; width: 100%;
height: 0.6rem; height: 0.6rem;
padding-left: 0.3rem; padding-left: 0.3rem;