pull/1/head
戴余标 3 years ago
commit 2bde71349b

@ -43,6 +43,7 @@ class SAASAPI {
static _Advice advice = _Advice(); static _Advice advice = _Advice();
static _Vote vote = _Vote(); static _Vote vote = _Vote();
static _Facilities facilities = _Facilities(); static _Facilities facilities = _Facilities();
static _Bracelet bracelet = _Bracelet();
/// ///
static _ProfileApi profile = _ProfileApi(); static _ProfileApi profile = _ProfileApi();
@ -54,6 +55,11 @@ class _City {
String get allCity => '/app/city/allCity'; String get allCity => '/app/city/allCity';
} }
class _Bracelet {
///
String get data => '/app/user/elderlyCareEquipment/getAqgData';
}
class _User { class _User {
///app() ///app()
String get sendTelCodeUpdateTel => '/app/user/sendTelCodeUpdateTel'; String get sendTelCodeUpdateTel => '/app/user/sendTelCodeUpdateTel';
@ -323,9 +329,9 @@ class _Pay {
/// ///
String get livingExpensesOrderCheckAlipay => String get livingExpensesOrderCheckAlipay =>
'/app/user/alipay/livingExpensesOrderCheckAlipay'; '/app/user/alipay/livingExpensesOrderCheckAlipay';
/// ///
String get settlement => String get settlement => '/app/user/shop/cart/settlement';
'/app/user/shop/cart/settlement';
} }
class _LifePay { class _LifePay {
@ -358,51 +364,72 @@ class _CommunityIntroduce {
class _ConveniencePhone { class _ConveniencePhone {
///app便 ///app便
String get list => '/app/user/conveniencePhone/list'; String get list => '/app/user/conveniencePhone/list';
String get recordAlarmInfo => '/app/user/alarm/insertAlarmRecord'; String get recordAlarmInfo => '/app/user/alarm/insertAlarmRecord';
} }
class _CommitteeStaff { class _CommitteeStaff {
/// ///
String get list => '/app/user/industryCommittee/list'; String get list => '/app/user/industryCommittee/list';
} }
class _Advice { class _Advice {
/// ///
String get list => '/app/user/advice/list'; String get list => '/app/user/advice/list';
//// ////
String get insert => '/app/user/advice/insert'; String get insert => '/app/user/advice/insert';
////id / ////id /
String get find => '/app/user/advice/findById'; String get find => '/app/user/advice/findById';
/// ///
String get reQuestion => '/app/user/advice/reQuestion'; String get reQuestion => '/app/user/advice/reQuestion';
/// ///
String get complete => '/app/user/advice/complete'; String get complete => '/app/user/advice/complete';
/// ///
String get evaluate => '/app/user/advice/evaluate'; String get evaluate => '/app/user/advice/evaluate';
//// ////
String get delete => '/app/user/advice/delete'; String get delete => '/app/user/advice/delete';
} }
class _Vote { class _Vote {
/// ///
String get list => '/app/user/vote/list'; String get list => '/app/user/vote/list';
/// ///
String get vote => '/app/user/vote/vote'; String get vote => '/app/user/vote/vote';
/// ///
String get details => '/app/user/vote/details'; String get details => '/app/user/vote/details';
} }
class _Facilities { class _Facilities {
/// ///
String get list => '/app/user/facilities/list'; String get list => '/app/user/facilities/list';
/// ///
String get categoryList => '/app/user/facilities/categoryList'; String get categoryList => '/app/user/facilities/categoryList';
///id ///id
String get manageList => '/app/user/facilities/manageList'; String get manageList => '/app/user/facilities/manageList';
/// ///
String get insert => '/app/user/facilities/insert'; String get insert => '/app/user/facilities/insert';
/// ///
String get allAppointmentPeriod =>'/app/user/facilities/allAppointmentPeriod'; String get allAppointmentPeriod =>
'/app/user/facilities/allAppointmentPeriod';
/// ///
String get signIn => '/app/user/facilities/signIn'; String get signIn => '/app/user/facilities/signIn';
///使 ///使
String get useStop => '/app/user/facilities/useStop'; String get useStop => '/app/user/facilities/useStop';
/// ///
String get cancel => '/app/user/facilities/cancel'; String get cancel => '/app/user/facilities/cancel';
} }

@ -10,7 +10,7 @@ class BraceletModel {
final int switchType; final int switchType;
final int dbp; final int dbp;
final int heartRate; final int heartRate;
final int remainingPower; final int? remainingPower;
final int detectionDays; final int detectionDays;
final int alarmNums; final int alarmNums;
final int fallNums; final int fallNums;

@ -14,7 +14,7 @@ BraceletModel _$BraceletModelFromJson(Map<String, dynamic> json) =>
switchType: json['switchType'] as int, switchType: json['switchType'] as int,
dbp: json['dbp'] as int, dbp: json['dbp'] as int,
heartRate: json['heartRate'] as int, heartRate: json['heartRate'] as int,
remainingPower: json['remainingPower'] as int, remainingPower: json['remainingPower'] as int?,
detectionDays: json['detectionDays'] as int, detectionDays: json['detectionDays'] as int,
alarmNums: json['alarmNums'] as int, alarmNums: json['alarmNums'] as int,
fallNums: json['fallNums'] as int, fallNums: json['fallNums'] as int,

@ -1,3 +1,5 @@
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -32,7 +34,7 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
@override @override
void initState() { void initState() {
var cancel = BotToast.showLoading(); var cancel = BotToast.showLoading();
// getData(); getData();
cancel(); cancel();
super.initState(); super.initState();
} }
@ -128,8 +130,9 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
} }
Future getData() async { Future getData() async {
Response base = var cancel = BotToast.showLoading();
await NetUtil().dio!.get(API.bracelet.data, queryParameters: { BaseModel base =
await NetUtil().get(SAASAPI.bracelet.data, params: {
'imei': 863204050238280, 'imei': 863204050238280,
}); });
if (base.data != null) { if (base.data != null) {
@ -137,6 +140,7 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
_date = DateTime.now(); _date = DateTime.now();
} }
setState(() {}); setState(() {});
cancel();
} }
Container bottomCard() { Container bottomCard() {
@ -437,7 +441,7 @@ class _OldAgeSupportPageSimpleState extends State<OldAgeSupportPageSimple> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'剩余电量'.text.size(28.sp).color(Colors.black.withOpacity(0.65)).make(), '剩余电量'.text.size(28.sp).color(Colors.black.withOpacity(0.65)).make(),
'${_model?.remainingPower}' '${_model?.remainingPower??0}'
.richText .richText
.withTextSpanChildren([ .withTextSpanChildren([
' %' ' %'

Loading…
Cancel
Save