update
parent
a955287aba
commit
181bc06d63
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"trailingComma": "none",
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": true,
|
||||
"arrowParens": "always",
|
||||
"printWidth": 100,
|
||||
"tabWidth": 2,
|
||||
"quoteProps": "preserve",
|
||||
"endOfLine": "auto"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 235 KiB |
|
|
@ -0,0 +1,105 @@
|
|||
<script setup lang="ts">
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||
import { useDate } from '@/views/home/hooks/useDate'
|
||||
import { getArticlePage } from '@/api/daikin/base'
|
||||
import { noticeld } from '@/stores/modules/noticeId'
|
||||
import { searchStore } from '@/stores/modules/search'
|
||||
import { message } from '@/utils/message'
|
||||
const store = noticeld()
|
||||
const store2 = useUserStore()
|
||||
const searchS = searchStore()
|
||||
const { day, week } = useDate()
|
||||
const { push } = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const listData = ref()
|
||||
const flg =ref()
|
||||
let keywords =ref()
|
||||
async function getSearchList() {
|
||||
const keyword = keywords.value
|
||||
const { rows } = await getArticlePage({ pageNum: 1, pageSize: 100, type: 2, position: 'search', keyword } as any);
|
||||
listData.value = rows
|
||||
}
|
||||
watchSyncEffect(()=>{
|
||||
keywords.value = searchS.search.content
|
||||
// console.log(keywords.value)
|
||||
getSearchList()
|
||||
})
|
||||
onMounted(() => {
|
||||
getSearchList()
|
||||
flg.value = store2.user.isReview > 0
|
||||
console.log(flg.value,store2.user.isReview)
|
||||
})
|
||||
const clickTo=(obj)=>{
|
||||
// console.log(obj)
|
||||
if(obj.isSelect===1){
|
||||
push(`${route.path}/${obj.id}`)
|
||||
}
|
||||
else{
|
||||
message.info("您没有权限查看!")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt30px">
|
||||
<div class="text-36px">搜索列表</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</div>
|
||||
</div>
|
||||
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px">
|
||||
|
||||
|
||||
<div v-if="listData&&listData.length>0" v-for="i in listData" :key="i"
|
||||
class="mt8px cursor-pointer flex items-center p15px pl20px text-18px max-w-805px">
|
||||
<span class="truncate flex-1 w0 text-#142142 hover:underline " @click=" clickTo(i)">{{ i.title }}</span>
|
||||
<span class="shrink-0 ml38px text-#808696">{{ i.createTime }}</span>
|
||||
<!-- <span v-if="flg" class="ml20px text-#808696 text-16px">来自: {{ i.publishName }}</span> -->
|
||||
</div>
|
||||
<div v-else class="w-full h-hull">
|
||||
<el-empty :image-size="200" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.q-wrapper {
|
||||
border-radius: 18px;
|
||||
border: 1px solid #E7EBF5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
&::after {
|
||||
content: ' ';
|
||||
background-image: url('@/assets/images/bg-card.svg');
|
||||
pointer-events: none;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 127px;
|
||||
background-repeat: no-repeat; /* 阻止图片平铺 */
|
||||
background-position: right top;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}</style>
|
||||
Loading…
Reference in New Issue