|
@@ -21,6 +21,7 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import {onMounted,ref,watch} from 'vue'
|
|
import {onMounted,ref,watch} from 'vue'
|
|
|
|
+import {getArticleDetailByOpen} from '@/http/api/common.js'
|
|
import { LeftCircleOutlined, RightCircleOutlined } from '@ant-design/icons-vue';
|
|
import { LeftCircleOutlined, RightCircleOutlined } from '@ant-design/icons-vue';
|
|
//定义路由
|
|
//定义路由
|
|
import {useRouter,useRoute} from 'vue-router'
|
|
import {useRouter,useRoute} from 'vue-router'
|
|
@@ -76,7 +77,7 @@ watch(()=>props.carouselList ,(val,oldval)=>{
|
|
deep:true
|
|
deep:true
|
|
})
|
|
})
|
|
|
|
|
|
-function openDetail (e){
|
|
|
|
|
|
+async function openDetail (e){
|
|
//回到顶部
|
|
//回到顶部
|
|
const targetElement = document.getElementById('top');
|
|
const targetElement = document.getElementById('top');
|
|
if (targetElement) {
|
|
if (targetElement) {
|
|
@@ -87,8 +88,14 @@ function openDetail (e){
|
|
if (e?.targetType == '2') {
|
|
if (e?.targetType == '2') {
|
|
window.open(e?.url, "_blank");
|
|
window.open(e?.url, "_blank");
|
|
}else if (e?.targetType == '1') {
|
|
}else if (e?.targetType == '1') {
|
|
|
|
+ //获取文章详情
|
|
|
|
+ let res = await getArticleDetailByOpen({
|
|
|
|
+ id:e?.articleId
|
|
|
|
+ })
|
|
|
|
+ let bodyType = res.data?.bodyType || '1'
|
|
//富文本
|
|
//富文本
|
|
- router.push('/CompanyNews?openType=1&id='+e?.articleId + '&bodyType=1&title='+e?.title)
|
|
|
|
|
|
+ router.push('/CompanyNews?openType=1&id='+e?.articleId
|
|
|
|
+ + '&bodyType='+bodyType+'&title='+e?.title)
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|