法律法规-政策解读
parent
dc8f932ecb
commit
9cbd8f2221
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 180 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 174 KiB |
|
|
@ -83,6 +83,33 @@ const router = createRouter({
|
|||
},
|
||||
component: () => import("@/views/business/insight/detail.vue"),
|
||||
},
|
||||
{
|
||||
path: 'business/legal',
|
||||
name: 'legal',
|
||||
meta: {
|
||||
title: 'AI商情-法律法规',
|
||||
group: 'business'
|
||||
},
|
||||
component: () => import("@/views/business/legal/index.vue"),
|
||||
},
|
||||
{
|
||||
path: 'business/legal/policy',
|
||||
name: 'policy',
|
||||
meta: {
|
||||
title: 'AI商情-法律法规-政策解读',
|
||||
group: 'business'
|
||||
},
|
||||
component: () => import("@/views/business/legal/policy.vue"),
|
||||
},
|
||||
{
|
||||
path: 'business/legal/policy/detail/:id',
|
||||
name: 'policyDetail',
|
||||
meta: {
|
||||
title: 'AI商情-法律法规-政策解读',
|
||||
group: 'business'
|
||||
},
|
||||
component: () => import("@/views/business/legal/policyDetail.vue"),
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@ const props = defineProps({
|
|||
cid: {
|
||||
cid: Object,
|
||||
default: {}
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const pageSize = ref(15);
|
||||
|
|
@ -55,7 +59,7 @@ const getList = ()=>{
|
|||
placeholder.value = '数据加载中...';
|
||||
let params = {
|
||||
category_id: props.cid,
|
||||
type: 'business',
|
||||
type: props.type,
|
||||
per_page: pageSize.value,
|
||||
page: pageNum.value
|
||||
};
|
||||
|
|
@ -76,7 +80,11 @@ const loadMore = ()=>{
|
|||
};
|
||||
|
||||
const goDetail = (id) => {
|
||||
router.push(`/business/insight/detail/${props.cid}/${id}`);
|
||||
let path = {
|
||||
business: `/business/insight/detail/${props.cid}/${id}`, // 行业洞察详情页
|
||||
policy: `/business/legal/policy/detail/${id}`, // 法律法规-政策解读详情页
|
||||
};
|
||||
router.push(path[props.type]);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<template>
|
||||
<div>
|
||||
AI商情首页
|
||||
<router-link to="/business/insight">行业洞察</router-link>
|
||||
<div><router-link to="/business/insight">行业洞察</router-link></div>
|
||||
<div><router-link to="/business/legal">法律法规</router-link></div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<ul class="menu">
|
||||
<li :class="{active: cid == item.id}" @click="jump(item.id)" v-for="item in categories">{{item.name}}</li>
|
||||
</ul>
|
||||
<CardList :key="cid" :cid="cid"></CardList>
|
||||
<CardList :key="cid" :cid="cid" type="business"></CardList>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,130 @@
|
|||
<template>
|
||||
<div class="pageContainer">
|
||||
<div class="content">
|
||||
<div class="card policy" @click="jump('/business/legal/policy')">
|
||||
<div class="name"><span>政策解读</span></div>
|
||||
<div class="desc">
|
||||
“宏观经济政策”(macroeconomic policy)是指国家或政府有意识有计划地运用一定的政策工具,调节控制宏观经济的
|
||||
</div>
|
||||
<div class="more">详情 ></div>
|
||||
</div>
|
||||
<div class="card map" @click="jump('/business/legal/country')">
|
||||
<div class="name"><span>国别(地区)指南</span></div>
|
||||
<div class="desc">
|
||||
“宏观经济政策”(macroeconomic policy)是指国家或政府有意识有计划地运用一定的政策工具,调节控制宏观经济的
|
||||
</div>
|
||||
<div class="more">详情 ></div>
|
||||
</div>
|
||||
<div class="card searchLaw" @click="jump('/business/legal/search')">
|
||||
<div class="name"><span>境外法规检索</span></div>
|
||||
<div class="desc">
|
||||
“宏观经济政策”(macroeconomic policy)是指国家或政府有意识有计划地运用一定的政策工具,调节控制宏观经济的
|
||||
</div>
|
||||
<div class="more">详情 ></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const jump = (path) => {
|
||||
router.push(path);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pageContainer{
|
||||
color: #FFF;
|
||||
padding: 90px 60px;
|
||||
.content{
|
||||
position: relative;
|
||||
&::before{
|
||||
content: '';
|
||||
width: 160px;
|
||||
height: 128px;
|
||||
background: url('@/assets/images/law_cube2.png') no-repeat center;
|
||||
background-size: contain;
|
||||
position: absolute;
|
||||
top: -90px;
|
||||
left: -20px;
|
||||
z-index: 1;
|
||||
}
|
||||
&::after{
|
||||
content: '';
|
||||
width: 160px;
|
||||
height: 128px;
|
||||
background: url('@/assets/images/law_cube1.png') no-repeat center;
|
||||
background-size: contain;
|
||||
position: absolute;
|
||||
bottom: -90px;
|
||||
right: -20px;
|
||||
z-index: 1;
|
||||
}
|
||||
.card{
|
||||
width: 100%;
|
||||
height: 254px;
|
||||
margin-top: 25px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
&.policy{
|
||||
background: url('@/assets/images/policy_analysis.jpg') no-repeat center center;
|
||||
background-size: cover;
|
||||
}
|
||||
&.map{
|
||||
background: url('@/assets/images/map_guide.jpg') no-repeat center center;
|
||||
background-size: cover;
|
||||
}
|
||||
&.searchLaw{
|
||||
background: url('@/assets/images/oversea_law.jpg') no-repeat center center;
|
||||
background-size: cover;
|
||||
}
|
||||
&:hover{
|
||||
border-color: #FFF;
|
||||
box-shadow: 0 0 10px rgba($color: #FFF, $alpha: 0.5);
|
||||
}
|
||||
.name{
|
||||
font-size: 27px;
|
||||
text-indent: 10px;
|
||||
position: relative;
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
font-weight: bold;
|
||||
&::before{
|
||||
content: '';
|
||||
width: 31px;
|
||||
height: 31px;
|
||||
background: #3662FE;
|
||||
border-radius: 3px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
span{
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
.desc{
|
||||
font-size: 22px;
|
||||
line-height: 30px;
|
||||
text-indent: 2em;
|
||||
}
|
||||
.more{
|
||||
width: 100%;
|
||||
font-size: 24px;
|
||||
text-align: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
<template>
|
||||
<div class="pageContainer">
|
||||
<div class="banner" :style="`background-image: url(${banner.picture})`" v-if="banner">
|
||||
<div class="desc">
|
||||
<h2>{{ banner.name }}</h2>
|
||||
<p>{{ banner.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mainBox">
|
||||
<ul class="menu" v-if="categories.length > 0">
|
||||
<li :class="{ active: !cid }" @click="cid = 0" >全部</li>
|
||||
<li :class="{ active: cid == item.id }" @click="changeCategory(item.id)" v-for="item in categories">{{ item.name }}</li>
|
||||
</ul>
|
||||
<CardList :key="cid" :cid="cid" type="policy"></CardList>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onBeforeMount, onMounted, onUpdated, watch } from 'vue';
|
||||
import http from '@/io/http';
|
||||
import { showToast } from 'vant';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import CardList from '../components/CategoryCardList.vue';
|
||||
|
||||
const cid = ref(0);
|
||||
const banner = ref();
|
||||
const categories = ref([]);
|
||||
|
||||
onBeforeMount(() => {
|
||||
getBanner();
|
||||
getCategories();
|
||||
});
|
||||
|
||||
const getBanner = () => {
|
||||
let params = { key: 'pc_policy' };
|
||||
http('/api/banner', params, 'get').then(res => {
|
||||
banner.value = Array.isArray(res.data) ? res.data[0] : {};
|
||||
}).catch(err => {
|
||||
message.error(err.message);
|
||||
});
|
||||
};
|
||||
|
||||
const getCategories = () => {
|
||||
let params = {
|
||||
type_key: 'policy',
|
||||
};
|
||||
http('/api/keywords', params, 'get').then(res => {
|
||||
categories.value = res.data || [];
|
||||
}).catch(err => {
|
||||
message.error(err.message);
|
||||
});
|
||||
};
|
||||
|
||||
const changeCategory = (val) => {
|
||||
cid.value = val;
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pageContainer {
|
||||
width: 100%;
|
||||
color: #FFF;
|
||||
|
||||
.banner {
|
||||
width: 100%;
|
||||
height: 216px;
|
||||
background-color: rgba($color: #FFF, $alpha: 0.5);
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
|
||||
.desc {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
h2 {
|
||||
font-size: 27px;
|
||||
}
|
||||
|
||||
p {
|
||||
width: 460px;
|
||||
font-size: 23px;
|
||||
line-height: 30px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mainBox {
|
||||
width: 100%;
|
||||
|
||||
.menu {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
flex-wrap: nowrap;
|
||||
position: relative;
|
||||
|
||||
li {
|
||||
height: 48px;
|
||||
padding: 0 20px;
|
||||
border-radius: 3px;
|
||||
color: #999;
|
||||
line-height: 48px;
|
||||
margin-right: 20px;
|
||||
font-size: 28px;
|
||||
white-space: nowrap;
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
background: #3662FE;
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}</style>
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
<template>
|
||||
<div class="pageContainer">
|
||||
<div class="breadNav">
|
||||
<router-link to="/">首页</router-link><span>></span>
|
||||
<router-link to="/business">AI商情</router-link><span>></span>
|
||||
<router-link to="/business/legal">法律法规</router-link><span>></span>
|
||||
<router-link to="/business/legal/policy">政策解读</router-link><span>></span>
|
||||
<span>详情</span>
|
||||
</div>
|
||||
<div class="article">
|
||||
<template v-if="detail">
|
||||
<h1 class="title">{{detail.title}}</h1>
|
||||
<div class="props">
|
||||
<span>作者:{{detail.author }}</span>
|
||||
<span>责编:{{detail.editor }}</span>
|
||||
<span>{{DateFormat(new Date(detail.published_at * 1000), 'yyyy.MM.dd')}}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div v-html="detail.content"></div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="loadingBox" v-else>数据加载中...</div>
|
||||
<div class="recommend" v-if="recommend.length > 0">
|
||||
<div class="blockTitle">推荐文章</div>
|
||||
<ul>
|
||||
<li :key="item.id" v-for="item in recommend" @click="goDetail(item.id)">
|
||||
<div class="img"><img :src="item.cover" :alt="item.title"></div>
|
||||
<div class="info">
|
||||
<h3>{{ item.title }}</h3>
|
||||
<p>{{ item.description }}1</p>
|
||||
<span>{{ DateFormat(new Date(item.published_at * 1000), 'yyyy.MM.dd') }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <AiAssistant></AiAssistant> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onBeforeMount, onMounted } from 'vue';
|
||||
import http from '@/io/http';
|
||||
import { showToast } from 'vant';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { DateFormat } from '@/utils/format.js';
|
||||
// import AiAssistant from '@/views/chat/components/ai-assistant.vue';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref(route.params.id);
|
||||
const category = ref({});
|
||||
const detail = ref();
|
||||
const recommend = ref([]);
|
||||
|
||||
|
||||
onMounted(()=>{
|
||||
getDetail();
|
||||
getRecommendList();
|
||||
});
|
||||
|
||||
|
||||
const getDetail = ()=>{
|
||||
http(`/api/article/${id.value}`, {}, 'get').then(res => {
|
||||
detail.value = res.data;
|
||||
category.value = res.data.category;
|
||||
}).catch(err => {
|
||||
showToast(err.message);
|
||||
});
|
||||
};
|
||||
|
||||
const getRecommendList = () => {
|
||||
let params = {
|
||||
recommend: 1,
|
||||
type: 'policy',
|
||||
per_page: 6,
|
||||
page: 1
|
||||
};
|
||||
http('/api/article', params, 'get').then(res => {
|
||||
recommend.value = res.data.data || [];
|
||||
}).catch(err => {
|
||||
message.error(err.message);
|
||||
});
|
||||
};
|
||||
|
||||
const goDetail = (id) => {
|
||||
router.push(`/business/legal/policy/detail/${id}`);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.pageContainer{
|
||||
color: #FFF;
|
||||
padding: 25px;
|
||||
background-color: #242527;
|
||||
.breadNav{
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
color: #999;
|
||||
font-size: 22px;
|
||||
span{
|
||||
padding: 0 5px;
|
||||
}
|
||||
a{
|
||||
color: #999;
|
||||
&:hover{
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
.loadingBox{
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
.article{
|
||||
padding: 20px 0;
|
||||
.title{
|
||||
font-size: 26px;
|
||||
line-height: 30px;
|
||||
font-weight: bold;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.props{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #999;
|
||||
font-size: 23px;
|
||||
span{
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
line-height: 1.5;
|
||||
font-size: 23px;
|
||||
:deep(p){
|
||||
padding: 10px 0;
|
||||
}
|
||||
:deep(strong){
|
||||
font-weight: bold;
|
||||
}
|
||||
:deep(b){
|
||||
font-weight: bold;
|
||||
}
|
||||
:deep(h1){
|
||||
font-weight: bold;
|
||||
}
|
||||
:deep(img){
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
margin: 10px auto;
|
||||
}
|
||||
}
|
||||
.recommend{
|
||||
padding: 30px 0;
|
||||
.blockTitle{
|
||||
height: 46px;
|
||||
line-height: 45px;
|
||||
border-bottom: 1px solid #666;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
ul{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
li{
|
||||
width: 50%;
|
||||
padding-right: 30px;
|
||||
display: flex;
|
||||
margin-top: 30px;
|
||||
.img{
|
||||
width: 120px;
|
||||
height: 168px;
|
||||
overflow: hidden;
|
||||
img{
|
||||
width: 120px;
|
||||
height: 168px;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
flex: 1;
|
||||
margin-left: 15px;
|
||||
height: 168px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
h3{
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
p{
|
||||
padding: 10px 0;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
flex: 1;
|
||||
}
|
||||
span{
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue