2 次代碼提交 72b4a7358c ... 7b3cb4bc79

作者 SHA1 備註 提交日期
  yujinwen 7b3cb4bc79 Merge branch 'eta_forum_2.0' into debug 5 天之前
  yujinwen 3f22b8c5e3 eta_comp组件兼容eta社区图表 5 天之前
共有 2 個文件被更改,包括 13 次插入2 次删除
  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