master
fuxiaochun 2023-08-21 09:59:04 +08:00
parent 58ca089d96
commit 58c4710b56
9 changed files with 83 additions and 44 deletions

View File

@ -90,7 +90,7 @@ const getRecommendList = () => {
http('/api/article', params, 'get').then(res => {
recommend.value = res.data.data || [];
}).catch(err => {
message.error(err.message);
showToast(err.message);
});
};
@ -100,9 +100,21 @@ const goDetail = (id) => {
policy: `/business/legal/policy/detail/${id}`,
insight: '',
};
if(urlOptions[props.type]){
router.push(urlOptions[props.type]);
if (urlOptions[props.type]) {
http(`/api/article/${id}`, {}, 'get').then(res => {
router.push(urlOptions[props.type]);
}).catch(err => {
if (err.status == 1001) {
showToast('无权限阅读,或会员已过期,请先订阅会员');
// placeholder.value = '';
}
});
// router.push(path[props.type]);
} else {
console.log('无此类型详情页路由跳转配置:' + props.type);
}
};
</script>

View File

@ -20,7 +20,7 @@
<li :class="{ active: route.meta.group === 'chat' }" @click="jump('/chat')">AI</li>
<li :class="{ active: route.meta.group === 'business' }" @click="jump('/business')">AI</li>
<li :class="{ active: route.meta.group === 'communication' }" @click="jump('/communication')">AI</li>
<li>AI献策</li>
<li :class="{ active: route.meta.group === 'training' }" @click="jump('/training')">AI</li>
<li :class="{ active: route.meta.group === 'vip' }" @click="jump('/vip')"></li>
<li :class="{ active: route.meta.group === 'ucenter' }" @click="jump('/ucenter/userinfo')"></li>
<li @click="onLogout">退</li>

View File

@ -23,7 +23,7 @@ const router = createRouter({
path: "chat-layout",
name: "ChatLayout",
meta: {
title: "AI助理布局",
title: "AI助理",
},
redirect :'/chat',
component:ChatLayout,
@ -59,7 +59,7 @@ const router = createRouter({
path: "/business/macroeconomics",
name: "Macroeconomics",
meta: {
title: "AI商情-宏观政经",
title: "宏观政经",
group: 'business'
},
component: () => import("@/views/business/macroeconomics/index.vue"),
@ -68,7 +68,7 @@ const router = createRouter({
path: "/business/macroeconomics/list/:pid",
name: "MacroeconomicsList",
meta: {
title: "AI商情-宏观政经内容分类列表",
title: "宏观政经",
group: 'business'
},
component: () => import("@/views/business/macroeconomics/list.vue"),
@ -77,7 +77,7 @@ const router = createRouter({
path: "/business/macroeconomics/detail/:id",
name: "MacroeconomicsDetail",
meta: {
title: "AI商情-宏观政经内容详情",
title: "宏观政经",
group: 'business'
},
component: () => import("@/views/business/macroeconomics/detail.vue"),
@ -86,7 +86,7 @@ const router = createRouter({
path: "/business/macroeconomics/trend/:id",
name: "Trend",
meta: {
title: "AI商情-洞见趋势详情",
title: "洞见趋势",
group: 'business'
},
component: () => import("@/views/business/macroeconomics/trend.vue"),
@ -95,7 +95,7 @@ const router = createRouter({
path: 'business/insight',
name: 'insight',
meta: {
title: 'AI商情-行业洞察',
title: '行业洞察',
group: 'business'
},
component: () => import("@/views/business/insight/index.vue"),
@ -104,7 +104,7 @@ const router = createRouter({
path: 'business/insight/category/:cid',
name: 'insightCategory',
meta: {
title: 'AI商情-行业洞察',
title: '行业洞察',
group: 'business'
},
component: () => import("@/views/business/insight/list.vue"),
@ -113,7 +113,7 @@ const router = createRouter({
path: 'business/insight/detail/:id',
name: 'insightDetail',
meta: {
title: 'AI商情-行业洞察',
title: '行业洞察',
group: 'business'
},
component: () => import("@/views/business/insight/detail.vue"),
@ -122,7 +122,7 @@ const router = createRouter({
path: 'business/legal',
name: 'legal',
meta: {
title: 'AI商情-法律法规',
title: '法律法规',
group: 'business'
},
component: () => import("@/views/business/legal/index.vue"),
@ -131,7 +131,7 @@ const router = createRouter({
path: 'business/legal/policy',
name: 'policy',
meta: {
title: 'AI商情-法律法规-政策解读',
title: '政策解读',
group: 'business'
},
component: () => import("@/views/business/legal/policy.vue"),
@ -140,7 +140,7 @@ const router = createRouter({
path: 'business/legal/policy/detail/:id',
name: 'policyDetail',
meta: {
title: 'AI商情-法律法规-政策解读',
title: '政策解读',
group: 'business'
},
component: () => import("@/views/business/legal/policyDetail.vue"),
@ -149,7 +149,7 @@ const router = createRouter({
path: 'business/legal/country',
name: 'country',
meta: {
title: 'AI商情-法律法规-国别地区指南',
title: '国别地区指南',
group: 'business'
},
component: () => import("@/views/business/legal/country.vue"),
@ -158,7 +158,7 @@ const router = createRouter({
path: 'business/legal/country/detail/:id',
name: 'countryDetail',
meta: {
title: 'AI商情-法律法规-国别地区指南',
title: '国别地区指南',
group: 'business'
},
component: () => import("@/views/business/legal/countryInfo.vue"),
@ -167,7 +167,7 @@ const router = createRouter({
path: 'business/legal/search',
name: 'search',
meta: {
title: 'AI商情-法律法规-境外法规检索',
title: '境外法规检索',
group: 'business'
},
component: () => import("@/views/business/legal/search.vue"),
@ -176,11 +176,19 @@ const router = createRouter({
path: 'business/legal/searchResult',
name: 'searchResult',
meta: {
title: 'AI商情-法律法规-境外法规检索',
title: '境外法规检索结果',
group: 'business'
},
component: () => import("@/views/business/legal/searchResult.vue"),
},
{
path: "training",
name: "Training",
meta: {
title: "AI培训",
},
component: () => import("@/views/training/index.vue"),
},
{
path: "vip",
name: "Vip",

View File

@ -89,11 +89,22 @@ const goDetail = (id) => {
business: `/business/insight/detail/${id}`, //
policy: `/business/legal/policy/detail/${id}`, // -
};
if(path[props.type]){
router.push(path[props.type]);
}else{
console.log('无此类型详情页路由跳转配置:'+props.type);
if (path[props.type]) {
http(`/api/article/${id}`, {}, 'get').then(res => {
router.push(path[props.type]);
}).catch(err => {
if (err.status == 1001) {
showToast('无权限阅读,或会员已过期,请先订阅会员');
// placeholder.value = '';
}
});
// router.push(path[props.type]);
} else {
console.log('无此类型详情页路由跳转配置:' + props.type);
}
};

View File

@ -1,11 +1,6 @@
<template>
<div class="pageContainer">
<div class="banner" :style="`background-image: url(${banner.picture})`">
<div class="desc">
<h2>{{ banner.name }}</h2>
<p>{{ banner.description }}</p>
</div>
</div>
<div class="banner" :style="`background-image: url(${banner.picture})`"></div>
<div class="mainBox">
<ul class="menu">
<li :class="{active: cid == item.id}" @click="jump(item.id)" v-for="item in categories">{{item.name}}</li>

View File

@ -1,11 +1,6 @@
<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="banner" :style="`background-image: url(${banner.picture})`" v-if="banner"></div>
<div class="mainBox">
<ul class="menu" v-if="categories.length > 0">
<li :class="{ active: !cid }" @click="cid = 0" >全部</li>
@ -43,7 +38,7 @@ const getBanner = () => {
http('/api/banner', params, 'get').then(res => {
banner.value = Array.isArray(res.data) ? res.data[0] : {};
}).catch(err => {
message.error(err.message);
showToast(err.message);
});
};
@ -57,7 +52,7 @@ const getCategories = () => {
http('/api/keywords', params, 'get').then(res => {
categories.value = res.data || [];
}).catch(err => {
message.error(err.message);
showToast(err.message);
});
};

View File

@ -97,7 +97,7 @@ const getResult = ()=>{
http('/api/law', params, 'get').then(res => {
result.value = res.data;
}).catch(err => {
message.error(err.message);
showToast(err.message);
});
};

View File

@ -1,11 +1,6 @@
<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="banner" :style="`background-image: url(${banner.picture})`" v-if="banner"></div>
<div class="mainBox">
<ul class="menu" v-if="categories.length > 0">
<li :class="{ active: !cid }" @click="cid = 0">全部</li>

View File

@ -0,0 +1,23 @@
<template>
<div class="pageContainer">
<div class="tips">敬请期待</div>
</div>
</template>
<script setup>
</script>
<style lang="scss" scoped>
.pageContainer{
.tips{
width: 100%;
height: 50vh;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
color: #FFF;
}
}
</style>