Skip to content

Commit

Permalink
Fix home page empty and update to v3.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
abc873693 committed Sep 27, 2019
1 parent ae20bbf commit a2b4000
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/api/helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:nkust_ap/models/announcements_data.dart';
import 'package:nkust_ap/models/booking_bus_data.dart';
import 'package:nkust_ap/models/bus_violation_records_data.dart';
import 'package:nkust_ap/models/cancel_bus_data.dart';
import 'package:nkust_ap/models/leave_info_data.dart';
import 'package:nkust_ap/models/leave_submit_info_data.dart';
import 'package:nkust_ap/models/leaves_data.dart';
import 'package:nkust_ap/models/leaves_submit_data.dart';
import 'package:nkust_ap/models/library_info_data.dart';
Expand Down Expand Up @@ -159,7 +159,10 @@ class Helper {
Future<AnnouncementsData> getAllAnnouncements() async {
try {
var response = await dio.get("/news/announcements/all");
return AnnouncementsData.fromJson(response.data);
if (response.statusCode == 204)
return AnnouncementsData(data: []);
else
return AnnouncementsData.fromJson(response.data);
} on DioError catch (dioError) {
print(dioError);
throw dioError;
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AppLocalizations {
'app_name': 'NKUST AP',
'update_note_title': 'Update Notes',
'update_note_content':
'1.Release new API version(will clear old preference data).\n2.Add midterm warning page.\n3.Add reward and penalty page.\n4.Impove course page.\n5.Fix some bug',
'1.Release new API version(will clear old preference data).\n2.Add midterm warning page.\n3.Add reward and penalty page.\n4.Impove course page.\n5.Add feature leave apply.\n6.Fix some bug',
'splash_content': '我們全都包了\n只剩下學校不包我們',
'share': 'Share',
'teacher_confirm_title': 'Are you a teacher?',
Expand Down Expand Up @@ -399,7 +399,7 @@ class AppLocalizations {
'app_name': '高科校務通',
'update_note_title': '更新日誌',
'update_note_content':
'1.全新推出新的API(此更新會清除先前資料)\n2.新增期中預警\n3.新增獎懲紀錄\n4.改善課表顯示\n5.修正部分錯誤',
'1.全新推出新的API(此更新會清除先前資料)\n2.新增期中預警\n3.新增獎懲紀錄\n4.改善課表顯示\n5.新增請假申請\n6.修正部分錯誤',
'splash_content': '我們全都包了\n只剩下學校不包我們',
'share': '分享',
'teacher_confirm_title': '您是老師嗎?',
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: nkust_ap
description: A new Flutter application.

version: 3.2.6+30206
version: 3.2.7+30207

environment:
sdk: ">=2.2.2 <3.0.0"
Expand Down

0 comments on commit a2b4000

Please sign in to comment.