diff --git a/components/echarts/ec-canvas.wxss b/components/echarts/ec-canvas.wxss
index 3bc5a6e..1a1cdd3 100644
--- a/components/echarts/ec-canvas.wxss
+++ b/components/echarts/ec-canvas.wxss
@@ -1,6 +1,7 @@
.ec-canvas {
- position: static !important;
+ position: relative !important;
float: none;
width: 700rpx;
height: 700rpx;
+ z-index: 0 !important;
}
diff --git a/pages/billDetail/index.js b/pages/billDetail/index.js
index 9adfedf..d84e43f 100644
--- a/pages/billDetail/index.js
+++ b/pages/billDetail/index.js
@@ -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) {
- wx.setClipboardData({
- data: `https://zgd.hbhcbn.com/h5/?report=${id}&tenement=${tenement}`,
- })
+ 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;
+ }
+
}
}
})
diff --git a/pages/billDetail/index.wxml b/pages/billDetail/index.wxml
index ea0d1c1..d1057e1 100644
--- a/pages/billDetail/index.wxml
+++ b/pages/billDetail/index.wxml
@@ -1,6 +1,6 @@
-
+
@@ -51,12 +51,12 @@
电费构成
diff --git a/pages/billDetail/index.wxss b/pages/billDetail/index.wxss
index a988dbc..a36155e 100644
--- a/pages/billDetail/index.wxss
+++ b/pages/billDetail/index.wxss
@@ -6,8 +6,7 @@
display: flex;
align-items: center;
position: sticky;
- top: 66px;
- z-index: 99;
+ z-index: 99 !important;
}
.titleContent {
diff --git a/pages/rechargeRecord/index.js b/pages/rechargeRecord/index.js
index 6728601..e59ea1d 100644
--- a/pages/rechargeRecord/index.js
+++ b/pages/rechargeRecord/index.js
@@ -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;