更新
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package com.taihe.mh_app
|
package com.taihe.vbvs_app
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk
|
sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk
|
||||||
flutter.sdk=D:\\flutter_res\\flutter
|
flutter.sdk=D:\\flutter_res\\flutter
|
||||||
flutter.buildMode=release
|
flutter.buildMode=debug
|
||||||
flutter.versionName=1.0.0
|
flutter.versionName=1.0.0
|
||||||
flutter.versionCode=1
|
flutter.versionCode=1
|
||||||
flutter.minSdkVersion=21
|
flutter.minSdkVersion=21
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import 'package:vbvs_app/common/util/requestWithLog.dart';
|
|||||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||||
import 'package:vbvs_app/model/user_data.dart';
|
import 'package:vbvs_app/model/user_data.dart';
|
||||||
import 'package:lpinyin/lpinyin.dart';
|
// import 'package:lpinyin/lpinyin.dart';
|
||||||
part 'address_controller.g.dart';
|
part 'address_controller.g.dart';
|
||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
@@ -209,10 +209,11 @@ class AddressController extends GetControllerEx<AddressModel> {
|
|||||||
|
|
||||||
// 工具:中文首字母转大写英文(你也可以用更专业的拼音库)
|
// 工具:中文首字母转大写英文(你也可以用更专业的拼音库)
|
||||||
String _getLetter(String name) {
|
String _getLetter(String name) {
|
||||||
if (name.isEmpty) return "#";
|
return name;
|
||||||
String pinyin = PinyinHelper.getPinyinE(name,
|
// if (name.isEmpty) return "#";
|
||||||
separator: '', defPinyin: '', format: PinyinFormat.WITHOUT_TONE);
|
// String pinyin = PinyinHelper.getPinyinE(name,
|
||||||
if (pinyin.isEmpty) return "#";
|
// separator: '', defPinyin: '', format: PinyinFormat.WITHOUT_TONE);
|
||||||
return pinyin[0].toUpperCase();
|
// if (pinyin.isEmpty) return "#";
|
||||||
|
// return pinyin[0].toUpperCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,12 +81,11 @@ class _HomeDeviceStausWidgetState extends State<HomeDeviceStausWidget> {
|
|||||||
var future = webviewTestController.web.jsbridge?.dart
|
var future = webviewTestController.web.jsbridge?.dart
|
||||||
.appToHtmlDevice(device);
|
.appToHtmlDevice(device);
|
||||||
|
|
||||||
Future.delayed(Duration(seconds: 5), () {
|
Future.delayed(Duration(seconds: 5), () {
|
||||||
TopSlideNotification.show(context, text: "控制界面初始化中,请稍后再试".tr);
|
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
await future; // 等待最终完成(即使超过 5 秒)
|
await future;
|
||||||
MainPageBBottomChange.jumpTo(2);
|
MainPageBBottomChange.jumpTo(2);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("发生异常: $e");
|
print("发生异常: $e");
|
||||||
|
|||||||
@@ -115,6 +115,39 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
// deviceController.getSleepReport();
|
// deviceController.getSleepReport();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (userInfoController.model.login == 1) {
|
||||||
|
//查询人员信息列表
|
||||||
|
deviceController.getPersonList();
|
||||||
|
//请求绑定设备列表
|
||||||
|
// homeController.getSleepReport();
|
||||||
|
deviceController.getDeviceNum().then((apiResponse) {
|
||||||
|
if (apiResponse.code != HttpStatusCodes.ok) {
|
||||||
|
TopSlideNotification.show(
|
||||||
|
Get.context!,
|
||||||
|
text: apiResponse.msg!,
|
||||||
|
textColor: themeController.currentColor.sc9,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
deviceController.getDeviceList(group: 'room').then((apiResponse) {
|
||||||
|
if (apiResponse.code != HttpStatusCodes.ok) {
|
||||||
|
TopSlideNotification.show(
|
||||||
|
Get.context!,
|
||||||
|
text: apiResponse.msg!,
|
||||||
|
textColor: themeController.currentColor.sc9,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
//请求睡眠报告
|
||||||
|
// deviceController.getSleepReport();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (homeController.homeSleepDays.value.isNotEmpty) {
|
||||||
|
homeController.selectedDayIndex.value =
|
||||||
|
homeController.homeSleepDays.value.length - 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
int login = userInfoController.model.login!;
|
int login = userInfoController.model.login!;
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => FocusScope.of(context).unfocus(),
|
onTap: () => FocusScope.of(context).unfocus(),
|
||||||
@@ -482,7 +515,6 @@ class _NewHomePageState extends State<NewHomePage> {
|
|||||||
isMultiSelect: false,
|
isMultiSelect: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
Reference in New Issue
Block a user