|
|
@ -5,35 +5,48 @@ |
|
|
|
<!-- 页面 广告条 --> |
|
|
|
<!-- 页面 广告条 --> |
|
|
|
<div class="cjy-banner"> |
|
|
|
<div class="cjy-banner"> |
|
|
|
<div class="cjy-banner-text"> |
|
|
|
<div class="cjy-banner-text"> |
|
|
|
<div class="title">{{ banner_data.title }}</div> |
|
|
|
<div class="title">{{ banner_data.title || '--' }}</div> |
|
|
|
<div class="subtitle">{{ banner_data.subtitle }}</div> |
|
|
|
<div class="subtitle">{{ banner_data.subtitle || '--' }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<img :src="banner_data.logo" class="img" /> |
|
|
|
<img :src="banner_data.logo" class="img" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 页面 面包屑 --> |
|
|
|
<!-- 页面 面包屑 --> |
|
|
|
<div class="v-container"> |
|
|
|
<div class="v-container"> |
|
|
|
<el-breadcrumb class="m-t-normal" separator-class="el-icon-arrow-right"> |
|
|
|
<el-breadcrumb class="m-t-normal" separator-class="el-icon-arrow-right"> |
|
|
|
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> |
|
|
|
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item> |
|
|
|
<el-breadcrumb-item>经典案例</el-breadcrumb-item> |
|
|
|
<el-breadcrumb-item>{{ type == 2 ? '经典案例' : '解决方案' }}</el-breadcrumb-item> |
|
|
|
</el-breadcrumb> |
|
|
|
</el-breadcrumb> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 案例 详情 --> |
|
|
|
<!-- 案例 详情 --> |
|
|
|
<div class="v-container"> |
|
|
|
<div class="v-container"> |
|
|
|
<div class="cjy-case-detail row"> |
|
|
|
<div class="cjy-case-detail row"> |
|
|
|
<div class="detail-left"> |
|
|
|
<div class="detail-left" v-if="type == 1"> |
|
|
|
<div class="title tourism">全域旅游</div> |
|
|
|
<div class="title tourism">全域旅游</div> |
|
|
|
<div class="menu-list"> |
|
|
|
<div class="menu-list"> |
|
|
|
<div class="list-item" v-for="(item,index) in menu_list" :class="active_menu=='type-1-'+index?'active':''" :key="index" @click="getCaseData(item.id,'type-1-'+index)"> |
|
|
|
<div class="list-item" v-for="(item, index) in solvePlan" @click="infoPages(item.id, 1)" |
|
|
|
|
|
|
|
:class="active_menu == 'type-1-' + item.id ? 'active' : ''" :key="index"> |
|
|
|
{{ item.title }} |
|
|
|
{{ item.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="title scenic">智慧园区</div> |
|
|
|
<div class="title scenic">智慧园区</div> |
|
|
|
<div class="menu-list"> |
|
|
|
<div class="menu-list"> |
|
|
|
<div class="list-item" v-for="(item,index) in menu_list" :class="active_menu=='type-2-'+index?'active':''" :key="index" @click="getCaseData(item.id,'type-2-'+index)"> |
|
|
|
<div class="list-item" v-for="(item, index) in scensePlan" @click="infoPages(item.id, 1)" |
|
|
|
|
|
|
|
:class="active_menu == 'type-1-' + item.id ? 'active' : ''" :key="index"> |
|
|
|
{{ item.title }} |
|
|
|
{{ item.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="detail-left" v-if="type == 2"> |
|
|
|
|
|
|
|
<div class="title tourism">相关推荐</div> |
|
|
|
|
|
|
|
<div class="list-item" v-for="(item, index) in case_list" :key="index" @click="gotoPages(item.id, 2)"> |
|
|
|
|
|
|
|
<div class="item-box row"> |
|
|
|
|
|
|
|
<div class="item-image"><img :src="item.logo" class="img"></div> |
|
|
|
|
|
|
|
<div class="item-content"> |
|
|
|
|
|
|
|
<div class="title">{{ item.title }}</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="detail-right col"> |
|
|
|
<div class="detail-right col"> |
|
|
|
<div class="detail-title">{{ case_data.title }}</div> |
|
|
|
<div class="detail-title">{{ case_data.title }}</div> |
|
|
|
<div class="detail-content" v-html="case_data.content"></div> |
|
|
|
<div class="detail-content" v-html="case_data.content"></div> |
|
|
@ -51,48 +64,109 @@ export default { |
|
|
|
name: "case-list", |
|
|
|
name: "case-list", |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
banner_data: null,//广告图 |
|
|
|
banner_data: { |
|
|
|
|
|
|
|
title: null, |
|
|
|
|
|
|
|
subtitle: null |
|
|
|
|
|
|
|
},//广告图 |
|
|
|
case_id: null, |
|
|
|
case_id: null, |
|
|
|
case_data: {},//案例数据 |
|
|
|
case_data: {},//案例数据 |
|
|
|
menu_list: [],// 菜单数据 |
|
|
|
|
|
|
|
active_menu: 'type-1-0', |
|
|
|
active_menu: 'type-1-0', |
|
|
|
|
|
|
|
type: 2, |
|
|
|
|
|
|
|
case_list: [], |
|
|
|
|
|
|
|
solvePlan: [], |
|
|
|
|
|
|
|
scensePlan: [], |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.case_id = this.$route.query.id; |
|
|
|
this.case_id = this.$route.query.id; |
|
|
|
// 获取 左侧菜单 |
|
|
|
this.type = this.$route.query.type ? this.$route.query.type : 2; |
|
|
|
this.getMenuData() |
|
|
|
if (this.type == 1) { |
|
|
|
// 获取 案例详情 |
|
|
|
|
|
|
|
this.infoPages() |
|
|
|
this.getCompanyAllArea(); |
|
|
|
// 获取 轮播图 |
|
|
|
this.getCompanySolvePlan(); |
|
|
|
this.getBanner() |
|
|
|
this.getBanner1(); |
|
|
|
|
|
|
|
this.infoPages(this.case_id, this.type); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.getBanner(); |
|
|
|
|
|
|
|
this.getPlanList(); |
|
|
|
|
|
|
|
this.infoPages(this.case_id, this.type); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
|
|
|
|
'$route'(to, from) { |
|
|
|
|
|
|
|
console.log(to, from); |
|
|
|
|
|
|
|
// 当路由变化时调用 infoPages 方法 |
|
|
|
|
|
|
|
this.infoPages(to.query.id, to.query.type ? to.query.type : 2); |
|
|
|
|
|
|
|
this.case_id = to.query.id; |
|
|
|
|
|
|
|
this.type = to.query.type ? to.query.type : 2; |
|
|
|
|
|
|
|
if (to.query.type && to.query.type == 2) { |
|
|
|
|
|
|
|
this.getBanner(); |
|
|
|
|
|
|
|
this.getPlanList() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.getBanner1() |
|
|
|
|
|
|
|
this.getCompanyAllArea(); |
|
|
|
|
|
|
|
this.getCompanySolvePlan(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
async getPlanList() { |
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
|
|
type: 5, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let res = await Api.getColumnInfoList(params) |
|
|
|
|
|
|
|
this.case_list = res.data.list.filter(item => item.recommend == 1) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//全域旅游解决方案 |
|
|
|
|
|
|
|
async getCompanyAllArea() { |
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
|
|
type: 3, |
|
|
|
|
|
|
|
infoType: 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let res = await Api.getColumnInfoList(params) |
|
|
|
|
|
|
|
this.solvePlan = res.data.list.slice(0, 6); |
|
|
|
|
|
|
|
console.log(res) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//智慧景区解决方案 |
|
|
|
|
|
|
|
async getCompanySolvePlan() { |
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
|
|
type: 3, |
|
|
|
|
|
|
|
infoType: 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let res = await Api.getColumnInfoList(params) |
|
|
|
|
|
|
|
this.scensePlan = res.data.list.slice(0, 6); |
|
|
|
|
|
|
|
console.log(res) |
|
|
|
|
|
|
|
}, |
|
|
|
// 轮播图 函数 |
|
|
|
// 轮播图 函数 |
|
|
|
async getBanner() { |
|
|
|
async getBanner() { |
|
|
|
let res = await Api.getColumnInfoList({ type: 13 }); |
|
|
|
let res = await Api.getColumnInfoList({ type: 13 }); |
|
|
|
this.banner_data = res.data.list[0] |
|
|
|
this.banner_data = res.data.list[0] |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 左侧菜单 函数 |
|
|
|
async getBanner1() { |
|
|
|
getMenuData(){ |
|
|
|
let res = await Api.getColumnInfoList({ type: 15 }); |
|
|
|
this.menu_list=this.getDictDatas(DICT_TYPE.COLUMN_TYPE) |
|
|
|
this.banner_data = res.data.list[0] |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 左侧菜单 函数 |
|
|
|
// 案例详情 函数 |
|
|
|
// 案例详情 函数 |
|
|
|
async infoPages(id, active) { |
|
|
|
async infoPages(id, active) { |
|
|
|
if(active){ |
|
|
|
if (active == 1) { |
|
|
|
this.active_menu = active |
|
|
|
this.active_menu = 'type-1-' + id; |
|
|
|
} |
|
|
|
} |
|
|
|
let res = await Api.getDetail(this.case_id) |
|
|
|
let res = await Api.getDetail(id); |
|
|
|
this.case_data = res.data |
|
|
|
console.log(res.data); // 检查返回的数据结构 |
|
|
|
|
|
|
|
this.case_data = res.data; // 确保数据赋值正确 |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 跳转页面 函数 |
|
|
|
// 跳转页面 函数 |
|
|
|
gotoPages(val) { |
|
|
|
gotoPages(val, type) { |
|
|
|
this.$router.push("/case-detail?id" + val) |
|
|
|
this.$router.push("/case-detail?id=" + val + "&type=" + type) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped lang="scss"> |
|
|
|
|
|
|
|
.list-item { |
|
|
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|