浏览代码

跳转图表详情新增入参chartSource

Karsa 2 年之前
父节点
当前提交
b911a33031
共有 5 个文件被更改,包括 8 次插入5 次删除
  1. 1 0
      pages-chart/chartDetail.vue
  2. 1 0
      pages-myChart/detail.vue
  3. 2 2
      pages-myChart/list.vue
  4. 2 1
      pages/chart/chart.vue
  5. 2 2
      pages/myChart/index.vue

+ 1 - 0
pages-chart/chartDetail.vue

@@ -49,6 +49,7 @@ export default {
                 MyChartId:options.MyChartId,
                 MyChartClassifyId:options.MyChartClassifyId,
                 from:options.from||'',
+					 chartSource: options.chartSource||'',
                 token:this.$store.state.user.token||uni.getStorageSync("token"),
                 timestamp:new Date().getTime(),//防止缓存
             }

+ 1 - 0
pages-myChart/detail.vue

@@ -13,6 +13,7 @@ export default {
     onLoad(options){
         const queryObj={
             ChartInfoId:options.chartInfoId,
+				chartSource: options.chartSource,
             source:'ybxcx_my_chart',
             token:this.$store.state.user.token||uni.getStorageSync("token"),
             timestamp:new Date().getTime(),//防止缓存

+ 2 - 2
pages-myChart/list.vue

@@ -92,9 +92,9 @@ export default {
             this.getList()
         },
 
-        goDetail(item){
+        goDetail({chart_info_id,chart_info_source}){
             uni.navigateTo({
-                url: `/pages-myChart/detail?chartInfoId=${item.chart_info_id}`, 
+                url: `/pages-myChart/detail?chartInfoId=${item.chart_info_id}&chartSource=${chart_info_source}`, 
             });
         },
 

+ 2 - 1
pages/chart/chart.vue

@@ -271,8 +271,9 @@ export default {
       // 图表点击某项
       chartClick(e){
         console.log(e.detail.data);
+        const { ChartInfoId,MyChartId,Source } = e.detail.data;
         uni.navigateTo({
-          url:`/pages-chart/chartDetail?chartInfoId=${e.detail.data.ChartInfoId}&searchVal=${this.searchVal}&MyChartId=${e.detail.data.MyChartId}&MyChartClassifyId=${this.selectClassifyId}`
+          url:`/pages-chart/chartDetail?chartInfoId=${ChartInfoId}&searchVal=${this.searchVal}&MyChartId=${MyChartId}&MyChartClassifyId=${this.selectClassifyId}&chartSource=${Source}`
         })
       },
 

+ 2 - 2
pages/myChart/index.vue

@@ -159,9 +159,9 @@ export default {
             });
         },
 
-        goDetail(item){
+        goDetail({chart_info_id,chart_info_source}){
             uni.navigateTo({
-                url: `/pages-myChart/detail?chartInfoId=${item.chart_info_id}`, 
+                url: `/pages-myChart/detail?chartInfoId=${chart_info_id}&chartSource=${chart_info_source}`, 
             });
         }
     },