覆盖文件

This commit is contained in:
tianshixing 2025-03-13 10:14:57 +08:00
parent 9f7b0a5454
commit 7ae9cc1ca6
29 changed files with 114 additions and 359 deletions

14
.env
View File

@ -2,23 +2,23 @@
VITE_API_PREFIX = '/api' VITE_API_PREFIX = '/api'
# 接口地址,可在其它环境配置文件进行覆盖 # 接口地址,可在其它环境配置文件进行覆盖
VITE_API_URL = 'http://localhost:10010' VITE_API_URL = 'http://82.157.20.36:10020'
# 静态资源地址 # 静态资源地址
VITE_RESOURCE_PREFIX = 'http://localhost:10010/resource' VITE_RESOURCE_PREFIX = '/resource'
# 站点配置 # 站点配置
# - 站点标题 # - 站点标题
VITE_SITE_TITLE = '天津市南开区智慧云平台' VITE_SITE_TITLE = '天津市南开区民政局'
# - 站点副标题 # - 站点副标题
VITE_SITE_SUB_TITLE = '' VITE_SITE_SUB_TITLE = ''
# - 主办单位 # - 主办单位
VITE_SITE_ORGANIZATION = '天津市南开区民政局' VITE_SITE_ORGANIZATION = '天津市南开区民政局'
# - 备案号 # - 备案号
VITE_SITE_ICP = '津ICP备2021010010号-3' VITE_SITE_ICP = '津ICP备13005196号-1'
# - 地址 # - 地址
VITE_SITE_ADDRESS = '天津市南开区' VITE_SITE_ADDRESS = '天津市南开区红旗南路263号'
# SEO配置 # SEO配置
VITE_SEO_KEYWORDS = '天津市南开区民政局' VITE_SEO_KEYWORDS = '天津市,民政局,南开区民政局'
VITE_SEO_DESCRIPTION = '天津市南开区民政局' VITE_SEO_DESCRIPTION = '天津市、民政局、南开区民政局'

View File

@ -1,4 +1,4 @@
VITE_APP_ENV = 'production' VITE_APP_ENV = 'production'
# 接口地址 # 接口地址
VITE_API_URL = 'http://localhost:10010/' VITE_API_URL = 'http://82.157.20.36:10020/'

View File

@ -1,4 +1,4 @@
VITE_APP_ENV = 'staging' VITE_APP_ENV = 'staging'
# 接口地址 # 接口地址
VITE_API_URL = 'http://localhost:10010/' VITE_API_URL = 'http://82.157.20.36:10020/'

View File

@ -1,4 +1,3 @@
@import "variables";
html body { html body {
padding: 0; padding: 0;
margin: 0; margin: 0;
@ -8,7 +7,7 @@ html body {
font-family: var(--font-family-base); font-family: var(--font-family-base);
min-width: var(--body-min-width); min-width: var(--body-min-width);
.content-wrap { .content-wrap {
max-width: var(--page-width); width: var(--page-width);
margin: 0 auto; margin: 0 auto;
box-sizing: border-box; box-sizing: border-box;
} }
@ -63,22 +62,3 @@ html body {
font-weight: bold; font-weight: bold;
} }
// 首页内容宽度
@media (max-width: $--mobile-max-width) {
html body {
--page-width: 100%;
--body-min-width: 100%;
}
}
// 移动端
@media (max-width: $--mobile-max-width) {
html body {
// 边距
--gap: 15px;
--gap-mini: 8px;
--gap-midele: 20px;
--gap-large: 25px;
--gap-huge: 30px;
}
}

View File

@ -31,10 +31,4 @@ body {
// 覆盖element-plus的默认字体大小 // 覆盖element-plus的默认字体大小
--el-font-size-base: var(--font-size-base); --el-font-size-base: var(--font-size-base);
// 边距
--gap: 20px;
--gap-mini: 10px;
--gap-midele: 30px;
--gap-large: 40px;
--gap-huge: 50px;
} }

View File

@ -3,7 +3,7 @@
<li v-for="article in articles" :key="article.uid"> <li v-for="article in articles" :key="article.uid">
<nuxt-link :to="`/article/${article.uid}`" target="_blank"> <nuxt-link :to="`/article/${article.uid}`" target="_blank">
<span class="title" v-html="getTitle(article)"></span> <span class="title" v-html="getTitle(article)"></span>
<span v-if="article.updatedAt" class="date">{{ article.updatedAt }}</span> <span class="date">{{ article.updatedAt }}</span>
</nuxt-link> </nuxt-link>
</li> </li>
</ul> </ul>
@ -56,7 +56,6 @@ ul.article-list {
padding: 15px 10px 15px 25px; padding: 15px 10px 15px 25px;
color: var(--font-color); color: var(--font-color);
text-decoration: none; text-decoration: none;
gap: 20px;
&:hover { &:hover {
color: var(--primary-color); color: var(--primary-color);
} }
@ -78,6 +77,7 @@ ul.article-list {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
padding-right: 20px;
// //
:deep(em) { :deep(em) {
font-style: normal; font-style: normal;

View File

@ -27,7 +27,6 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/assets/style/variables";
.article-preview { .article-preview {
--article-title: 30px; --article-title: 30px;
--article-content-font-size: 16px; --article-content-font-size: 16px;
@ -39,7 +38,7 @@ export default {
font-size: var(--article-title); font-size: var(--article-title);
line-height: 50px; line-height: 50px;
font-weight: bold; font-weight: bold;
padding: 0 var(--gap); padding: 0 20px;
word-break: break-all; word-break: break-all;
} }
// //
@ -47,11 +46,11 @@ export default {
color: var(--color-gray); color: var(--color-gray);
line-height: 36px; line-height: 36px;
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
padding: 0 var(--gap); padding: 0 20px;
} }
// //
article { article {
padding: 0 var(--gap-midele); padding: 0 30px;
overflow: hidden; overflow: hidden;
font-size: var(--article-content-font-size); font-size: var(--article-content-font-size);
color: var(--article-content-font-color); color: var(--article-content-font-color);
@ -61,31 +60,4 @@ export default {
} }
} }
} }
@media (max-width: $--mobile-max-width) {
.article-preview {
--article-title: 20px;
//
h2 {
font-size: var(--article-title);
line-height: 25px;
padding: 20px;
margin: 0;
}
//
.article-information {
line-height: 25px;
padding: 0 10px;
}
//
article {
padding: 10px;
font-size: var(--article-content-font-size);
line-height: 1.5;
:deep(iframe) {
width: 100%!important;
}
}
}
}
</style> </style>

View File

@ -10,7 +10,7 @@
class="swiper-container" class="swiper-container"
ref="swiper" ref="swiper"
:speed="500" :speed="500"
:slidesPerView="numberColumns" :slidesPerView="4"
:loop="true" :loop="true"
:autoplay="{ :autoplay="{
delay: 1500, delay: 1500,
@ -53,10 +53,7 @@ export default {
computed: { computed: {
// //
getIcons () { getIcons () {
if ( if (this.icons.length < 5 || this.icons.length > 7) {
this.icons.length < this.numberColumns + 1 ||
this.icons.length > this.numberColumns + 3
) {
return this.icons return this.icons
} }
return [...this.icons, ...this.icons] return [...this.icons, ...this.icons]
@ -64,7 +61,6 @@ export default {
}, },
data() { data() {
return { return {
numberColumns: 4,
modules: [] modules: []
} }
}, },
@ -72,45 +68,20 @@ export default {
getImageURL getImageURL
}, },
created () { created () {
if (this.$device.isMobile) {
this.numberColumns = 2
}
this.modules = [Autoplay] this.modules = [Autoplay]
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/style/variables";
.special-column {
--height: 100px;
--img-border-radius: 20px;
//
--title-width: 34px
}
@media (max-width: $--mobile-max-width) {
.special-column {
--height: 50px;
--img-border-radius: 10px;
//
--title-width: 40px
}
.title-wrap > label{
overflow: hidden;
font-size: 12px!important;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.special-column { .special-column {
display: flex; display: flex;
// //
.title-wrap { .title-wrap {
height: var(--height); height: 100px;
width: var(--title-width); width: 40px;
margin: auto 20px auto 0; margin: auto 20px auto 0;
padding: 0 var(--gap-mini); padding: 0 14px;
background: linear-gradient(90deg, var(--primary-color-light) 0%, var(--primary-color) 100%); background: linear-gradient(90deg, var(--primary-color-light) 0%, var(--primary-color) 100%);
border-radius: 10px; border-radius: 10px;
text-align: center; text-align: center;
@ -139,10 +110,13 @@ export default {
// //
.swiper-wrap { .swiper-wrap {
width: calc(100% - 80px); width: calc(100% - 80px);
height: calc(50% - 10px); height: 100px;
flex-grow: 1; flex-grow: 1;
overflow: hidden;
// //
.swiper-slide { .swiper-slide {
// swiperwidth
max-width: 25%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
padding: 0 10px; padding: 0 10px;
@ -155,14 +129,13 @@ export default {
} }
& > a { & > a {
display: block; display: block;
height: 100px;
cursor: pointer; cursor: pointer;
img { img {
width: 90%; border-radius: 20px;
height: var(--height); width: 100%;
border-radius: var(--img-border-radius); height: 100%;
margin-left: var(--gap);
object-fit: cover; object-fit: cover;
cursor: pointer;
} }
} }
} }

View File

@ -2,7 +2,7 @@
<div v-if="pageCount > 1" class="pagination"> <div v-if="pageCount > 1" class="pagination">
<div class="pagination-content"> <div class="pagination-content">
<!-- 总数 --> <!-- 总数 -->
<span class="pagination-info d-none d-sm-block"> <em>{{ modelValue.total }}</em> </span> <span class="pagination-info"> <em>{{ modelValue.total }}</em> </span>
<ul> <ul>
<!-- 上一页 --> <!-- 上一页 -->
<li :class="{ disabled: modelValue.page <= 1 }"> <li :class="{ disabled: modelValue.page <= 1 }">
@ -58,7 +58,7 @@
</li> </li>
</ul> </ul>
<!-- 跳转 --> <!-- 跳转 -->
<div class="pagination-info pagination-jump d-none d-sm-block"> <div class="pagination-info pagination-jump">
前往 前往
<el-input-number <el-input-number
v-model="targetPage" v-model="targetPage"
@ -96,7 +96,7 @@ export default {
} }
}, },
// //
baseLimitPageCount: { limitPageCount: {
type: Number, type: Number,
default: 5 default: 5
} }
@ -107,14 +107,6 @@ export default {
} }
}, },
computed: { computed: {
//
limitPageCount () {
//
if (this.$device.isMobile) {
return 3
}
return this.baseLimitPageCount
},
// 4 = + + + // 4 = + + +
maxPageCount () { maxPageCount () {
return this.limitPageCount + 4 return this.limitPageCount + 4

View File

@ -1,13 +1,6 @@
<template> <template>
<div class="pop-up-select"> <div class="pop-up-select" @mouseover="active = true" @mouseout="active = false">
<span>{{ title }} <el-icon><ElIconArrowUpBold/></el-icon></span> <span>{{ title }} <el-icon><ElIconArrowUpBold/></el-icon></span>
<!-- 事件遮罩 -->
<div
class="event-mask"
@click="active = !active"
v-on:[mouseover]="active = true"
@mouseout="active = false"
/>
<ul <ul
:class="{ active: active, leave: !active }" :class="{ active: active, leave: !active }"
@mouseover="active = true" @mouseover="active = true"
@ -31,11 +24,6 @@ export default {
} }
} }
}, },
computed: {
mouseover () {
return this.$device.isMobile ? '' : 'mouseover'
}
},
data () { data () {
return { return {
active: false active: false
@ -45,8 +33,6 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/assets/style/variables";
.pop-up-select { .pop-up-select {
position: relative; position: relative;
height: 40px; height: 40px;
@ -54,20 +40,12 @@ export default {
border: 1px solid #e4e7ed; border: 1px solid #e4e7ed;
display: flex; display: flex;
align-items: center; align-items: center;
.event-mask {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
&>span { &>span {
width: 100%; width: 100%;
padding: 5px 20px; padding: 5px 20px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
white-space: nowrap;
.el-icon { .el-icon {
color: #aaa; color: #aaa;
font-size: 18px; font-size: 18px;
@ -118,12 +96,4 @@ export default {
max-height: 300px; max-height: 300px;
} }
} }
@media (max-width: $--mobile-max-width) {
.pop-up-select {
span {
padding: 5px 10px;
}
}
}
</style> </style>

View File

@ -56,7 +56,6 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/assets/style/variables";
.segment-selector { .segment-selector {
font-size: 14px; font-size: 14px;
display: flex; display: flex;
@ -74,7 +73,6 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
line-height: 30px; line-height: 30px;
gap: 5px; gap: 5px;
margin-bottom: 8px;
li { li {
height: 30px; height: 30px;
padding: 0 10px; padding: 0 10px;
@ -90,21 +88,4 @@ export default {
} }
} }
} }
@media (max-width: $--mobile-max-width) {
.segment-selector {
font-size: 12px;
label {
width: 60px;
font-size: 12px;
line-height: 27px;
}
ul {
li {
padding: 0 7px;
height: 27px;
line-height: 27px;
}
}
}
}
</style> </style>

View File

@ -4,9 +4,8 @@
<img src="/images/link.png" alt=""> <img src="/images/link.png" alt="">
<h3>网站导航</h3> <h3>网站导航</h3>
</div> </div>
<ul class="row"> <ul>
<li <li
class="col-6 col-lg-3"
v-for="(title, index) in navList" v-for="(title, index) in navList"
v-show="data[index] != null && data[index].length > 0" v-show="data[index] != null && data[index].length > 0"
:key="title" :key="title"
@ -32,14 +31,13 @@ export default {
}, },
data () { data () {
return { return {
navList: ['国家级链接', '省级链接', '市级链接', '其他链接'] navList: ['国家级链接', '市级链接', '友情链接', '其他链接']
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/assets/style/variables";
.website-nav-wrap { .website-nav-wrap {
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
@ -93,22 +91,9 @@ export default {
} }
} }
} }
&.row {
--bs-gutter-x: 1rem;
gap: 10px 0;
}
}
}
@media (max-width: $--mobile-max-width) {
.title-wrap {
width: 20px;
flex-direction: column;
justify-content: center;
h3 {
padding: 2px!important;
}
} }
} }
:deep(.el-dropdown-menu__item) { :deep(.el-dropdown-menu__item) {
min-width: 220px; min-width: 220px;
a { a {

View File

@ -64,7 +64,7 @@ export default {
// //
:deep(.el-input-group__append) { :deep(.el-input-group__append) {
padding: 0 10px; padding: 0 10px;
width: 75px; width: 65px;
background-color: var(--primary-color-dark-deep); background-color: var(--primary-color-dark-deep);
box-shadow: none; box-shadow: none;
font-size: var(--font-size-base); font-size: var(--font-size-base);

View File

@ -29,11 +29,10 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/assets/style/variables";
.web-footer { .web-footer {
height: 100%; height: 100%;
background-color: var(--primary-color-dark); background-color: var(--primary-color-dark);
padding: var(--gap-huge) 0; padding: 50px 0;
color: var(--color-white); color: var(--color-white);
.content-wrap { .content-wrap {
text-align: center; text-align: center;
@ -56,12 +55,4 @@ export default {
} }
} }
} }
@media (max-width: $--mobile-max-width) {
.web-footer {
.content-wrap {
margin-top: 0;
font-size: 12px!important;
}
}
}
</style> </style>

View File

@ -1,15 +1,11 @@
<template> <template>
<div class="web-header"> <div class="web-header">
<!-- 菜单窗口 d-block d-sm-none"在xs(默认宽度576px)展示 --> <div class="content-wrap">
<div class="categories-window-wrap d-block d-sm-none"> <div class="title-wrap">
<CategoriesStarterButton :categories="categories"/>
</div>
<div class="content-wrap row">
<div class="title-wrap col-12 col-lg-6">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<h2>{{ subTitle }}</h2> <h2>{{ subTitle }}</h2>
</div> </div>
<div class="search-wrap col-12 col-lg-6"> <div class="search-wrap">
<SearchInput/> <SearchInput/>
</div> </div>
</div> </div>
@ -18,16 +14,10 @@
<script> <script>
import SearchInput from './SearchInput' import SearchInput from './SearchInput'
import CategoriesStarterButton from './CategoriesStarterButton.vue'
export default { export default {
name: 'WebHeader', name: 'WebHeader',
components: { CategoriesStarterButton, SearchInput }, components: { SearchInput },
props: {
categories: {
required: true
}
},
async setup () { async setup () {
return { return {
title: import.meta.env.VITE_SITE_TITLE, title: import.meta.env.VITE_SITE_TITLE,
@ -38,14 +28,12 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/assets/style/variables";
.web-header { .web-header {
padding: 50px 0; padding: 50px 0;
background: linear-gradient(to bottom, var(--primary-color), var(--primary-color-light)); background: linear-gradient(to bottom, var(--primary-color), var(--primary-color-light));
color: var(--color-white); color: var(--color-white);
position: relative;
.content-wrap { .content-wrap {
max-width: var(--page-width); width: var(--page-width);
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
@ -53,7 +41,6 @@ export default {
// //
.title-wrap { .title-wrap {
flex-grow: 1; flex-grow: 1;
text-align: center;
h1,h2 { h1,h2 {
margin: 0; margin: 0;
} }
@ -62,7 +49,7 @@ export default {
} }
h2 { h2 {
color: var(--primary-color-light-deep); color: var(--primary-color-light-deep);
font-size: var(--font-size-base) font-size: 16px;
} }
a { a {
color: var(--primary-color-light-deep); color: var(--primary-color-light-deep);
@ -71,26 +58,6 @@ export default {
// //
.search-wrap { .search-wrap {
flex-shrink: 0; flex-shrink: 0;
text-align: center;
margin-top: 10px;
}
}
.categories-window-wrap {
position: absolute;
top: 10px;
left: 10px;
}
}
@media (max-width: $--mobile-max-width) {
.web-header {
background-size: auto 100%;
}
.title-wrap {
h1 {
font-size: 26px!important;
}
h2 {
font-size: 12px!important;
} }
} }
} }

27
kit.json Normal file
View File

@ -0,0 +1,27 @@
{
"name":"我的项目-eva-cms-website-gov",
"space":"Eva",
"service":{
"eva-cms-website-gov":{
"version":"1.0.0.3",
"variables":[
{
"name":"title",
"inputType":"input",
"value":"nankaiWebSite"
},
{
"name":"subTitle",
"inputType":"input",
"value":"南开民政局"
},
{
"name":"_plugins",
"inputType":"_plugins",
"value":[]
}
]
}
},
"plugins":{}
}

View File

@ -6,11 +6,8 @@
<Meta type="description" :content="siteConfig.description"/> <Meta type="description" :content="siteConfig.description"/>
</Head> </Head>
<header> <header>
<WebHeader :categories="categories"/> <WebHeader/>
<!-- 栏目树 d-none d-sm-block在xs(默认宽度576px)隐藏 -->
<div class="d-none d-sm-block">
<Categories :categories="categories"/> <Categories :categories="categories"/>
</div>
</header> </header>
<main> <main>
<!-- 修改el语言为中文 --> <!-- 修改el语言为中文 -->
@ -18,13 +15,13 @@
<div class="content-wrap category-detail-wrap"> <div class="content-wrap category-detail-wrap">
<!-- 页面面包屑 --> <!-- 页面面包屑 -->
<PageBreadCrumb :data="breadcrumbs"/> <PageBreadCrumb :data="breadcrumbs"/>
<div class="detail-wrap__body row"> <div class="detail-wrap__body">
<!-- 栏目树 d-none d-sm-block在xs(默认宽度576px)隐藏 --> <!-- 栏目树 -->
<div class="d-none d-sm-block detail-wrap__categories col-4 col-lg-3"> <div class="detail-wrap__categories">
<CategoryTree :data="subCategories" :selected="selectedCategory.uid"/> <CategoryTree :data="subCategories" :selected="selectedCategory.uid"/>
</div> </div>
<!-- 主要内容 --> <!-- 主要内容 -->
<div class="detail-wrap__content col-12 col-lg-9"> <div class="detail-wrap__content">
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
@ -97,11 +94,8 @@ export default {
// //
.detail-wrap__content { .detail-wrap__content {
flex-grow: 1; flex-grow: 1;
padding: 0 var(--gap) 10px 0; padding: 10px 30px;
overflow: hidden; overflow: hidden;
&.col-12 {
padding: 0 10px;
}
& > h2 { & > h2 {
font-size: var(--font-size-large); font-size: var(--font-size-large);
margin: 0; margin: 0;

View File

@ -6,11 +6,8 @@
<Meta type="description" :content="siteConfig.description"/> <Meta type="description" :content="siteConfig.description"/>
</Head> </Head>
<header> <header>
<WebHeader :categories="categories"/> <WebHeader/>
<!-- 栏目树 d-none d-sm-block在xs(默认宽度576px)隐藏 -->
<div class="d-none d-sm-block">
<Categories :categories="categories"/> <Categories :categories="categories"/>
</div>
</header> </header>
<main> <main>
<!-- 修改el语言为中文 --> <!-- 修改el语言为中文 -->

View File

@ -4,10 +4,6 @@ export default defineNuxtConfig({
compatibilityDate: '2024-07-10', compatibilityDate: '2024-07-10',
devtools: { enabled: true }, devtools: { enabled: true },
sitemap, sitemap,
devServer: {
host: '0.0.0.0',
port: 3000,
},
app: { app: {
// head配置 // head配置
head: { head: {
@ -29,9 +25,7 @@ export default defineNuxtConfig({
// 全局样式 // 全局样式
'@/assets/style/app.scss', '@/assets/style/app.scss',
'@/assets/style/theme.scss', '@/assets/style/theme.scss',
'@/public/icons/cms/iconfont.css', '@/public/icons/cms/iconfont.css'
// 引入Bootstrap的样式文件
'bootstrap/dist/css/bootstrap.css'
], ],
vite: { vite: {
css: { css: {
@ -51,12 +45,12 @@ export default defineNuxtConfig({
changeOrigin: true, changeOrigin: true,
rewrite: (path:any) => path.replace(new RegExp(`^${import.meta.env.VITE_API_PREFIX}`), '') rewrite: (path:any) => path.replace(new RegExp(`^${import.meta.env.VITE_API_PREFIX}`), '')
}, },
// 资源代理 // // 资源代理
[import.meta.env.VITE_RESOURCE_PREFIX]: { // [import.meta.env.VITE_RESOURCE_PREFIX]: {
target: `${import.meta.env.VITE_API_URL}${import.meta.env.VITE_RESOURCE_PREFIX}`, // target: `${import.meta.env.VITE_API_URL}${import.meta.env.VITE_RESOURCE_PREFIX}`,
changeOrigin: true, // changeOrigin: true,
rewrite: (path:any) => path.replace(new RegExp(`^${import.meta.env.VITE_RESOURCE_PREFIX}`), '') // rewrite: (path:any) => path.replace(new RegExp(`^${import.meta.env.VITE_RESOURCE_PREFIX}`), '')
} // }
}, },
} }
}, },
@ -67,8 +61,7 @@ export default defineNuxtConfig({
// 导入element-plus图标 // 导入element-plus图标
'@pinia/nuxt', '@pinia/nuxt',
'nuxt-swiper', 'nuxt-swiper',
'@nuxtjs/sitemap', '@nuxtjs/sitemap'
'@nuxtjs/device'
], ],
plugins: [ plugins: [
'~/plugins/nprogress.js', '~/plugins/nprogress.js',

39
package-lock.json generated
View File

@ -8,11 +8,9 @@
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"@nuxtjs/device": "^3.2.4",
"@nuxtjs/sitemap": "^6.1.2", "@nuxtjs/sitemap": "^6.1.2",
"@pinia/nuxt": "^0.5.3", "@pinia/nuxt": "^0.5.3",
"axios": "^1.7.4", "axios": "^1.7.4",
"bootstrap": "^5.3.0-alpha1",
"element-plus": "^2.8.0", "element-plus": "^2.8.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"nuxt": "^3.12.4", "nuxt": "^3.12.4",
@ -1595,14 +1593,6 @@
"@jridgewell/sourcemap-codec": "^1.5.0" "@jridgewell/sourcemap-codec": "^1.5.0"
} }
}, },
"node_modules/@nuxtjs/device": {
"version": "3.2.4",
"resolved": "https://registry.npmmirror.com/@nuxtjs/device/-/device-3.2.4.tgz",
"integrity": "sha512-jIvN6QeodBNrUrL/1FCHk4bebsiLsGHlJd8c/m2ksLrGY4IZ0npA8IYhDTdYV92epGxoe8+3iZOzCjav+6TshQ==",
"dependencies": {
"defu": "^6.1.4"
}
},
"node_modules/@nuxtjs/sitemap": { "node_modules/@nuxtjs/sitemap": {
"version": "6.1.2", "version": "6.1.2",
"resolved": "https://registry.npmmirror.com/@nuxtjs/sitemap/-/sitemap-6.1.2.tgz", "resolved": "https://registry.npmmirror.com/@nuxtjs/sitemap/-/sitemap-6.1.2.tgz",
@ -2003,13 +1993,10 @@
"integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==" "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw=="
}, },
"node_modules/@popperjs/core": { "node_modules/@popperjs/core": {
"version": "2.11.8", "name": "@sxzz/popperjs-es",
"resolved": "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.8.tgz", "version": "2.11.7",
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
"funding": { "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
}, },
"node_modules/@rollup/plugin-alias": { "node_modules/@rollup/plugin-alias": {
"version": "5.1.1", "version": "5.1.1",
@ -3356,24 +3343,6 @@
"resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz", "resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
}, },
"node_modules/bootstrap": {
"version": "5.3.0-alpha1",
"resolved": "https://registry.npmmirror.com/bootstrap/-/bootstrap-5.3.0-alpha1.tgz",
"integrity": "sha512-ABZpKK4ObS3kKlIqH+ZVDqoy5t/bhFG0oHTAzByUdon7YIom0lpCeTqRniDzJmbtcWkNe800VVPBiJgxSYTYew==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/twbs"
},
{
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
}
],
"peerDependencies": {
"@popperjs/core": "^2.11.6"
}
},
"node_modules/brace-expansion": { "node_modules/brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",

View File

@ -18,11 +18,9 @@
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"@nuxtjs/device": "^3.2.4",
"@nuxtjs/sitemap": "^6.1.2", "@nuxtjs/sitemap": "^6.1.2",
"@pinia/nuxt": "^0.5.3", "@pinia/nuxt": "^0.5.3",
"axios": "^1.7.4", "axios": "^1.7.4",
"bootstrap": "^5.3.0-alpha1",
"element-plus": "^2.8.0", "element-plus": "^2.8.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"nuxt": "^3.12.4", "nuxt": "^3.12.4",

View File

@ -62,17 +62,15 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/assets/style/variables";
.content-wrap { .content-wrap {
background: var(--color-white); background: var(--color-white);
padding: var(--gap-midele); padding: 30px;
.content { .content {
border: 1px solid var(--border-color); border: 1px solid var(--border-color);
// //
.attachment-wrap { .attachment-wrap {
border-top: 1px solid var(--border-color); border-top: 1px solid var(--border-color);
border-radius: 10px; padding: 20px 30px;
h4 { h4 {
color: var(--primary-color-dark); color: var(--primary-color-dark);
margin: 0; margin: 0;
@ -97,26 +95,4 @@ export default {
} }
} }
} }
@media (max-width: $--mobile-max-width) {
.content-wrap {
padding: 10px;
.content {
.attachment-wrap {
padding: 10px 20px;
ul {
margin-top: 8px;
li {
padding: 2px 0;
a {
.el-icon {
margin-right: 3px;
}
}
}
}
}
}
}
}
</style> </style>

View File

@ -4,30 +4,30 @@
<!-- 第一部分 --> <!-- 第一部分 -->
<div class="block row row-wrap"> <div class="block row row-wrap">
<!-- 轮播图 --> <!-- 轮播图 -->
<div class="col-12 col-lg-6" :style="{ height: $device.isMobile ? '220px' : '420px'}"> <div>
<Carousel :data="carouselList"/> <Carousel :data="carouselList"/>
</div> </div>
<div class="col-12 col-lg-6"> <div>
<DataListTabs :data="dtData"/> <DataListTabs :data="dtData"/>
</div> </div>
</div> </div>
<!-- 第二部分 --> <!-- 第二部分 -->
<div class="block row"> <div class="block row">
<div class="col-12 col-lg-6"> <div>
<DataListTabs :data="ldzcData"/> <DataListTabs :data="ldzcData"/>
</div> </div>
<div class="col-12 col-lg-6"> <div>
<DataListTabs :data="dwgkData"/> <DataListTabs :data="dwgkData"/>
</div> </div>
</div> </div>
<!-- 第三部分 --> <!-- 第三部分 -->
<ul class="block row row-wrap" style="padding-bottom: 0;"> <ul class="block row row-wrap col-3" style="padding-bottom: 0;">
<li class="col-12 col-lg-4"><DataListTabs :data="tzggData"/></li> <li><DataListTabs :data="tzggData"/></li>
<li class="col-12 col-lg-4"><DataListTabs :data="pqgsTabs"/></li> <li><DataListTabs :data="pqgsTabs"/></li>
<li class="col-12 col-lg-4"><DataListTabs :data="phgsTabs"/></li> <li><DataListTabs :data="phgsTabs"/></li>
<li class="col-12 col-lg-4"><DataListTabs :data="bdcdjznTabs"/></li> <li><DataListTabs :data="bdcdjznTabs"/></li>
<li class="col-12 col-lg-4"><DataListTabs :data="wlaqxcTabs"/></li> <li><DataListTabs :data="wlaqxcTabs"/></li>
<li class="col-12 col-lg-4"><DataListTabs :data="djgzTabs"/></li> <li><DataListTabs :data="djgzTabs"/></li>
</ul> </ul>
<!-- 专题专栏 --> <!-- 专题专栏 -->
<div class="block"> <div class="block">
@ -67,7 +67,7 @@ export default {
targetType: 'CATEGORY' targetType: 'CATEGORY'
})) }))
const categoryTitleMap = { const categoryTitleMap = {
snyw: '内要闻', snyw: '内要闻',
gnyw: '国内要闻', gnyw: '国内要闻',
ldzc: '领导之窗', ldzc: '领导之窗',
dwgk: '单位概况', dwgk: '单位概况',
@ -81,7 +81,7 @@ export default {
const categoryUtil = new CategoryUtil(pageData.CATEGORIES_TREE) const categoryUtil = new CategoryUtil(pageData.CATEGORIES_TREE)
const getTab = (categoryUid, data = []) => { const getTab = (categoryUid, data = []) => {
const category = categoryUtil.getCategory(categoryUid) const category = categoryUtil.getCategory(categoryUid)
if (category == null) { if (category == null) {1
throw new Error(`找不到栏目UID: ${categoryUid}`) throw new Error(`找不到栏目UID: ${categoryUid}`)
} }
return { return {
@ -127,15 +127,9 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.default-layout { .default-layout {
& > :deep(main) {
display: flex;
justify-content: center;
}
.content-wrap { .content-wrap {
// //
--data-block-height: 360px; --data-block-height: 360px;
flex-grow: 1;
overflow: hidden;
// //
.website-nav { .website-nav {
padding: 15px 20px; padding: 15px 20px;
@ -158,7 +152,7 @@ export default {
} }
} }
.block { .block {
padding: var(--gap); padding: 20px;
background-color: #fff; background-color: #fff;
margin-bottom: 12px; margin-bottom: 12px;
} }
@ -166,6 +160,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
& > * { & > * {
width: 49%;
flex-shrink: 0; flex-shrink: 0;
overflow: hidden; overflow: hidden;
} }
@ -175,6 +170,7 @@ export default {
} }
&.col-3 { &.col-3 {
& > * { & > * {
width: 32%;
margin-bottom: 20px; margin-bottom: 20px;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
public/favicon1.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -71,7 +71,7 @@ export function getImageURL (fileKey) {
if (fileKey.startsWith('http://') || fileKey.startsWith('https://')) { if (fileKey.startsWith('http://') || fileKey.startsWith('https://')) {
return fileKey return fileKey
} }
return `${import.meta.env.VITE_RESOURCE_PREFIX}/oss/image?f=${fileKey}` return `https://nankaicms.adl66.com/Api/Client/resource/oss/image?f=${fileKey}`
} }
/** /**
@ -85,7 +85,7 @@ export function getAttachURL (fileKey, filename) {
if (fileKey.startsWith('http://') || fileKey.startsWith('https://')) { if (fileKey.startsWith('http://') || fileKey.startsWith('https://')) {
return fileKey return fileKey
} }
return `${import.meta.env.VITE_RESOURCE_PREFIX}/oss/attach?f=${fileKey}&fn=${filename}` return `https://nankaicms.adl66.com/Api/Client/resource/oss/attach?f=${fileKey}&fn=${filename}`
} }
/** /**