专题修改

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">
...@@ -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,16 +148,18 @@ const handleRefresh = () => { ...@@ -117,16 +148,18 @@ 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 { .h-content {
position: relative; position: relative;
...@@ -162,7 +195,13 @@ const handleRefresh = () => { ...@@ -162,7 +195,13 @@ const handleRefresh = () => {
top: 0; top: 0;
bottom: 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