专题修改

parent 12e8e220
<template> <template>
<Header background="white" :show="false">
<div class="header">
<!-- <van-icon name="arrow-left" class="icon" @click="back" /> -->
<div class="h-content">
<img src="../../static/image/subject-list-logo.png" />
<div class="title">当前专题:{{ queryParams.tagName }}</div>
</div>
<div class="overlay"></div>
</div>
</Header>
<div class="container"> <div class="container">
<van-sticky> <van-sticky>
<!-- <van-nav-bar title="专题列表" :left-arrow="true" fixed placeholder safe-area-inset-top <!-- <van-nav-bar title="专题列表" :left-arrow="true" fixed placeholder safe-area-inset-top
@click-left="router.go(-1)" /> --> @click-left="router.go(-1)" /> -->
<div class="header"> <!-- <div class="header">
<div class="h-content"> <div class="h-content">
<img src="../../static/image/subject-list-logo.png" /> <img src="../../static/image/subject-list-logo.png" />
<div class="title">当前专题:{{ queryParams.tagName }}</div> <div class="title">当前专题:{{ queryParams.tagName }}</div>
</div> </div>
<div class="overlay"></div> <div class="overlay"></div>
</div> </div> -->
</van-sticky> </van-sticky>
<div class="content"> <div class="content">
<van-pull-refresh v-model="refreshing" @refresh="handleRefresh"> <van-pull-refresh v-model="refreshing" @refresh="handleRefresh">
...@@ -25,7 +35,7 @@ ...@@ -25,7 +35,7 @@
</span> </span>
<div class="tag"> <div class="tag">
<span v-for="(tagName, index) in item.tagName.split(',')" :key="index">{{ <span v-for="(tagName, index) in item.tagName.split(',')" :key="index">{{
tagName }}</span> tagName }}</span>
</div> </div>
<div class="info"> <div class="info">
<div class="user"> <div class="user">
...@@ -50,9 +60,11 @@ ...@@ -50,9 +60,11 @@
<script setup name="subject-list"> <script setup name="subject-list">
import { selectSubjectList } from '@/api/subject' import { selectSubjectList } from '@/api/subject'
import { useInitScroll } from '@/hooks/useScroll' import { useInitScroll } from '@/hooks/useScroll'
import { selectOrganizeList } from '@/api/prefecture'
import useUserStore from '@/store/user'
useInitScroll() useInitScroll()
const userStore = useUserStore()
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
...@@ -69,16 +81,31 @@ const queryParams = reactive({ ...@@ -69,16 +81,31 @@ const queryParams = reactive({
tagName: '', tagName: '',
materialType: 3, materialType: 3,
typeClassify: '', typeClassify: '',
organizeId: null, organizeName: '',
organizeName: '' organizeInt: [0]
}) })
onLoad((options) => { onLoad((options) => {
queryParams.tagId = options.tagId queryParams.tagId = options.tagId
queryParams.tagName = options.tagName queryParams.tagName = options.tagName
getList() getOrganizeList()
}) })
const organizeList = ref([])
const getOrganizeList = async () => {
const data = {
userId: userStore.userinfo.user.id,
sysCode: import.meta.env.VITE_APP_SYSTEM_CODE,
moduleCode: 'practice-mediaCatalog'
}
const res = await selectOrganizeList(data)
organizeList.value = res.data
organizeList.value.forEach(item => {
queryParams.organizeInt.push(item.id)
})
getList()
}
const dataList = ref([]) const dataList = ref([])
const handleSelectDataList = async () => { const handleSelectDataList = async () => {
const res = await selectSubjectList(page, queryParams) const res = await selectSubjectList(page, queryParams)
...@@ -107,6 +134,10 @@ const handleRefresh = () => { ...@@ -107,6 +134,10 @@ const handleRefresh = () => {
getList() getList()
} }
const back = () => {
xma.navigateBack();
};
// onActivated(() => { // onActivated(() => {
// nextTick(() => { }).then(() => { // nextTick(() => { }).then(() => {
...@@ -117,53 +148,61 @@ const handleRefresh = () => { ...@@ -117,53 +148,61 @@ const handleRefresh = () => {
// }) // })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container { :deep(.searchComponent .search) {
background-color: #f6f6f6; display: contents;
min-height: 100vh; }
.header { .header {
background-image: url('../../static/image/subject-list-bg.png'); background-image: url('../../static/image/subject-list-bg.png');
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
position: relative; position: relative;
display: flex;
.h-content {
position: relative;
z-index: 999;
width: 100%;
height: 62px;
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
img { .h-content {
width: 23px; position: relative;
height: 23px; z-index: 999;
} width: 100%;
height: 62px;
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
.title { img {
font-size: 15px; width: 23px;
color: #ffffff; height: 23px;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
} }
.overlay { .title {
background-color: #000000; font-size: 15px;
opacity: 0.3; color: #ffffff;
position: absolute; font-weight: 500;
left: 0; white-space: nowrap;
right: 0; overflow: hidden;
top: 0; text-overflow: ellipsis;
bottom: 0;
} }
} }
.overlay {
background-color: #000000;
opacity: 0.3;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
}
.container {
background-color: #f6f6f6;
min-height: 100vh;
.content { .content {
padding: 0 10px; padding: 0 10px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment