@@ -1 +1 @@ | |||
import{d as r,r as o,o as p,c,w as t,a as _,b as u,e,_ as i}from"./index-r4jew9oL.js";const m=r({__name:"404",setup(l){const s=()=>{sessionStorage.pageType=="company"?e.push("/manage/home"):sessionStorage.pageType=="personal"?e.push("/jobseeker/home"):e.push("/job/home")};return(d,h)=>{const a=o("a-button"),n=o("a-result");return p(),c(n,{status:"404",title:"404","sub-title":"Sorry, the page you visited does not exist."},{extra:t(()=>[u(a,{type:"primary",onClick:s},{default:t(()=>[_("返回首页")]),_:1})]),_:1})}}}),x=i(m,[["__scopeId","data-v-9cda8440"]]);export{x as default}; | |||
import{d as r,r as o,o as p,c,w as t,a as _,b as u,e,_ as i}from"./index-nZOFU490.js";const m=r({__name:"404",setup(l){const s=()=>{sessionStorage.pageType=="company"?e.push("/manage/home"):sessionStorage.pageType=="personal"?e.push("/jobseeker/home"):e.push("/job/home")};return(d,h)=>{const a=o("a-button"),n=o("a-result");return p(),c(n,{status:"404",title:"404","sub-title":"Sorry, the page you visited does not exist."},{extra:t(()=>[u(a,{type:"primary",onClick:s},{default:t(()=>[_("返回首页")]),_:1})]),_:1})}}}),x=i(m,[["__scopeId","data-v-9cda8440"]]);export{x as default}; |
@@ -6,7 +6,7 @@ | |||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=MPBBZ-HUICZ-EGRXB-7AHZI-R4GQZ-QWBSO"></script> | |||
<title>菊城人才网</title> | |||
<script type="module" crossorigin src="/assets/index-r4jew9oL.js"></script> | |||
<script type="module" crossorigin src="/assets/index-nZOFU490.js"></script> | |||
<link rel="stylesheet" crossorigin href="/assets/index-ISOx6LsL.css"> | |||
</head> | |||
<body> |
@@ -18,18 +18,18 @@ | |||
<template v-else> | |||
<a-list item-layout="horizontal" :data-source="articleList"> | |||
<template #renderItem="{ item }"> | |||
<a-list-item @click="toDetail(item)"> | |||
<a-list-item @click="toDetail(item)"> | |||
<a-list-item-meta :title="item.title" :description="'发布时间:'+item.created_at"> | |||
</a-list-item-meta> | |||
<!-- <template #extra> | |||
<a-button @click="download(item.cover_img)">下载</a-button> | |||
</template> --> | |||
<template #extra> | |||
<image-container | |||
:imgObj="{src: imageprefix + item.cover_img,width: '153px',height:'100px'}"></image-container> | |||
</template> | |||
</a-list-item> | |||
</template> | |||
</a-list> | |||
<a-flex align="center" justify="center"> | |||
<a-pagination hideOnSinglePage v-model:current="current" | |||
:total="total" @change="pageChange" /> | |||
<a-pagination hideOnSinglePage v-model:current="current" :total="total" @change="pageChange" /> | |||
</a-flex> | |||
</template> | |||
</div> | |||
@@ -43,17 +43,17 @@ | |||
let articleList = ref<object[]>([]) | |||
let detail = ref<Object>(null) | |||
let key = ref<Number>(10) | |||
let current = ref<Number>(1) | |||
let total = ref<Number>(0) | |||
const pageChange = (page) => { | |||
current.value = page | |||
getArticleList(key.value) | |||
} | |||
const getArticleList = (val) => { | |||
GetArticleList({section_id: val, page: current.value}).then(res => { | |||
GetArticleList({ section_id: val, page: current.value }).then(res => { | |||
articleList.value = res.data.articles; | |||
total.value = res.data.total; | |||
}) |
@@ -20,12 +20,15 @@ | |||
<a-list-item @click="toDetail(item)"> | |||
<a-list-item-meta :title="item.title" :description="'发布时间:'+item.created_at"> | |||
</a-list-item-meta> | |||
<template #extra> | |||
<image-container | |||
:imgObj="{src: imageprefix + item.cover_img,width: '153px',height:'100px'}"></image-container> | |||
</template> | |||
</a-list-item> | |||
</template> | |||
</a-list> | |||
<a-flex align="center" justify="center"> | |||
<a-pagination hideOnSinglePage v-model:current="current" | |||
:total="total" @change="pageChange" /> | |||
<a-pagination hideOnSinglePage v-model:current="current" :total="total" @change="pageChange" /> | |||
</a-flex> | |||
</template> | |||
</template> | |||
@@ -34,40 +37,42 @@ | |||
import { ref, computed, onMounted, defineProps, watch, onBeforeUnmount } from 'vue'; | |||
import { GetArticleList } from '@/apis/models'; | |||
import { ArrowLeftOutlined } from '@ant-design/icons-vue'; | |||
import { useCommon } from '@/hooks/useCommon'; | |||
let { store, dayjs, richOption, ExclamationCircleOutlined, Modal, imageprefix, disabledDateFront } = useCommon(); | |||
let props = defineProps(['key_id']); | |||
let articleList = ref<object[]>([]) | |||
let detail = ref<Object>(null) | |||
let key = ref<Number>(3) | |||
let current = ref<Number>(1) | |||
let total = ref<Number>(0) | |||
onMounted(() => { | |||
if(sessionStorage.getItem('article_data')) { | |||
detail.value = JSON.parse(sessionStorage.getItem('article_data')) | |||
GetArticleList({page: current.value, hot: 2}).then(res => { | |||
if (sessionStorage.getItem('article_data')) { | |||
detail.value = JSON.parse(sessionStorage.getItem('article_data')) | |||
GetArticleList({ page: current.value, hot: 2 }).then(res => { | |||
articleList.value = res.data.articles; | |||
total.value = res.data.total; | |||
}) | |||
} | |||
}) | |||
onBeforeUnmount(() => { | |||
sessionStorage.removeItem('article_data') | |||
}) | |||
const pageChange = (page) => { | |||
current.value = page | |||
getArticleList(key.value) | |||
} | |||
const getArticleList = (val) => { | |||
if(val == 1) { | |||
GetArticleList({page: current.value, hot: 2}).then(res => { | |||
if (val == 1) { | |||
GetArticleList({ page: current.value, hot: 2 }).then(res => { | |||
articleList.value = res.data.articles; | |||
total.value = res.data.total; | |||
}) | |||
} else { | |||
GetArticleList({section_id: val, page: current.value}).then(res => { | |||
GetArticleList({ section_id: val, page: current.value }).then(res => { | |||
articleList.value = res.data.articles; | |||
total.value = res.data.total; | |||
}) | |||
@@ -77,22 +82,21 @@ | |||
const toDetail = (data) => { | |||
detail.value = data | |||
} | |||
const back = (data) => { | |||
detail.value = null | |||
} | |||
watch(() => props.key_id, (newVal) => { | |||
if(sessionStorage.getItem('article_data')) { | |||
if (sessionStorage.getItem('article_data')) { | |||
key.value = 1 | |||
} else { | |||
} else { | |||
key.value = newVal; | |||
detail.value = null | |||
} | |||
getArticleList(key.value) | |||
}, { immediate: true }) | |||
</script> | |||
<style> |