File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
lib/repository/electricity Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ Future<void> updateInformation() async {
134134 options: Options (headers: {"Cookie" : sessionId}))
135135 .then ((value) => value.data);
136136
137- int building = int .parse (account.substring (0 , 1 ));
137+ int building = int .parse (account.substring (1 , 4 ));
138138 RegExp name = RegExp (r"表名称:.*" );
139139 RegExp data = RegExp (r"剩余量:.*" );
140140
@@ -152,13 +152,10 @@ Future<void> updateInformation() async {
152152 }
153153 }
154154 } else {
155- int dingXiangElectricity = 0 ;
156- for (int i = nameArray.length - 1 ; i >= 0 ; -- i) {
157- if (nameArray[i][0 ]! .contains ("电表" )) {
158- electricityInfo.value = "$dingXiangElectricity 度" ;
159- return ;
160- }
161- }
155+ //by ZCWzy
156+ String ? dingXiangElectricity = dataArray[nameArray.length - 1 ][0 ];
157+ electricityInfo.value = "$dingXiangElectricity 度" ;
158+ return ;
162159 }
163160
164161 throw NotFoundException ();
You can’t perform that action at this time.
0 commit comments