修改缴费记录按年查询错误的问题
This commit is contained in:
		| @@ -1,6 +1,7 @@ | ||||
| .ec-canvas { | ||||
|   position: static !important; | ||||
|   position: relative !important; | ||||
|   float: none; | ||||
|   width: 700rpx; | ||||
|   height: 700rpx; | ||||
|   z-index: 0 !important; | ||||
| } | ||||
|   | ||||
| @@ -3,7 +3,18 @@ import { alertInfo } from "../../utils/index"; | ||||
| import request from '../../utils/request' | ||||
| import * as echarts from '../../components/echarts/echarts'; | ||||
| const { OK } = request | ||||
|  | ||||
| const getPixelRatio = () => { | ||||
|   let pixelRatio = 0 | ||||
|   wx.getSystemInfo({ | ||||
|     success: function (res) { | ||||
|       pixelRatio = res.pixelRatio | ||||
|     }, | ||||
|     fail: function () { | ||||
|       pixelRatio = 0 | ||||
|     } | ||||
|   }) | ||||
|   return pixelRatio | ||||
| } | ||||
| // pages/billDetail/index.js | ||||
| Page({ | ||||
|  | ||||
| @@ -81,24 +92,29 @@ Page({ | ||||
|             { value: 187.56, name: '本期用电量', itemStyle: { color: 'rgb(80,135,236)' } }, | ||||
|    | ||||
|           ], | ||||
|           emphasis: { | ||||
|             itemStyle: { | ||||
|               shadowBlur: 10, | ||||
|               shadowOffsetX: 0, | ||||
|               shadowColor: 'rgba(0, 0, 0, 0.5)' | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       ] | ||||
|     }; | ||||
|     this.init_pieCharts(option); | ||||
|     const that = this; | ||||
|     wx.getSystemInfo({ | ||||
|       success: function (res) { | ||||
|         that.setData({ | ||||
|           statusBarHeight : res.statusBarHeight, | ||||
|           navBarHeight : res.statusBarHeight , // 顶部导航栏高度为 44px | ||||
|           jiaonangheight: wx.getMenuButtonBoundingClientRect().height, // 胶囊高度 | ||||
|           jiaonangwidth:wx.getMenuButtonBoundingClientRect().width, | ||||
|         }) | ||||
|       }, | ||||
|     }) | ||||
|   }, | ||||
|   init_pieCharts: function(options) { | ||||
|     this.selectComponent('#echarts').init((canvas, width, height) => { | ||||
|       // 初始化图表 | ||||
|       const pieChart = echarts.init(canvas, null, { | ||||
|         width: width, | ||||
|         height: height | ||||
|         height: height, | ||||
|         devicePixelRatio: getPixelRatio(), | ||||
|       }); | ||||
|        | ||||
|       pieChart.setOption(options); | ||||
| @@ -117,14 +133,31 @@ Page({ | ||||
|       confirmText: '复制链接', | ||||
|  | ||||
|       complete: (res) => { | ||||
|         if (res.cancel) { | ||||
|            | ||||
|         } | ||||
|      | ||||
|         if (res.confirm) { | ||||
|           const result = wx.getAccountInfoSync(); | ||||
|           const { envVersion } = result.miniProgram; | ||||
|           let api = "" | ||||
|           switch (envVersion) { | ||||
|             // 开发版 | ||||
|             case 'develop': | ||||
|               wx.setClipboardData({ | ||||
|                 data: `https://zgd.hbhcbn.com/h5/?report=${id}&tenement=${tenement}`, | ||||
|               }) | ||||
|               break; | ||||
|             // 体验版 | ||||
|             case 'trial': | ||||
|               wx.setClipboardData({ | ||||
|                 data: `https://zgd.hbhcbn.com/h5/?report=${id}&tenement=${tenement}`, | ||||
|               }) | ||||
|               break; | ||||
|             // 正式版 | ||||
|             case 'release': | ||||
|               wx.setClipboardData({ | ||||
|                 data: `https://zgd.hbhcbn.com/reporth5/?report=${id}&tenement=${tenement}`, | ||||
|               }) | ||||
|               break; | ||||
|           } | ||||
|           | ||||
|         } | ||||
|       } | ||||
|     }) | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| <!--pages/billDetail/index.wxml--> | ||||
| <navigator title="{{ time }}电费账单" canBack="{{true}}" /> | ||||
| <view class="title"> | ||||
| <view class="title" style="top: {{statusBarHeight + 46}}px"> | ||||
|   <avatar text="{{detail.tenement.shortName}}"  /> | ||||
|   <view class="titleContent"> | ||||
|     <view class="park"> | ||||
| @@ -51,12 +51,12 @@ | ||||
|   <view class="line"></view> | ||||
|   <view class="contentTitle"> 电费构成 </view> | ||||
|   <echarts  | ||||
|     style="width:200rpx;height:200rpx;"  | ||||
|     style="width:200rpx;height:180rpx;"  | ||||
|     id="echarts"  | ||||
|     class='mychart-bar'  | ||||
|     canvas-id="mychart-bar"  | ||||
|     ec="{{ ec }}"     | ||||
|     forceUseOldCanvas="{{true}}" | ||||
|     forceUseOldCanvas="{{false}}" | ||||
|   > | ||||
|   </echarts> | ||||
|   <view class="tooltip"> | ||||
|   | ||||
| @@ -6,8 +6,7 @@ | ||||
|   display: flex; | ||||
|   align-items: center; | ||||
|   position: sticky; | ||||
|   top: 66px; | ||||
|   z-index: 99; | ||||
|   z-index: 99 !important; | ||||
| } | ||||
|  | ||||
| .titleContent { | ||||
|   | ||||
| @@ -65,15 +65,16 @@ Page({ | ||||
|  | ||||
|   }, | ||||
|   onChangeYear(e) { | ||||
|     const { years, tenement } = this.data; | ||||
|     const currentYear = years[Number(e)] | ||||
|     const { years, codeId } = this.data; | ||||
|     const currentYear = e | ||||
|     console.log('e', e, 'currentYear', currentYear, 'years', years) | ||||
|     this.setData({ | ||||
|       year: currentYear, | ||||
|       type: "", | ||||
|       show: false, | ||||
|       title: "" | ||||
|     }) | ||||
|     this.init(currentYear, tenement) | ||||
|     this.init(currentYear, codeId) | ||||
|   }, | ||||
|   onChangeMeter(e) { | ||||
|     const { id, code } = e; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user