فهرست منبع

Merge branch 'fix_jy'

jwyu 1 سال پیش
والد
کامیت
04d7bf7f72
2فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 4 2
      src/views/chartETA/ChartDetail.vue
  2. 5 1
      src/views/myETA/ChartDetail.vue

+ 4 - 2
src/views/chartETA/ChartDetail.vue

@@ -15,10 +15,11 @@ import SetChartEnName from './components/SetChartEnName.vue'
 import {useCachedViewsStore} from '@/store/modules/cachedViews'
 import { setExtremumDate } from '@/hooks/chart/commonFun.js'
 import {chartLibBtn,useAuthBtn} from '@/hooks/useAuthBtn'
+import {usePublicSettingStore} from '@/store/modules/publicSetting'
 const {checkAuthBtn} = useAuthBtn()
 import _ from 'lodash';
 
-
+const publicSettingStore = usePublicSettingStore()
 const {options,axisLimitState,chartRender}=useChartRender()
 const { width } = useWindowSize()
 const cachedViewsStore=useCachedViewsStore()
@@ -368,7 +369,8 @@ async function getShareLink(){
         )
     }
     if(!confirmFlag.value) return 
-    const linkUrl = `${import.meta.env.VITE_CHART_LINK}?code=${chartInfo.value.UniqueCode}&fromType=share&lang=${currentLang}`
+    // const linkUrl = `${import.meta.env.VITE_CHART_LINK}?code=${chartInfo.value.UniqueCode}&fromType=share&lang=${currentLang}`
+    const linkUrl = `${publicSettingStore.publicSetting.ChartViewUrl}/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=${currentLang}`
     //console.log('url',linkUrl)
     if(navigator.clipboard&&window.isSecureContext){
          try{

+ 5 - 1
src/views/myETA/ChartDetail.vue

@@ -22,8 +22,11 @@ import {useCachedViewsStore} from '@/store/modules/cachedViews'
 import AddChartToMyETA from '@/views/chartETA/components/AddChartToMyETA.vue'
 import { setExtremumDate } from '@/hooks/chart/commonFun.js'
 import {myETABtn,useAuthBtn} from '@/hooks/useAuthBtn'
+import {usePublicSettingStore} from '@/store/modules/publicSetting'
 const {checkAuthBtn} = useAuthBtn()
 
+
+const publicSettingStore = usePublicSettingStore()
 const isMoreActionShow = computed(()=>{
     return checkAuthBtn(myETABtn.myChart_refresh)
         || checkAuthBtn(myETABtn.myChart_share)
@@ -533,7 +536,8 @@ async function handleChartRefresh(){
 
 //分享
 function handleChartShare(){
-    const url=import.meta.env.VITE_CHART_LINK+`?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
+    // const url=import.meta.env.VITE_CHART_LINK+`?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
+    const url=publicSettingStore.publicSetting.ChartViewUrl+`/chartshow?code=${chartInfo.value.UniqueCode}&fromType=share&lang=ch`
     setClipboardData(url)
 }
 //保存图表:目前myETA里能保存的只有ETA图库的图和商品价格曲线图