2022-03-22 10:15:22 +00:00
|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<status-nav :navBarTitle="detailTitle" returnColor="#c2c2c2"></status-nav>
|
|
|
|
<container-subgroup>
|
|
|
|
<view slot="content" style="margin: 0 -30rpx;" class="fon28">
|
2022-05-20 09:46:27 +00:00
|
|
|
<view class="bacf pad-zy30 pad-sx20" style="margin-top: -10rpx;" v-if="dataObj">
|
2022-03-24 08:34:50 +00:00
|
|
|
<!-- 标题 -->
|
|
|
|
<view class="fon38 col0 tcenter">{{dataObj.title}}</view>
|
|
|
|
<!-- 时间 -->
|
|
|
|
<view class="col6 fon28 tcenter mar-sx20">{{dataObj.create_time}}</view>
|
2022-03-22 10:15:22 +00:00
|
|
|
<view class="fon30 line-h60">
|
2022-03-24 08:34:50 +00:00
|
|
|
<!-- 封面图 -->
|
|
|
|
<image :src="dataObj.cover_img" mode="widthFix" style="width: 100%;"></image>
|
|
|
|
<!-- 详情 -->
|
2022-04-22 10:39:36 +00:00
|
|
|
<!-- <rich-text :nodes="rich_text"></rich-text> -->
|
|
|
|
<view v-html="rich_text"></view>
|
2022-03-22 10:15:22 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</container-subgroup>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2022-05-20 09:46:27 +00:00
|
|
|
detailTitle:'方案详情',
|
2022-03-24 08:34:50 +00:00
|
|
|
current:0,
|
2022-05-20 09:46:27 +00:00
|
|
|
dataObj:'',
|
2022-03-24 08:34:50 +00:00
|
|
|
rich_text:''//富文本
|
2022-03-22 10:15:22 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(op) {
|
2022-05-20 09:46:27 +00:00
|
|
|
if(op.index!=undefined) {
|
|
|
|
this.detailTitle = `${['方案详情','详情概述','产品详情'][op.index*1]}`;
|
|
|
|
this.current = op.index*1;
|
|
|
|
}
|
2022-03-24 08:34:50 +00:00
|
|
|
this.getDetail(op.id);
|
2022-03-22 10:15:22 +00:00
|
|
|
},
|
|
|
|
methods: {
|
2022-03-24 08:34:50 +00:00
|
|
|
// 查看详情
|
|
|
|
getDetail(id){
|
|
|
|
let urls = [
|
|
|
|
'/universal/api.solution/solution_info',
|
|
|
|
'/universal/api.question/question_info',
|
2022-06-21 09:53:12 +00:00
|
|
|
'/universal/api.new_product/new_product_info'
|
2022-03-24 08:34:50 +00:00
|
|
|
]
|
|
|
|
this.$requst.get(urls[this.current],{id}).then(res=>{
|
|
|
|
if(res.code==1) {
|
|
|
|
this.dataObj = res.data;
|
|
|
|
// 日期转换
|
2022-07-26 10:10:08 +00:00
|
|
|
if(this.dataObj.create_time.toString().search('-')==-1){
|
|
|
|
// 当返回为时间戳时
|
|
|
|
this.dataObj.create_time = this.$toolAll.tools.timestampToTime(this.dataObj.create_time);
|
|
|
|
}
|
2022-03-24 08:34:50 +00:00
|
|
|
// 封面图
|
2022-04-08 10:43:32 +00:00
|
|
|
this.dataObj.cover_img = this.dataObj.cover_img,
|
2022-03-24 08:34:50 +00:00
|
|
|
this.rich_text = this.$toolAll.tools.escape2Html(this.dataObj.content);
|
|
|
|
}
|
|
|
|
})
|
2022-03-22 10:15:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
</style>
|