|
@@ -1,24 +1,45 @@
|
|
|
<script setup>
|
|
|
-import {useRoute} from 'vue-router'
|
|
|
+import { useRoute } from 'vue-router'
|
|
|
import apiChart from '@/api/modules/chart'
|
|
|
+import apiCommon from '@/api/modules/common'
|
|
|
|
|
|
-const route=useRoute()
|
|
|
+const route = useRoute()
|
|
|
|
|
|
-const chartInfo=ref(null)
|
|
|
-function getChartDetail(){
|
|
|
- apiChart.getChartDetail({}).then(res=>{
|
|
|
- if(res.Ret===200){
|
|
|
- chartInfo.value=res.Data
|
|
|
+// 获取配置
|
|
|
+const chartBaseUrl = ref('')
|
|
|
+function getSystemConfig() {
|
|
|
+ apiCommon.systemConfig().then(res => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ const arr = res.Data || []
|
|
|
+ arr.forEach(item => {
|
|
|
+ if (item.ConfKey === 'ChartViewUrl') {
|
|
|
+ chartBaseUrl.value = item.ConfVal
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+getSystemConfig()
|
|
|
+
|
|
|
+const chartInfo = ref(null)
|
|
|
+function getChartDetail() {
|
|
|
+ apiChart.getChartDetail({}).then(res => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ chartInfo.value = res.Data
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
// getChartDetail()
|
|
|
|
|
|
-function handleCollect(){
|
|
|
+function handleCollect() {
|
|
|
|
|
|
}
|
|
|
|
|
|
-const isShowMZSM=ref(false)
|
|
|
+const chartRenderUrl = computed(() => {
|
|
|
+ return `${chartBaseUrl.value}/chart/preview?code=&source=etamini&token=${route.query.token}`
|
|
|
+})
|
|
|
+
|
|
|
+const isShowMZSM = ref(false)
|
|
|
</script>
|
|
|
<template>
|
|
|
<div class="chart-detail-page">
|
|
@@ -26,7 +47,7 @@ const isShowMZSM=ref(false)
|
|
|
<div class="mz-tips" @click="isShowMZSM = true">免责声明</div>
|
|
|
<!-- 图表渲染盒子 -->
|
|
|
<div class="chart-render-wrap">
|
|
|
- <iframe src="http://192.168.77.25:3000/chart/preview?code=a4ef161347660d1b23c1b045f3562a66&source=etamini&token=6ea9ab1baa0efb9e19094440c317e21bdefc086f9498d024a0ca6fe32328c68b"></iframe>
|
|
|
+ <iframe :src="chartRenderUrl"></iframe>
|
|
|
</div>
|
|
|
<div><span>来源:</span></div>
|
|
|
|
|
@@ -42,41 +63,42 @@ const isShowMZSM=ref(false)
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.chart-detail-page{
|
|
|
+.chart-detail-page {
|
|
|
+ background-color: #fff;
|
|
|
padding: var(--page-padding);
|
|
|
- .chart-title{
|
|
|
+ .chart-title {
|
|
|
font-size: 36px;
|
|
|
line-height: 44px;
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
- .mz-tips{
|
|
|
+ .mz-tips {
|
|
|
text-align: right;
|
|
|
color: var(--primary-color);
|
|
|
font-size: var(--font-size-small);
|
|
|
}
|
|
|
- .chart-render-wrap{
|
|
|
+ .chart-render-wrap {
|
|
|
margin-top: 50px;
|
|
|
height: 800px;
|
|
|
- iframe{
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- border: none;
|
|
|
+ iframe {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ border: none;
|
|
|
}
|
|
|
}
|
|
|
- .change-btns-box{
|
|
|
+ .change-btns-box {
|
|
|
position: fixed;
|
|
|
left: var(--page-padding);
|
|
|
right: var(--page-padding);
|
|
|
bottom: 69px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- .btn{
|
|
|
+ .btn {
|
|
|
width: 48%;
|
|
|
height: 68px;
|
|
|
text-align: center;
|
|
|
border-radius: 68px;
|
|
|
line-height: 68px;
|
|
|
- background-color: #F3F5F9;
|
|
|
+ background-color: #f3f5f9;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -88,4 +110,36 @@ const isShowMZSM=ref(false)
|
|
|
width: 100px;
|
|
|
height: 100px;
|
|
|
}
|
|
|
+
|
|
|
+@media (min-width: 600px) {
|
|
|
+ .chart-detail-page {
|
|
|
+ min-height: 100vh;
|
|
|
+ .chart-title {
|
|
|
+ font-size: 18px;
|
|
|
+ line-height: 22px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .chart-render-wrap {
|
|
|
+ margin-top: 25px;
|
|
|
+ height: 400px;
|
|
|
+ }
|
|
|
+ .change-btns-box{
|
|
|
+ bottom: 35px;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 0 10px;
|
|
|
+ .btn{
|
|
|
+ max-width: 200px;
|
|
|
+ height: 34px;
|
|
|
+ border-radius: 34px;
|
|
|
+ line-height: 34px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .collect-icon{
|
|
|
+ right: 17px;
|
|
|
+ bottom: 75px;
|
|
|
+ width: 50px;
|
|
|
+ height: 50px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|