|
|
|
import 'dart:async';
|
|
|
|
import 'dart:math';
|
|
|
|
|
|
|
|
import 'package:doublefeel_flutter/app/modules/friends/controllers/friend_trend_controller.dart';
|
|
|
|
import 'package:doublefeel_flutter/app/modules/home/controllers/home_controller.dart';
|
|
...
|
...
|
@@ -254,17 +253,24 @@ class TodayController extends GetMaterialController { |
|
|
|
}
|
|
|
|
if (result.status == 1) {
|
|
|
|
_performDataUpload();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} catch (e) {}
|
|
|
|
// 打开苹果健康
|
|
|
|
_platformHostApi.nativeHandleUrl('x-apple-health://');
|
|
|
|
} catch (e) {
|
|
|
|
AppToast.show(e.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void onAuthorizeTap() {
|
|
|
|
if (showHealthDataAuthCardStatus.value == 0) {
|
|
|
|
if (showHealthDataAuthCardStatus.value == 1) {
|
|
|
|
return;
|
|
|
|
} else if (showHealthDataAuthCardStatus.value == 0) {
|
|
|
|
Get.to(NoHealthDataPage(
|
|
|
|
onRefresh: requestHealthAuthorization,
|
|
|
|
));
|
|
|
|
} else if (showHealthDataAuthCardStatus.value == -1) {
|
|
|
|
} else {
|
|
|
|
Get.to(NoHealthDataNoPermissionPage(
|
|
|
|
onRequest: requestHealthAuthorization,
|
|
|
|
));
|
...
|
...
|
|