ソースを参照

修复主页图表数据为0时显示补全bug

ming 3 年 前
コミット
4090d25662

+ 11 - 2
pages/index/components/chart/chart.vue

@@ -83,7 +83,7 @@
 					series: [{
 						name: '报警分析',
 						type: 'pie',
-						radius: ['40%', '60%'], //aa环装圈粗细
+						radius: ['35%', '52%'], //aa环装圈粗细
 						center: ['50%', '55%'],
 
 						itemStyle: {
@@ -103,8 +103,17 @@
 								name: "视频监测",
 								value: this.bindData.videoMonitoringCount?this.bindData.videoMonitoringCount:0
 							},
-
 						],
+						
+						// data: [{
+						// 		name: "电力监测",
+						// 		value: 0
+						// 	},
+						// 	{
+						// 		name: "视频监测",
+						// 		value: 0
+						// 	},
+						// ],
 
 						labelLine: {
 							normal: {

+ 1 - 1
pages/index/components/chart2/chart2.vue

@@ -93,7 +93,7 @@
 					series: [{
 						name: '访问来源',
 						type: 'pie',
-						radius: ['40%', '60%'],
+						radius: ['35%', '52%'],
 						center: ['50%', '55%'],
 						itemStyle: {
 							normal: {

+ 6 - 6
pages/index/index.vue

@@ -193,15 +193,15 @@
 		onLoad: function(option) {
 
 		
-			if (option.op) {
-				this.getData();
+			// if (option.op) {
+			// 	this.getData();
 			
-			} else {
-				this.init()
-			}
+			// } else {
+			// 	this.init()
+			// }
 			
 			
-			// this.getData();
+			this.getData();
 
 			this.hackReset = false;
 			this.$nextTick(() => {

+ 5 - 5
util/api.js

@@ -1,9 +1,9 @@
 // const BASE_URL = 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/' //(测试域名)  
-const BASE_URL = 'https://wx.ewoogi.com/USKYOF/USKYOF.php/Home/' //(正式域名新)  
-const websiteUrl = 'https://wx.ewoogi.com'
+const BASE_URL = 'https://qhome.usky.cn/USKYOF/USKYOF.php/Home/' //(正式域名新)  
+const websiteUrl = 'https://qhome.usky.cn'
 
-// const websiteUrl = 'https://wx.ewoogi.com'
-// const BASE_URL='http://https://wx.ewoogi.com/USKYOF/USKYOF.php/Home/'
+// const websiteUrl = 'https://qhome.usky.cn'
+// const BASE_URL='http://https://qhome.usky.cn/USKYOF/USKYOF.php/Home/'
 // 同时发送异步代码的次数,防止一次点击中有多次请求,用于处理
 let ajaxTimes = 0;
 
@@ -62,7 +62,7 @@ function myRequest(options){
 				let notIndexFail = ['Index/getDataStatistics', 'Com/getAuthorizationUrl'];
 				if (notIndexFail.includes(options.url)) {
 					window.location.href =
-						'https://wx.ewoogi.com/wx/index.html#/pages/index/index';
+						'https://qhome.usky.cn/wx/index.html#/pages/index/index';
 				} else {
 					uni.showModal({
 						showCancel: false,