|
@@ -3,7 +3,7 @@ import chartBox from './component/chartBox.vue'
|
|
|
import noAuth from './component/noAuth.vue'
|
|
|
import sharePoster from '../components/SharePoster.vue'
|
|
|
import { Popup, Toast,Picker } from 'vant';
|
|
|
-import {ref,onMounted, reactive, watch} from 'vue'
|
|
|
+import {ref,onMounted, reactive, watch,computed} from 'vue'
|
|
|
import {useRoute, useRouter,onBeforeRouteUpdate} from 'vue-router'
|
|
|
import moment from 'moment'
|
|
|
import Highcharts from 'highcharts/highstock';
|
|
@@ -195,7 +195,7 @@ const getChartInfo=async (type)=>{
|
|
|
// 向小程序发送分享数据
|
|
|
let postData = {
|
|
|
params:{
|
|
|
- ChartInfoId:ChartInfoId,
|
|
|
+ chartInfoId:ChartInfoId,
|
|
|
searchVal:decodeURIComponent(route.query.searchVal)||'',
|
|
|
MyChartId:route.query.MyChartId||'',
|
|
|
MyChartClassifyId:route.query.MyChartClassifyId||'',
|
|
@@ -917,6 +917,26 @@ const pageTouchmove=(e)=>{
|
|
|
|
|
|
event.preventDefault();//阻止页面移动
|
|
|
}
|
|
|
+
|
|
|
+// 生成海报所需跳转到小程序页面参数
|
|
|
+const code_scene=computed(()=>{
|
|
|
+ let obj= {
|
|
|
+ chartInfoId:ChartInfoId,
|
|
|
+ searchVal:decodeURIComponent(route.query.searchVal)||'',
|
|
|
+ MyChartId:route.query.MyChartId||'',
|
|
|
+ MyChartClassifyId:route.query.MyChartClassifyId||'',
|
|
|
+ }
|
|
|
+ return JSON.stringify(obj)
|
|
|
+})
|
|
|
+// 生成海报图片所需要的数据
|
|
|
+const posterParams=computed(()=>{
|
|
|
+ return {
|
|
|
+ chart_name:resData.value.ChartInfo.ChartName,
|
|
|
+ chart_image:resData.value.ChartInfo.ChartImage
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -930,6 +950,13 @@ const pageTouchmove=(e)=>{
|
|
|
<span class="date">{{endDate||'结束日期'}}</span>
|
|
|
</div>
|
|
|
<img class="icon" src="../../../assets/hzyb/chart/search.png" alt="" @click="handleGoSearch">
|
|
|
+ <share-poster
|
|
|
+ :shareData="{
|
|
|
+ type:'chart_detail',
|
|
|
+ code_scene:code_scene,
|
|
|
+ data:posterParams
|
|
|
+ }"
|
|
|
+ ></share-poster>
|
|
|
<img class="icon" src="../../../assets/hzyb/chart/save.png" alt="" @click="handleSaveChart" v-if="canSave">
|
|
|
<img class="icon" src="../../../assets/hzyb/chart/refresh.png" alt="" @click="handleRefreshChart">
|
|
|
</div>
|
|
@@ -937,13 +964,14 @@ const pageTouchmove=(e)=>{
|
|
|
<chartBox :options='chartData' v-if="!loading"></chartBox>
|
|
|
|
|
|
<div class="flex source-box">
|
|
|
- <span>来源:弘则研究</span>
|
|
|
- <div class="season-change-box" v-if="resData&&resData.ChartInfo.ChartType===2">
|
|
|
+ <div style="flex:1"><span v-if="resData&&resData.ChartInfo.ChartType!==2">来源:{{resData&&resData.ChartInfo.ChartSource}}</span></div>
|
|
|
+ <div class="season-change-box" style="flex:1" v-if="resData&&resData.ChartInfo.ChartType===2">
|
|
|
<span :class="calendarType==='农历'&&'active'" @click="calendarTypeChange('农历')">农历</span>
|
|
|
<span :class="calendarType==='公历'&&'active'" @click="calendarTypeChange('公历')">公历</span>
|
|
|
</div>
|
|
|
- <span style="color:#E3B377" @click="showLimit=true">上下限设置</span>
|
|
|
+ <span style="color:#E3B377;flex:1;text-align:right" @click="showLimit=true">上下限设置</span>
|
|
|
</div>
|
|
|
+ <div class="source-box" style="margin-top:5px" v-if="resData&&resData.ChartInfo.ChartType===2">来源:{{resData&&resData.ChartInfo.ChartSource}}</div>
|
|
|
|
|
|
<!-- 日期类型 -->
|
|
|
<div class="date-type-box" v-if="resData&&resData.ChartInfo.ChartType===1">
|
|
@@ -1032,9 +1060,6 @@ const pageTouchmove=(e)=>{
|
|
|
</div>
|
|
|
</div>
|
|
|
</Popup>
|
|
|
-
|
|
|
- <!-- 分享海报 -->
|
|
|
- <share-poster :style="{bottom:'100px'}" :shareData="{type:'chartDetail'}"></share-poster>
|
|
|
</div>
|
|
|
<!-- 无权限 -->
|
|
|
<noAuth v-if="noauth" :data="noAuthData"></noAuth>
|
|
@@ -1079,7 +1104,7 @@ const pageTouchmove=(e)=>{
|
|
|
float: right;
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
|
- margin-left: 50px;
|
|
|
+ margin-left: 30px;
|
|
|
}
|
|
|
}
|
|
|
.select-date-box-head{
|