Commit a20c9ac9 authored by zhanglw's avatar zhanglw

资讯详情

parent 9365911a
...@@ -59,7 +59,8 @@ router.beforeEach((to, from, next) => { ...@@ -59,7 +59,8 @@ router.beforeEach((to, from, next) => {
/* has no token*/ /* has no token*/
if (to.path === '/') { // 根路由重定向到前台home页 if (to.path === '/') { // 根路由重定向到前台home页
next('/home') next('/home')
} else if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入 } else if (findUrl(whiteList, to.path)) { // 在免登录白名单,直接进入
// } else if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入
next() next()
} else if (findUrl(backUrlList, to.path)) { // 后台路由重定向到后台登录 } else if (findUrl(backUrlList, to.path)) { // 后台路由重定向到后台登录
next(`/backlogin?redirect=${to.fullPath}`) next(`/backlogin?redirect=${to.fullPath}`)
......
...@@ -92,6 +92,14 @@ export const constantRouterMap = [ ...@@ -92,6 +92,14 @@ export const constantRouterMap = [
}, },
hidden: true hidden: true
}, },
{
path: '/information/details/:id',
meta: { title: '资讯详情', noCache: true },
component: (resolve) => {
return require(['@/views/homepage/information/details'], resolve)
},
hidden: true
},
{ {
path: '/backstage', path: '/backstage',
component: Layout, component: Layout,
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
>{{ item.name }}</div> >{{ item.name }}</div>
</div></el-col> </div></el-col>
<el-col :span="8"><div class="box-toplist"> <el-col :span="8"><div class="box-toplist">
<div class="title">供应商TOP8</div> <div class="toplist-title">供应商TOP8</div>
<ul class="contact-list"> <ul class="contact-list">
<li v-for="(item, index) in topSuppliers" :key="'ts_'+index" class="contact-item"> <li v-for="(item, index) in topSuppliers" :key="'ts_'+index" class="contact-item">
<img src="@/assets/home_images/to_like_b.png"> <img src="@/assets/home_images/to_like_b.png">
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
</ul> </ul>
</div></el-col> </div></el-col>
<el-col :span="8"><div class="box-toplist"> <el-col :span="8"><div class="box-toplist">
<div class="title">产品TOP8</div> <div class="toplist-title">产品TOP8</div>
<ul class="contact-list"> <ul class="contact-list">
<li v-for="(item, index) in topProducts" :key="'tp_'+index" class="contact-item"> <li v-for="(item, index) in topProducts" :key="'tp_'+index" class="contact-item">
<img src="@/assets/home_images/to_like_a.png"> <img src="@/assets/home_images/to_like_a.png">
...@@ -594,7 +594,7 @@ export default { ...@@ -594,7 +594,7 @@ export default {
border-radius: 10px; border-radius: 10px;
font-size: 22px; font-size: 22px;
letter-spacing: 2px; letter-spacing: 2px;
.title { .toplist-title {
width: 100%; width: 100%;
padding: 10px 15px; padding: 10px 15px;
background: #0457C7; background: #0457C7;
......
This diff is collapsed.
...@@ -171,6 +171,11 @@ export default { ...@@ -171,6 +171,11 @@ export default {
// 跳转到详情 // 跳转到详情
goToDetails(item, type) { goToDetails(item, type) {
console.log(item, type) console.log(item, type)
switch (type) {
case 'information':
this.$router.push({ path: `/information/details/${item.id || 123}` })
break
}
}, },
pageChange(e) { pageChange(e) {
this.page = e this.page = e
......
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