柒零 hai 1 ano
pai
achega
793b554fdb
Modificáronse 1 ficheiros con 40 adicións e 31 borrados
  1. 40 31
      subpages/data/data.js

+ 40 - 31
subpages/data/data.js

@@ -1718,11 +1718,14 @@ Page({
 						console.log('ress.data-getsingle=' + JSON.stringify(ress.data.results));
 
 						if (!ress.data.results || ress.data.results == '') {
-							wx.showModal({
-								title: '提示',
-								content: '无数据',
-								showCancel: false
-							});
+							// wx.showModal({
+							// 	title: '提示',
+							// 	content: '无数据',
+							// 	showCancel: false
+							// });
+							that.setData({
+								isNoReportToday: true
+							})
 							return;
 						}
 
@@ -1742,22 +1745,28 @@ Page({
 						});
 
 					} else {
-						wx.showModal({
-							title: '提示',
-							content: '无数据',
-							showCancel: false
-						});
+						// wx.showModal({
+						// 	title: '提示',
+						// 	content: '无数据',
+						// 	showCancel: false
+						// });
+							that.setData({
+								isNoReportToday:true
+							})
 					}
 				} catch (error) {
 					console.error(error);
 				}
 			},
 			fail: function (error) {
-				wx.showToast({
-					title: "无数据",
-					icon: "error",
-					mask: true,
-				});
+				// wx.showToast({
+				// 	title: "无数据",
+				// 	icon: "error",
+				// 	mask: true,
+				// });
+				that.setData({
+					isNoReportToday: true
+				})
 			}
 		});
 	},
@@ -1776,12 +1785,12 @@ Page({
 					if (ress && ress.data) {
 						console.log('ress.data-getunionsingle=' + JSON.stringify(ress.data));
 
-						if (ress.data == {} || ress.data.data == {} || ress.data.data == []) {
-							wx.showModal({
-								title: '提示',
-								content: '无数据',
-								showCancel: false
-							});
+						if (ress.data == {} || ress.data.data == {} || ress.data.data == [] || !ress.data.data) {
+							// wx.showModal({
+							// 	title: '提示',
+							// 	content: '无数据',
+							// 	showCancel: false
+							// });
 							that.setData({
 								isNoReportToday:true
 							})
@@ -1804,11 +1813,11 @@ Page({
 
 						that.getSnData();//需要筛选的 要获取sn
 					} else {
-						wx.showModal({
-							title: '提示',
-							content: '无数据',
-							showCancel: false
-						});
+						// wx.showModal({
+						// 	title: '提示',
+						// 	content: '无数据',
+						// 	showCancel: false
+						// });
 
 						that.setData({
 							isNoReportToday: true
@@ -1819,11 +1828,11 @@ Page({
 				}
 			},
 			fail: function (error) {
-				wx.showToast({
-					title: "无数据",
-					icon: "error",
-					mask: true,
-				});
+				// wx.showToast({
+				// 	title: "无数据",
+				// 	icon: "error",
+				// 	mask: true,
+				// });
 
 				that.setData({
 					isNoReportToday: true