Explorar el Código

Merge branch 'eta_forum_2.0' into debug

yujinwen hace 5 días
padre
commit
7b3cb4bc79
Se han modificado 2 ficheros con 13 adiciones y 2 borrados
  1. 5 2
      src/CustomElement/EtaChart.ce.vue
  2. 8 0
      src/CustomElement/api/getData.js

+ 5 - 2
src/CustomElement/EtaChart.ce.vue

@@ -1,7 +1,7 @@
 <script setup>
 import {nextTick,ref} from 'vue'
 import {useChartRender} from '@/hooks/chart/render'
-import {chartInfoByCode} from './api/getData.js'
+import {chartInfoByCode,forumChartInfoByCode} from './api/getData.js'
 import {parseQueryString} from "./utils/index"
 const {chartRender,setLimitData,isUseSelfLimit}=useChartRender()
 
@@ -30,7 +30,10 @@ async function getChartData(){
         return
     } 
     try {
-        const res=await chartInfoByCode({
+        const res=params.isETAForumChart&&params.isETAForumChart=='true'?await forumChartInfoByCode({
+            UniqueCode:params.code,
+            IsReplace:1
+        }): await chartInfoByCode({
             UniqueCode:params.code,
             IsReplace:1
         })

+ 8 - 0
src/CustomElement/api/getData.js

@@ -11,6 +11,14 @@ export const chartInfoByCode=params=>{
   return post('/chart/detail',params)
 }
 
+/**
+ * 社区图表通过code获取图表详情
+ * @param UniqueCode 
+*/
+export const forumChartInfoByCode=params=>{
+  return post('/eta_forum/chart/detail',params)
+}
+
 /**
  * 通过code获取表格详情
  * @param UniqueCode